:root {
    --color-primary: #2a6573;
    --color-secondary: #20b098;
    --color-text: #2c3e50;
    --color-background: #f0f8f1;
    --color-input-border: #21d6a0;
    --color-highlight: #7ad0b9;
    --color-button-disabled: #e4f2e5;
    --color-text-disabled: #ffffff;
    --color-danger: #d9534f;
    --color-green-light: #d4edda;
    --color-orange-light: #fff3cd;
    --color-red-light: #f8d7da;
    --color-green-dark: #5bc071;
    --color-orange-dark: #e5c563;
    --color-red-dark: #f16977;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 700px;
    margin: 0 auto;
    padding-top: 40px; /* Ajusta este valor según la altura de tu header */
    padding: 20px;
    background-color: var(--color-background);
    color: var(--color-text);
    padding-bottom: 0; /* Ajusta este valor según sea necesario */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;      
}

/* Para eliminar flechas de subir y bajar en Chrome, Safari, Edge y Opera */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Para Firefox */
/* input[type="number"] {
    -moz-appearance: textfield;
} */

/* Estilos de tarjetas de alimentos */
.alimento {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.alimento:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
}

.input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-left: 0px;
}

.input-reducido {
    width: 100%; 
    display: inline-block;
    vertical-align: middle;
    box-sizing: border-box;
}

.botones-ajuste {
    display: flex;
    vertical-align: middle;
    gap: 10px;
    margin-right: 5px;
}

.botones-ajuste button {
    width: 36px;
    height: 36px;
    background-color: #ffc963;
    color: rgb(0, 73, 55);
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
    border-radius: 18px;
    /* margin-left: 3px; */
}

.botones-ajuste button:disabled {
    background-color: #e9c685;
    cursor: not-allowed;
    color: rgb(253, 240, 230);
}

.input-bloqueado {
    background-color: #f0f0f0;
    pointer-events: none;
}

.botones-ajuste button:first-child {
    margin-left: 0;
}

.botones-ajuste button:hover {
    background-color: #f4c266;
}

.botones-container {
    display: flex;
    align-items: middle;
    margin-left: 15px;
    margin-right: -8px;
}

.botones-ajuste-ratio {
    display: flex;
    justify-content: space-between;
    width: 60px;
    margin-top: 5px;
    margin-left: 13px;
    gap: 14px;
}

.botones-ajuste-ratio button {
    width: 28px;
    height: 28px;
    background-color: #ffc963;
    color: rgb(0, 73, 55);
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
}

.botones-ajuste-ratio button:hover {
    background-color: #f4c266;
}

.alerta-amarilla {
    background-color: #fff3cd;
    border: 1px solid #fff3cd;
    padding: 10px;
    border-radius: 6px;
    color: var(--color-text);
    font-size: 15px;
    margin: 20px 0;
    margin-left: -5px;
}

.block {
    width: 48%;
    margin-bottom: 15px;
    margin-top: 10px;
}

label {
    display: block;
    margin-top: 5px;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--color-text);
}

input {
    width: calc(100% - 20px);
    padding: 8px;
    border: 1px solid var(--color-input-border);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

input::placeholder {
    color: #999;
    font-style: italic;
}

/* Encabezados */
h1 {
    text-align: center;
    color: #f0f0f0;
    font-size: 2em;
    margin: 0;
    margin-bottom: 40px;
    margin-top: 40px; 
}

h3 {
    color: var(--color-secondary);
    margin-bottom: 5px;
    /* font-size: 1.25em; */
}

/* Botones 3D */
.boton-3d {
    background: var(--color-primary);
    box-shadow: 6px 6px 12px -1px rgba(0, 0, 0, 0.2),
                -6px -6px 12px -1px rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 18px;
    padding: 8px 12px;
    transition: all 0.3s ease;
    color: white;
    font-size: 13px;
    cursor: pointer;
    font-weight: normal;
}

.boton-3d:hover {
    box-shadow: 8px 8px 15px -1px rgba(0, 0, 0, 0.3),
                -8px -8px 15px -1px rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

.boton-3d:active {
    box-shadow: inset 4px 4px 8px -1px rgba(0, 0, 0, 0.3),
                inset -4px -4px 8px -1px rgba(255, 255, 255, 0.3);
    transform: translateY(0);
}

/* Estilos específicos para botones */
#btnRacion.boton-3d {
    background: #ffc963;
    color: rgb(0, 73, 55);
    box-shadow: 6px 6px 12px -1px rgba(0, 0, 0, 0.15),
                -6px -6px 12px -1px rgba(255, 255, 255, 0.5);
}

#btnRacion.boton-3d:hover {
    background: #fae67a;
}

