*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --legacy-color-primary : #035026;
    --legacy-color-secundary: #fcd565;
    
}

a {
    color: var(--legacy-color-primary);
}

ul li {
  margin-bottom: 7px;
}

h3 {
    margin-block-end: 0!important;
}

html, body {
    height: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e8f0ee 0%, #f6faf9 100%);
}

#dias_sueltos input,
#intolerancia_alimentaria input {
    display: inline!important;
    width: 24px!important;
}



/* Global stylings */

label {
    display: block;
    margin-bottom: 0.5rem;
}

input, select {
    display: block;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 0.25rem;
}



.ml-auto {
    margin-left: auto;
}


/* Form */

.form {
    background-color: white;
    width: clamp(320px, 30%, 430px);
    margin: 0 auto;
    border: 1px solid #ccc;
    border-radius: 0.35rem;
    padding: 1.5rem;
    z-index: 1;
}

.input-group {
    margin: 0.5rem 0;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    transform-origin: top;
    animation: animate .5s;
}


/* Button */
.btn-group {
    display: flex;
    justify-content: space-between;
}

.btn {
    padding: 0.75rem;
    display: block;
    text-decoration: none;
    width: min-content;
    border-radius: 5px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-next {
    background-color: var(--legacy-color-primary);
    color: white;
    float: right;
}

.btn-prev {
    background-color: #777;
    color: #fff;
}

.btn:hover {
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--legacy-color-primary);
}

.btn-next, .btn-prev {
    font-size: 1.2rem !important;
}



/* Prefixes */

.input-box {
    display: flex;
    align-items: center;
    /* max-width: 300px; */
    background: #fff;
    border: 1px solid #a0a0a0;
    border-radius: 4px;
    padding-left: 0.5rem;
    overflow: hidden;
    font-family: sans-serif;
}

.input-box .prefix {
    font-weight: 300;
    font-size: 14px;
    color: rgb(117, 114, 114);
}

.input-box input {
    border: none;
    outline: none;
}

.input-box:focus-within {
    border-color: #777;
}

/* End Prefixes */


/* Progress bar */

.progress-bar {
    position: relative;
    display: flex;
    justify-content: space-between;
    counter-reset: step;
    margin-bottom: 30px;
}

.progress-bar::before,
.progress {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    width: 100%;
    background-color: #dcdcdc;
    z-index: -1;
}

.progress {
    background-color: var(--legacy-color-primary);
    width: 0;
    transition: .5s;
}

.progress-step {
    width: 35px;
    height: 35px;
    background-color: #dcdcdc;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-step::before {
    counter-increment: step;
    content: counter(step);
}

.progress-step::after {
    content: attr(data-title);
    position: absolute;
    top: calc(100% + 0.20rem);
    font-size: 0.85rem;
    color: black !important;
}

.progress-step.active {
    background-color: var(--legacy-color-primary);
    color: white;
}

@keyframes animate {
    from {
        transform: scale(1, 0);
        opacity: 0;
    }

    to {
        transform: scale(1, 1);
        opacity: 1;
    }
}

/* End Progress bar */

/* Add Experience Btn */


.add-exp-btn {
    color: --legacy-color-primary;
    border-right: 2px solid --legacy-color-primary;
    border-bottom: 2px solid --legacy-color-primary;
    padding: 0 10px 10px 0;
    text-decoration: none;
    font-weight: 600;
    border-bottom-right-radius: 6px;
    cursor: pointer;
}

.add-experience {
    margin-bottom: 20px;
}

.btn-container {
    flex-direction: row!important;
    justify-content: space-around;
}


.thumb {
    width: 100%;
    height: 180px;
    background-image: url(./img/thumb.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 0;
    margin: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
  .thumb { height: 150px; }
  .form-content { padding: 12px; }
}
@media (max-width: 480px) {
  .thumb { height: 150px; }
  .form-content { padding: 6px; }
}

/* --- ESTILOS MIGRADOS DE form.html --- */

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255,255,255,0.85);
    justify-content: center;
    align-items: center;
    z-index: 99999;
    pointer-events: all;
    transition: background 0.2s;
}

