* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, Arial, Helvetica, sans-serif;
    padding: 20px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #333;
    font-size: 36px;
}

h2 {
    color: #333;

}

#totals {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 16px;
}

#totals h3,
#totals strong {
    color: #535353;
    margin: 1px 0;
}

#totals p {
    margin: 1px 0;
    font-weight: normal;
}

input[type="date"] {
    /* Estilos básicos */
    padding: 10px;
    font-size: 16px;
    /* Tamaño de fuente legible */
    border: 1px solid #ccc;
    /* Borde visible */
    border-radius: 4px;
    /* Bordes redondeados */
    background-color: #fff;
    /* Fondo blanco */
    color: #333;
    /* Color de texto */
    /* width: 100%;  */
    box-sizing: border-box;
    /* Incluye padding y borde en el ancho total */
    -webkit-appearance: textfield;
    /* Elimina el estilo nativo de iOS */
    appearance: none;
    /* Elimina el estilo nativo en otros navegadores */
}

/* Estilo para el placeholder */
input[type="date"]::-webkit-datetime-edit-text,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
    color: #888;
    /* Color del texto del placeholder */
}

/* Estilo cuando el campo está enfocado */
input[type="date"]:focus {
    border-color: #418dff;
    /* Borde azul al enfocar */
    outline: none;
    /* Elimina el contorno predeterminado */
}


/* Asegura que el campo de fecha sea visible en iOS */
input[type="date"]::-webkit-calendar-picker-indicator {
    background: url('calendar-icon.png') no-repeat center;
    /* Opcional: ícono personalizado */
    background-size: 20px;
    cursor: pointer;
}

.metrics-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.input-section,
.add-transaction {
    margin: 10px 0;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

input[type="number"],
input[type="date"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

button {
    padding: 8px 16px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.url-box {
    cursor: pointer;
    margin: 3px 0px;
    width: fit-content;
}

.url-box:hover {
    text-decoration: underline;
}

.donation-section {
    background: #fff4e1;
    padding: 10px;
}

.tooltip {
    display: none;

}

button:hover {
    background-color: rgba(90, 90, 90, 0.877)
}

.delete-btn {
    background-color: #dc3545;
}

.delete-btn:hover {
    background-color: #c82333;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

/* Responsive table scroll container */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

th,
td {
    border: 1px solid #ececec;
    padding: 4px;
}

th {
    background-color: #003c7c;
    color: white;
    font-size: 14px;
    text-align: left;
}

tfoot td {
    font-weight: bold;
    background-color: #f8f9fa;
}

.delete-td {
    text-align: center;
}

/* Sponsors section responsive styles */
.sponsors-section {
    margin: 15px 0;
    text-align: center;
    width: 100%;
}

.sponsors-section h2 {
    font-size: 16px;
}

.sponsors-section a {
    text-decoration: none;
}

.sponsors-section a:hover {
    opacity: 0.8;
}

.sponsors-section .sponsor-stand {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 5px;
    width: 180px;
    box-shadow: 0 2px 8px #0001;
    margin-bottom: 0;
}

.sponsors-section .sponsor-stand>div {
    word-break: break-word;
}

.sponsors-section .sponsors-flex {
    display: flex;
    justify-content: center;
    gap: 30px;
    width: 100%;
}

.sponsor-stand_logo {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sponsor-stand span {
    font-size: 24px;
}

#dcaTable {
    margin: 40px 0px;
}



/* Media Queries */
@media (max-width: 800px) {
    #dcaTable th {
        padding: 5px;
        font-size: 10px;
    }
}

@media (max-width: 700px) {
    .sponsors-section .sponsors-flex {
        flex-direction: row;
        align-items: center;
        gap: 18px;
    }

    .sponsor-stand_logo {
        height: fit-content;
    }

    .sponsors-section .sponsor-stand {
        width: fit-content;
        max-width: 350px;
    }

    .sponsors-section .sponsor-stand span {
        font-size: 18px;
    }

    .table-responsive {
        margin-top: 10px;
    }

    #dcaTable {
        min-width: 600px;
    }
}



@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 1px;
        width: 100%;
    }

    .input-section,
    .add-transaction {
        flex-direction: column;
        justify-content: center;
        width: 100%;
    }

    .totals-section h3 {
        font-size: 18px;
    }

    .totals-section p {
        font-size: 14px;
    }


    #dateInput,
    #usdInput,
    #buyPriceInput,
    #quantityInput,
    input,
    button {
        width: 100%;
    }

    #dcaTable {
        font-size: 12px;
    }

    #dcaTable th,
    #dcaTable td {
        padding: 5px;
    }

    #dcaTable th {
        font-size: 10px;
    }

    .delete-btn {
        font-size: 10px;
    }

    #logo img {
        max-width: 120px;
    }

}


@media (max-width: 495px) {

    h1 {
        font-size: 24px;
    }
    #totals {
        font-size: 12px;
    }

    #logo img {
        max-width: 60px;
    }


    #dcaTable th {
        font-size: 10px;
        width: fit-content;
    }

    #dcaTable tbody {
        font-size: 10px;
    }

    .delete-btn {
        padding: 5px;
    }
}