#btnReset.boton-3d {
    background: #dc6460;
    box-shadow: 6px 6px 12px -1px rgba(0, 0, 0, 0.2),
                -6px -6px 12px -1px rgba(255, 255, 255, 0.5);
}

#btnReset.boton-3d:hover {
    background: #e47471;
}

#btnReset.boton-3d:active {
    box-shadow: inset 4px 4px 8px -1px rgba(0, 0, 0, 0.3),
                inset -4px -4px 8px -1px rgba(255, 255, 255, 0.5);
}

#btnRatio.boton-3d {
    background: #ffc963;
    color: rgb(0, 73, 55);
    box-shadow: 6px 6px 12px -1px rgba(0, 0, 0, 0.15),
                -6px -6px 12px -1px rgba(255, 255, 255, 0.5);
    margin-left: 15px;
}

#btnRatio.boton-3d:hover {
    background: #fae67a;
}

.boton-3d:disabled {
    background: var(--color-button-disabled);
    color: var(--color-text-disabled);
    cursor: not-allowed;
    box-shadow: none;
}

/* Botones generales */
button {
    padding: 8px 12px;
    background-color: var(--color-primary);
    /* background-color: #dc6460; */
    color: white;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    font-size: 14px;
    /* margin-left: 8px; */
    transition: background-color 0.3s, transform 0.1s;
    border-radius: 18px;
}

button:hover {
    background-color: var(--color-secondary);
} 

button#btnReset, button#btnAñadir {
    margin-right: 0px;
}

/* Botones de región */
.region-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-region {
    flex: 1;
    max-width: 200px;
    padding: 10px;
    border: none;
    /* border-radius: 5px; */
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-region.active {
    background-color: var(--color-primary);
    color: white;
}

.btn-region:not(.active) {
    background-color: #e0e0e0;
    color: #666;
}

.btn-aceptar {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: var(--color-primary);
    color: white;
    border: none;
    /* border-radius: 5px; */
    cursor: pointer;
}

.btn-aceptar:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Header del alimento */
.alimento-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    margin-top: 10px;
}

.alimento-header h3 {
    margin-right: 15px;
}

.alimento-header h3.tooltip {
    margin-top: 1px;
    /* margin-bottom: 0.75px; */
    /* font-size: 1.25em; */
}

.nombre-alimento {
    /* width: 100%; */
    padding-right: 30px;
    box-sizing: border-box;
}

.limpiar-input-alimento {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    display: none;
    color: #888;
    font-size: 18px;
    padding: 5px;
    background: none;
    border: none;
    line-height: 1;
    z-index: 2;
}

.limpiar-input-alimento:hover {
    color: #333;
    background: none;
}

.franja-estado {
    height: 10px;
    width: 100%;
    transition: background-color 0.3s ease;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    background-color: #db7874;
}

.franja-verde {
    background-color: hsl(145, 47%, 68%);
}

.tabla-alimentos-link {
    margin-left: 0px;
    margin-bottom: 20px;
    text-decoration: none;
    color: #1f52ea;
}

.tabla-alimentos-link:hover {
    text-decoration: underline;
}

.close-modal {
    position: absolute;
    top: -3px;
    right: -1px;
    background: none;
    border: none;
    color: #707070;
    font-size: 24px;
}

.close-modal:hover {
    color: #ff0000;
    background: none;
    background-color: transparent;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items:center; 
    margin-top: 20px;
    margin-bottom: 20px;
    width: 100%; 
}

#btnReset {
    margin-left: auto;
    margin-right: none;
}

.settings-container {
    position: relative;
    border: 1px solid rgb(229, 156, 37);
    border-radius: 10px;
    padding: 12px 10px 10px;
    flex-grow: 0;
}

.settings-label {
    position: absolute;
    top: -10px;
    left: 50%;
    border-radius: 5px;
    transform: translateX(-50%);
    background-color: #f0f8f1;
    padding: 0 10px;
    font-size: 14px;
    font-weight: bold; 
}