.loader {
    width: 64px;
    height: 64px;
    border: 8px solid #e0e0e0;
    border-top: 8px solid #266251;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 2px 8px rgba(39,79,90,0.12);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

body.loading {
    overflow: hidden;
    pointer-events: none;
}

body.loading .overlay {
    display: flex !important;
}

.container {
    display: flex;
    justify-content: center;
    flex-direction: column;
    max-width: 350px;
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    height: auto;
    min-height: 0;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
}
.step {
    display: none;
    width: 100%;
    box-sizing: border-box;
}
.step.active {
    display: block;
}
button {
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.error-message {
    display: none;
    color: red;
    font-size: 14px;
    font-weight: bold;
    margin-top: 4px;
}

/* MODALES */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: relative;
    margin: 7% auto;
    padding: 28px 0px 20px 0px;
    background-color: white;
    text-align: center;
    border-radius: 8px;
}

.modal-content-qr {
    position: relative;
    margin: 7% auto;
    padding: 28px 0px 20px 0px;
    background-color: white;
    text-align: center;
    border-radius: 8px;
}

.responsive-image {
    background-image: url('./img/ofrenda.jpg');
    width: 333px;
    height: 70vh;
    margin-bottom: 15px;
    background-size: cover;
    position: relative;
    justify-self: center;
}

.responsive-image-menu {
    background-image: url('./img/menu.jpg');
    width: 333px;
    height: 70vh;
    margin-bottom: 15px;
    background-size: cover;
    position: relative;
    justify-self: center;
}

.modal-content-qr .information {
    display: flex;
    justify-content: center;
    flex-direction: column-reverse;
    align-items: center;
}

.modal-content-qr .information p {
    justify-self: flex-start;
    margin-left: 25px;
    display: flex;
    flex-direction: column;
    overflow: auto;
    max-width: 157px;
}

.modal-content-qr .information p strong {
    align-self: flex-start;
}

#summaryContainer {
    display: grid;
    grid-template-columns: repeat(2, minmax(200px, 1fr));
    gap: 10px;
    width: 100%;
    align-items: initial;    
}

.modal-content-qr .button-container {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding-right: 15px;
    padding-top: 20px;
}

.qr-uuid-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-bottom: 20px;
}

/* Media Query para Escritorio */
@media (min-width: 1024px) {
    .modal-content {
        max-width: 1100px;
        margin-top: 1%;
        margin-left: auto;
        margin-right: auto;
    }
    .modal-content-qr {
        max-width: 800px;
        margin-top: 1%;
        margin-left: auto;
        margin-right: auto;
    }
    .responsive-image {
        width: 900px;
        height: 500px;
        margin: 3% auto;
        background-image: url('./img/ofrenda-pc.jpg');
    }
    .responsive-image-menu {
        width: 275px;
        height: 500px;
        margin: 3% auto;
        background-image: url('./img/menu.jpg');
    }
    .modal-content-qr .information {
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-start;
    }
    #summaryContainer {
        grid-template-columns: 1fr 1fr;
        width: 66%;
    }
    #qrCodeContainer {
        height: auto!important;
        width: 258px!important;
    }
}

/* --- FIN ESTILOS MIGRADOS --- */

/* Clases utilitarias para pasos y formularios */
.flex-col-mb30 {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}
.flex-col-mb30-overflow {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
    overflow-y: scroll;
}
.align-items-flex-start {
    align-items: flex-start;
}
.mt-12 {
    margin-top: 12px;
}
.mt-18 {
    margin-top: 18px;
}
.mt-6 {
    margin-top: 6px;
}