.settings-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

#modalAjustes .modal-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

#ajustesList {
    flex-grow: 1;
}

.ajuste-btn {
    width: 100%;
    padding: 8px 12px;
    margin: 5px 0;
    background-color: #ffeeb5;
    color:var(--color-text);
    border: none;
    text-align: left;
    cursor: pointer;
}

.ajuste-btn:hover {
    background-color: #ffe680;
}

/* Media queries */
@media screen and (max-height: 450px) and (orientation: portrait) {
    #sideMenu {
        padding-top: 15px;
    }
    #sideMenu a {
        font-size: 18px;
    }           
    #listaRecetario .modal-info-content {
        width: 95%;
        height: 95%;
        margin: auto;
    }
}

@media (max-width: 600px) {
    .block {
        width: 48%;
    }
    .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
    .btn-group {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-group button {
        width: 100%;
        margin-bottom: 10px;
    }
    .footer-links {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-links a {
        margin: 5px 0;
    }
}btn {
    flex-shrink: 0;
    background: #dc6460;
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    margin-left: 10px;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    align-content: center;
    padding-top: 7px;
    margin-right: 0;
}

.close-btn-cambiar {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 18px;
    cursor: pointer;
}

.close-btn:hover {
    color: white;
    background-color: #c9302c
}

/* Totales generales */
#totalesGenerales {
    background-color: #fde1ae;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    margin-bottom: none;
    font-weight: bold;
    font-size: 18px;
    color: var(--color-text);
    line-height: 1.6;
}

#notaInsulinaOrientativa {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 5px;
    /* margin-bottom: 80px; */
    max-width: 700px;
    /* margin-left: auto; */
    margin-right: auto;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    margin-top: 5px;
    font-size: 1.1rem;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 13px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

#logo {
    width: 100%;
    height: auto;
}

/* Modal tabla de alimentos */
#listaRecetario .modal-info-content {
    background-color: #fefefe;
    margin: 5% auto;
    width: 80%;
    max-width: 600px;
    height: 80vh;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
}

#listaRecetario .modal-header {
    padding: 10px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f0f8f1;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

#listaRecetario .modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.3em;
}

#listaRecetario .close-info {
    color: #000000;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

#listaRecetario .close-info:hover,
#listaRecetario .close-info:focus {
    color: #808080;
    text-decoration: none;
}

#listaRecetario .modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

#listaRecetario table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    flex-grow: 1;
    margin-bottom: 10px;
}

#listaRecetario th, #listaRecetario td {
    padding: 10px 15px;
    border: 1px solid #ddd;
    text-align: center;
    font-size: 14px;
    width: 33.33%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    max-height: 3em;
}

#listaRecetario th {
    background-color: var(--color-primary);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

#listaRecetario th:nth-child(1), #listaRecetario td:nth-child(1) {
    width: 50%;
}

#listaRecetario tr:hover {
    background-color: #f5f5f5;
}

#listaRecetario .table-footer {
    margin-top: 10px;
    font-size: 0.8em;
    color: #666;
    padding: 10px 0;
}

.btn-group {
    display: flex;
    justify-content: flex-end;
    background-color: white;
    padding: 20px;
    z-index: 101;
    position: sticky;
    bottom: 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

#listaRecetarioContainer {
    overflow-y: auto;
    flex-grow: 1;
}

#botonAgregar {
    background-color: var(--color-button-disabled);
    color: var(--color-text-disabled);
    cursor: not-allowed;
}

#botonAgregar.activo {
    background-color: var(--color-primary);
    color: white;
    cursor: pointer;
}

#botonAgregar.activo:hover {
    background-color: var(--color-secondary);
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    width: 300px;
    max-width: 80%;
    text-align: center;
    border-radius: 10px;
    position: relative;
}

.modal-buttons {
    margin-top: 20px;
}

.modal-buttons button {
    margin: 0 10px;
    width: 80px;
}

.info-button {
    display: inline-block;
    width: 22px;
    height: 22px;
    background-color: #71c3cb;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    text-align: center;
    line-height: 24px;
    cursor: pointer;
    margin-left: 1px;
    padding: 0;
    font-family: 'Courier New', Courier, monospace;
    vertical-align: super;
}

.advertencia-racion {
    font-size: 0.9em;
    color: #d9534f;
    text-align: center;
}

.racion-box {
    background-color: #ffc963;
    color:rgb(0, 0, 0);
    padding: 8px 8px;
    margin-right: 0px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s, transform 0.1s;
    display: inline-block;
}

.racion-box:hover {
    background-color: #fae67a; 
}

.orange-text {
    color: #efa41a;
}

.orange-border {
    border-color: #efa41a;
}

.info-button:hover {
    background-color: #20b098;
}

.disabled-tooltip {
    position: relative;
    cursor: not-allowed;
}

.disabled-tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 13px;
}

.disabled-tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.modal-info {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}

.modal-info-content {
    background-color: #fefefe;
    width: 80%;
    max-width: 600px;
    max-height: 80%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-info-content .modal-header {
    padding: 10px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f0f8f1;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.modal-info-content .modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.3em;
}

.close-info {
    color: #000000;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-info:hover,
.close-info:focus {
    color: #808080;
    text-decoration: none;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-body p, .modal-body ul, .modal-body ol {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.modal-body ul, .modal-body ol {
    padding-left: 20px;
}

.modal-info h2 {
    color: #333;
    margin-bottom: 15px;
}

.modal-info p, .modal-info ul, .modal-info ol {
    color: #666;
    line-height: 1.6;
}

.modal-info ul, .modal-info ol {
    padding-left: 20px;
}

#modalRatioInsulina .ratio-inputs small {
    display: block;
    font-size: 0.8em;
    color: #666;
    margin-top: 2px;
}

#btnAceptarRatio {
    margin-top: 10px;
    padding: 5px 10px;
    background-color: var(--color-primary);
    color: white;
    border: none;
    /* border-radius: 4px; */
    cursor: pointer;
}

#btnAceptarRatio:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#infoModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

#infoModal .modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 300px;
    text-align: center;
    border-radius: 10px;
    position: relative;
}

#infoModal .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 18px;
    cursor: pointer;
}

#infoModal .close-btn:hover {
    color: var(--color-primary);
}

.autocomplete-items {
    position: absolute;
    border: 1px solid #d4d4d4;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background-color: white;
    box-sizing: border-box;
    display: none;
}

.autocomplete-items:empty {
    border: none;
    box-shadow: none;
}

.autocomplete-items div {
    padding: 10px 15px;
    cursor: pointer;
    background-color: #fff;
    border-bottom: 1px solid #d4d4d4;
    line-height: 1.5;
}

.autocomplete-items div:hover,
.autocomplete-items div.autocomplete-active {
    background-color: #e9e9e9;
}

.ratio-inputs {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.ratio-inputs input {
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    margin: 0 10px;
}

.ratio-inputs span {
    font-size: 24px;
    font-weight: bold;
}

#ratioResultado {
    font-weight: bold;
    margin-top: 20px;
}

.table-footer {
    font-size: 0.8em;
    color: #666;
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: left;
    font-style: italic;
}

.table-footer p {
    margin: 2px 0;
}

/* Header y menú */
#menuButton {
    position: fixed;
    top: 16px;
    left: 20px;
    cursor: pointer;
    z-index: 1000;
    transition: opacity 0.3s ease, transform 0.3s ease;
    margin-right: 20px;
}

#menuButton.hidden {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

.menu-line {
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    margin: 5px 0;
}

#header {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2a6573;
    padding: 10px 20px;
    position: fixed;
    top: 0px;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 40px;
    padding-bottom: 12px;
    gap:10px;
}

#logo {
    /* height: 20px; */
    width: auto;
    /* margin: 10px; */
}

.logo-title-container {
    display: flex;
    align-items: center;
    margin: 10px;
}

.menu-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #e1e1e1;
    margin-bottom: 20px;
}

.close-menu-btn {
    font-size: 30px;
    background: none;
    border: none;
    color: #818181;
    cursor: pointer;
    padding: 0;
    margin-right: 15px;
    line-height: 1;
}

.close-menu-btn:hover {
    color: #f7af08;
    background-color: transparent; 
}

.menu-title {
    margin: 0;
    flex-grow: 1;
}

#sideMenu {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1001;
    top: 0;
    left: 0;
    background-color: #fff;
    overflow-x: hidden;
    transition: 0.15s;
    padding-top: 10px;
    white-space: nowrap;
}