/* Puedes seguir usando las clases anteriores en los divs de los pasos para evitar estilos inline */
  /* Estilos para el modal de carga */
         .overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(255, 255, 255, 0.7);
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }

        .loader {
            border: 8px solid #f3f3f3;
            border-top: 8px solid #3498db;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Estilos para mejorar la apariencia del formulario */
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            background-color: #f4f4f4;
        }
        .container {
            display:flex;
            justify-content:flex-start;
            flex-direction: column;
            max-width: 350px;
            margin-top: 20px;
            background-color: #fff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            height: auto;
            min-height: 0;
            overflow: visible;
            width: 100%;
            box-sizing: border-box;
        }
        .step {
            display: none;
            width: 100%;
            box-sizing: border-box;
        }
        .step.active {
            display: block;
        }
        button {
            border: none;
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;
        }

        .error-message {
            display: none;
            color: red;
            font-size: 14px;
            font-weight: bold;
            margin-top: 4px;
        }

        /*modal imagen */
         .modal {
        display: none;
        position: fixed;
        z-index: 1028;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0, 0, 0, 0.8);
    }

    .modal-content {
        position: relative;
        margin: 7% auto;
        padding: 28px 0px 20px 0px;
        background-color: white;
        text-align: center;
        border-radius: 8px;

    }

       .modal-content-qr {
        position: relative;
        margin: 7% auto;
        padding: 28px 0px 20px 0px;
        background-color: white;
        text-align: center;
        border-radius: 8px;
        }
   

    .responsive-image {
        background-image: url('./img/ofrenda.jpg'); /* Imagen para móvil */
        width: 333px;
        height: 70vh;
        margin-bottom: 15px;
        background-size: cover;
        position: relative;
        justify-self: center;
    }

    .responsive-image-menu {
        background-image: url('./img/menu.jpg'); /* Imagen para móvil */
        width: 333px;
        height: 70vh;
        margin-bottom: 15px;
        background-size: cover;
        position: relative;
        justify-self: center;
    }

    .modal-content-qr .information {
        display: flex;
        justify-content: center;
        flex-direction: column-reverse;
        align-items: center;
    }

    .modal-content-qr .information p {
        justify-self: flex-start;
        margin-left: 25px;
        display: flex;
        flex-direction: column;
        overflow: auto;
        max-width: 157px;
    }

    .modal-content-qr .information p strong {
        align-self: flex-start;
    }

    #summaryContainer {
        display: grid;
        grid-template-columns: repeat(2, minmax(200px, 1fr));
        gap: 10px;
        width: 100%;
        align-items: initial;    
    }

    .modal-content-qr .button-container {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding-right: 15px;
    padding-top: 20px;
  }

  .qr-uuid-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-bottom: 20px;
  }


    /* Media Query para Escritorio */
@media (min-width: 1024px) {

    .modal-content {
        max-width: 1100px; /* Ancho fijo */
        margin-top: 1%; /* Margen superior del 3% */
        margin-left: auto;
        margin-right: auto;
    }

      .modal-content-qr {
        max-width: 800px; /* Ancho fijo */
        margin-top: 1%; /* Margen superior del 3% */
        margin-left: auto;
        margin-right: auto;
    }

    .responsive-image {
    width: 900px; /* Fija el ancho en desktop */
    height: 500px; /* Ajusta la altura si es necesario */
    margin: 3% auto; /* Centra horizontalmente */
    background-image: url('./img/ofrenda-pc.jpg'); /* Imagen para desktop */
  }

    .responsive-image-menu {
    width: 275px; /* Fija el ancho en desktop */
    height: 500px; /* Ajusta la altura si es necesario */
    margin: 3% auto; /* Centra horizontalmente */
    background-image: url('./img/menu.jpg'); /* Imagen para desktop */
  }

  .modal-content-qr .information {
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
  }

  #summaryContainer {
    grid-template-columns: 1fr 1fr;
    width: 66%;
  }

  #qrCodeContainer {
    height: auto!important;
    width: 258px!important;
  }

}

@media (min-width: 900px) {
    /* … */
    .container {
        width: 90vw !important;
        height: auto;
        max-width: unset;
        
    }

    #step-container {
        width: 30vw!important;
    }

    .btn-next {
        font-size: 22px;
    }

    .btn-prev {
        font-size: 22px;
    }

    .container h2 {
        font-size: 30px;
    }

    #step-container .active{
        width: 100%;
    /* justify-content: center; */
    display: flex;
    flex-direction: column;
    align-items: center;
    }

    #step-container .active > div{
        display: flex;
        flex-direction: column;
        /* justify-content: center; */
        align-items: flex-start;
        width: 75%!important;
    }

   

    .container h3{
        font-size: 25px;
    }

    .container .step li {
        font-size: 20px;
    }
  }