#sideMenu .menu-title {
    border-bottom: none;
    padding-bottom: 0;
}

#sideMenu a {
    padding: 18px 32px;
    text-decoration: none;
    font-size: 18px;
    color: #818181;
    display: block;
    transition: 0.15s;
}

#sideMenu a:hover {
    color: #f7af08;
}

#contenidoMenu {
    transition: margin-left .25s;
    padding: 20px;
}

#contenidoMenu h2 {
    margin-bottom: 15px;
}

#contenidoMenu p, #contenidoMenu ul, #contenidoMenu ol {
    margin-bottom: 10px;
}

#contenidoMenu li {
    margin-left: 20px;
}

#header img {
    height: 40px;
    margin-left: 60px;
    margin-top: 6px;
}

.sort-icon {
    font-size: 0.8em;
    margin-left: 5px;
}

html, body {  
    height: 100%;
}

/* Footer */
#mainFooter {
    background-color: #2a6573;
    color: #ffffff;
    padding: 20px 0;
    margin-top: auto;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.footer-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
    align-items: center;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #f7af08;
}

.footer-info {
    text-align: center;
    font-size: 12px;
}

.pwa-install-entry {
    background: transparent;
    border: 1px solid #cfd9d6;
    color: var(--color-text);
    border-radius: 18px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s, opacity .2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Activo: visualmente destacado */
.pwa-install-entry.is-active {
    background: var(--color-primary);
    background: #ffc963;
    border-color: var(--color-primary);
}

.pwa-install-entry.is-active:hover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
}

/* Inactivo: deshabilitado */
.pwa-install-entry.is-disabled,
.pwa-install-entry[disabled],
.pwa-install-entry[aria-disabled="true"] {
    opacity: 0.1;
    cursor: not-allowed;
    pointer-events: none;
}


.pwa-install-entry.is-disabled {
  opacity: 0.4 !important;
  background: transparent !important;
  border-color: rgba(207, 217, 214, 0.6) !important;
  color: rgba(255, 255, 255, 0.6) !important;
}


/* Botón de cerrar tarjeta - estilos específicos */
.close-btn-tarjeta {
    flex-shrink: 0;
    background: #dc6460;
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    /* margin-left: 10px; */
    display: flex;
    justify-content: center;
    align-items: center;
    align-content: center;
    padding-top: 7px;
    margin-right: 0;
    border-radius: 6px;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.close-btn-tarjeta:hover {
    background-color: #c9302c;
    transform: scale(1.05);
}

.close-btn-tarjeta:active {
    transform: scale(0.95);
}

.close-btn-tarjeta:focus {
    outline: 2px solid #c9302c;
    outline-offset: 2px;
}

/* Banner de cookies */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #2c3e50;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    display: flex;
    align-items: center;
    flex-grow: 1;
    gap: 20px;
}

.cookie-banner-text {
    font-size: 14px;
    line-height: 1.4;
}

.cookie-banner-button {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

.cookie-banner-button:hover {
    background-color: var(--color-secondary);
}

/* Banner de cookies - actualizado */
.cookie-banner-buttons {
    display: flex;
    gap: 10px;
}

.cookie-banner-button.cookie-accept {
    background-color: var(--color-primary);
}

.cookie-banner-button.cookie-accept:hover {
    background-color: var(--color-secondary);
}

.cookie-banner-button.cookie-reject {
    background-color: transparent;
    border: 1px solid #ccc;
    color: #ccc;
}

.cookie-banner-button.cookie-reject:hover {
    background-color: #f5f5f5;
    color: #333;
    border-color: #999;
}

.cookie-link {
    color: #7ad0b9;
    text-decoration: underline;
    margin-left: 5px;
}

.cookie-link:hover {
    color: white;
}

@media (max-width: 600px) {
    .cookie-banner-buttons {
        width: 100%;
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .cookie-banner-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .cookie-banner-button {
        width: 100%;
    }
}

/* Banner de patrocinadores */
.sponsor-banner {
    background: linear-gradient(135deg, #148882 0%, #20b098 100%);
    background: #ffc61f;
    /* color: white; */
    padding: 20px 0;
    margin-top: 40px;
    margin-bottom: 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    /* border-top: 7px solid #ffc963; */
    /* border-bottom: 7px solid #ffc963; */
}

.sponsor-banner-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.sponsor-banner-title {
    font-size: 1.4em;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    color: white;
}

.sponsor-banner-subtitle {
    font-size: 1em;
    margin: 0;
    opacity: 0.9;
    line-height: 1.4;
}

.sponsor-banner-cta {
    background-color: #ffc963;
    background-color: #ffdf00;
    background-color: white;
    color: #2c3e50;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 0.8em;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sponsor-banner-cta:hover {
    background-color: #fae67a;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    color: #2c3e50;
    text-decoration: none;
}

.sponsor-banner-cta:active {
    transform: translateY(0);
}

.sponsor-banner-icon {
    font-size: 1.2em;
}

/* Variante con logo de empresa */
.sponsor-banner-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.sponsor-logo-placeholder {
    width: 120px;
    height: 40px;
    background-color: rgba(255,255,255,0.2);
    border: 2px dashed rgba(255,255,255,0.4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    color: rgba(255,255,255,0.7);
    transition: all 0.3s ease;
}

.sponsor-logo-placeholder:hover {
    background-color: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.6);
}

/* Animación sutil */
@keyframes gentle-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* .sponsor-banner-cta {
    animation: gentle-pulse 3s ease-in-out infinite;
} */

.sponsor-banner-cta:hover {
    animation: none;
}

/* Responsive */
@media (max-width: 600px) {
    .sponsor-banner {
        padding: 15px 0;
        margin-top: 30px;
    }
    
    .sponsor-banner-content {
        gap: 12px;
    }
    
    .sponsor-banner-title {
        font-size: 1.2em;
    }
    
    .sponsor-banner-subtitle {
        font-size: 0.9em;
    }
    
    .sponsor-banner-cta {
        padding: 10px 20px;
        font-size: 0.8em;
    }
    
    .sponsor-banner-logos {
        gap: 15px;
    }
    
    .sponsor-logo-placeholder {
        width: 100px;
        height: 35px;
        font-size: 0.7em;
    }
}

/* Botones de ajuste específicos - versión corregida */
.boton-mas {
    width: 32px;
    height: 32px;
    /* background: linear-gradient(135deg, #28a745 0%, #20c997 100%); */
    /* color: white; */
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
    margin-left: 3px;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
    font-family: Arial, sans-serif; /* Fuente más consistente */
    padding: 0; /* Eliminar padding */
    vertical-align: middle; /* Alineación vertical */
}

/* .boton-mas::before {
    content: "+";
    display: block;
    line-height: 1;
    transform: translateY(-1px); 
} */

.boton-menos {
    width: 32px;
    /* height: 100%; */
    /* background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%); */
    /* color: white; */
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
    margin-left: 3px;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
    font-family: Arial, sans-serif; /* Fuente más consistente */
    padding: 0; /* Eliminar padding */
    vertical-align: middle; /* Alineación vertical */
}

/* .boton-menos::before {
    content: "−"; 
    display: block;
    line-height: 1;
    transform: translateY(-1px); 
} */

/* Estados hover y disabled siguen igual */
/* .boton-mas:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
} */

/* .boton-mas:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(40, 167, 69, 0.3);
} */

.boton-mas:disabled {
    background: #c6d4dd;
    cursor: not-allowed;
    color: #6c757d;
    transform: none;
    box-shadow: none;
}

/* .boton-menos:hover {
    background: linear-gradient(135deg, #c82333 0%, #dc2626 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
} */

/* .boton-menos:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(220, 53, 69, 0.3);
} */

.boton-menos:disabled {
    background: #c6d4dd;
    cursor: not-allowed;
    color: #6c757d;
    transform: none;
    box-shadow: none;
}

/* Estilos para el botón de donación en el footer */
.donate-link {
    display: flex !important;
    align-items: center;
    gap: 15px;
    /* background: linear-gradient(135deg, #ffc963 0%, #fae67a 100%); */
    background: #20b098;
    background: white;
    color: #2c3e50 !important;
    padding: 8px 12px;
    border-radius: 20px;
    text-decoration: none !important;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.donate-link:hover {
    background: linear-gradient(135deg, #fae67a 0%, #f4c266 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    color: #2c3e50 !important;
}

.pizza-icon {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* Estilos para el modal de donación */
.donation-content {
    text-align: center;
}

.donation-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.donation-content ul {
    text-align: left;
    margin: 15px 0;
    padding-left: 20px;
}

.donation-content li {
    margin-bottom: 8px;
}

.donation-button-container {
    margin: 25px 0;
    display: flex;
    justify-content: center;
}

.paypal-donate-button {
    display: inline-block;
    transition: transform 0.2s ease;
}

.paypal-donate-button:hover {
    transform: scale(1.05);
}

.paypal-button-image {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.donation-note {
    color: #666;
    font-style: italic;
    margin-top: 20px;
}

.pwa-install-row {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 15px 0;
    text-align: center !important;
    width: 100% !important;
}

/* Responsive para el footer */
@media (max-width: 600px) {
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .donate-link {
        order: -1; 
        margin-bottom: 10px;
    }
    
    .pizza-icon {
        width: 18px;
        height: 18px;
    }

    .pwa-install-row {
        margin: 10px 0;
        align-content: center;
        align-items: center;
    }
    
    .pizza-emoji {
        width: 18px;
        /* height: 18px; */
    }


}
.pizza-emoji {
    font-size: 20px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* Botón "Instalar app" (PWA) — estados activo/inactivo */
/* .pwa-install-entry {
  background: transparent;
  border: 1px solid #cfd9d6;
  color: var(--color-text);
  border-radius: 18px;
  padding: 8px 14px;
  margin-top: 15px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, opacity .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;

} */

/* Activo: visualmente destacado */
.pwa-install-entry.is-active {
  background: var(--color-primary);
  background: #ffc963;
  border-color: var(--color-primary);
  /* color: #fff; */
}
.pwa-install-entry.is-active:hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
}

/* Inactivo: deshabilitado */
.pwa-install-entry.is-disabled,
.pwa-install-entry[disabled],
.pwa-install-entry[aria-disabled="true"] {
  opacity: 0.1;
  cursor: not-allowed;
  pointer-events: none;
}



/* Selector de idioma */
.language-selector {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

#languageSelect {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 70px;
}

#languageSelect:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
}

#languageSelect:focus {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.7);
}

#languageSelect option {
    background: #2a6573;
    color: white;
    padding: 5px;
    font-weight: 500;
}

/* Estilos para las banderas */
.fi {
    width: 16px;
    height: 12px;
    margin-right: 5px;
    display: inline-block;
    vertical-align: middle;
}

#languageSelect {
    min-width: 85px;
}


/* Ajuste del header para acomodar el selector */
#header {
    /* position: relative; */
    padding-right: 100px; /* Espacio para el selector */
}

/* Responsive para el selector de idioma */
@media (max-width: 600px) {
    .language-selector {
        right: 15px;
    }
    
    #languageSelect {
        padding: 4px 8px;
        font-size: 12px;
        min-width: 60px;
    }
    
    #header {
        padding-right: 80px;
    }
}