textarea {
    resize: none;
    width: 100%;
}

/* Footer */
.footer {
    position: relative;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e0e0e0;
    padding: 15px 0;
    margin-top: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.footer-link {
    color: var(--legacy-color-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 5px 0;
}

.footer-link:hover {
    color: #023d1c;
    text-decoration: underline;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.1);
}

/* Header Logo */
.header-logo {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.header-logo .logo-img {
    width: 55px;
    height: 55px;
    pointer-events: auto;
}

.logo-circle {
    background: rgba(3, 80, 38, 0.85); /* color principal con transparencia */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
}

.logo-img {
    width: 55px;
    height: 55px;
}

.logo-text {
    color: var(--legacy-color-primary);
    font-weight: bold;
    font-size: 18px;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
       
    }
    
    .footer-links {
        justify-content: center;
        gap: 0;
    }
    
    .footer-link {
        font-size: 13px;
    }
    
    .header-logo {
        top: 15px;
        left: 15px;
        gap: 8px;
    }
    
    .header-logo .logo-img {
        width: 40px;
        height: 40px;
    }
    .logo-circle {
        width: 40px;
        height: 40px;
    }
    .logo-img {
        width: 40px;
        height: 40px;
    }
    .logo-text {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .header-logo {
        top: 10px;
        left: 10px;
        gap: 6px;
    }
    .header-logo .logo-img {
        width: 75px;
        height: 75px;
    }
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }
    .footer-link {
        min-width: 33%;
        text-align: center;
        margin-bottom: 2px;
        font-size: 14px;
    }
    .footer-link-full {
        flex-basis: 100%;
        min-width: 100%;
        text-align: center;
        margin-top: 2px;
    }
    .footer-content {
        gap: 0;
    }
    .logo-circle {
        width: 60px;
        height: 60px;
    }
    .logo-img {
        width: 75px;
        height: 75px;
    }
    .logo-text {
        font-size: 14px;
    }
}

#step-container.container {
    flex: 1 0 auto;
    padding: 0;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(39, 79, 90, 0.18), 0 1.5px 8px 0 rgba(39, 79, 90, 0.10);
    overflow: hidden;
}

.hero-thumb {
    width: 100%;
}

.form-content {
    padding: 20px;
}

.grower {
    flex: 1 1 auto;
    min-height: 0;
    background: transparent;
}

@media (max-width: 600px) {
  .grower {
    flex: 6 1 auto;
  }
}

.footer-brand {
    width: 100%;
    text-align: center;
    color: #266251;
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 1px;
    margin-top: 10px;
    opacity: 0.85;
}

#form-closed-banner {
    display: none;
    width: 100%;
    background: linear-gradient(90deg, #ffd600 0%, #ffe066 100%);
    color: #222;
    border-radius: 8px 8px 0 0;
    padding: 16px 0;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(39,79,90,0.08);
    border-top: 3px solid #ffd600;
}

.banner-closed-text {
    color: #222;
    font-weight: bold;
    font-size: 1.1em;
    text-shadow: 0 1px 2px #fff8;
    letter-spacing: 2px;
}

#form-error-banner {
    display: none;
    width: 100%;
    background: linear-gradient(90deg, #ff3b3b 0%, #ff7b7b 100%);
    color: #fff;
    border-radius: 8px 8px 0 0;
    padding: 16px 0;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(39,79,90,0.08);
    border-top: 3px solid #ff3b3b;
}

.banner-error-red {
    color: #fff;
    font-weight: bold;
    font-size: 1.1em;
    text-shadow: 0 1px 2px #0008;
    letter-spacing: 2px;
}

/* Asegura que el modal QR esté por debajo de SweetAlert2 */
#modalQR {
    z-index: 1050 !important;
}

.refresh-btn {
  background: #045d2d;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 1em;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  margin-left: 8px;
}
.refresh-btn:hover {
  background: #067d3b;
  transform: scale(1.05);
}
.refresh-btn:active {
  transform: scale(0.95);
}
.refresh-btn i {
  font-size: 1.1em;
}
.refresh-btn.loading i {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