@media (max-width: 400px) {
    .language-selector {
        right: 10px;
    }
    
    #languageSelect {
        padding: 3px 6px;
        font-size: 11px;
        min-width: 50px;
    }
    
    #header {
        padding-right: 70px;
    }
}

/* Contenido SEO discreto en el footer */
.seo-footer-content {
    margin: 25px 0 20px 0;
    padding: 20px 0;
    /* border-top: 1px solid rgba(255, 255, 255, 0.1); */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-top: -15px;
}

.seo-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.seo-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    margin: 0 0 12px 0;
}

.seo-keywords {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.seo-keywords span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.seo-keywords span:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

/* Responsive para el contenido SEO */
@media (max-width: 600px) {
    /* .seo-footer-content {
        margin: 20px 0 15px 0;
        padding: 12px 0;
    } */
    
    .seo-title {
        font-size: 15px;
    }
    
    .seo-description {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .seo-keywords {
        gap: 6px;
    }
    
    .seo-keywords span {
        font-size: 10px;
        padding: 2px 6px;
    }
}

.campo-personalizado {
    margin: 15px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.campo-personalizado label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.campo-personalizado input {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
}

.campo-personalizado span {
    margin-left: 8px;
    color: #666;
    font-weight: 500;
}

.campo-personalizado input:focus {
    outline: none;
    border-color: #148882;
    box-shadow: 0 0 0 2px rgba(20, 136, 130, 0.2);
}

