/*
#######################################
 GENERAL
#######################################
*/

html,
body {
    overscroll-behavior: none;
}

.section--full-height-center {
    min-height: calc(100dvh - 80px);
    display: flex;
    justify-content: center;
    align-items: center;
}


.section--full-height {
    min-height: calc(100dvh - 80px);
    /* margin-top: 100px; */
    padding-top: 200px;
    padding-bottom: 100px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

body.is--white-bg {
    background-color: white;
    color: var(--black-color);
}

body.is--black-bg {
    background-color: var(--black-color);
    color: white;
}

body.is--yellow-bg {
    background-color: var(--primary-color);
    color: var(--black-color);
}

body.is--white-bg .logo--white,
body.is--yellow-bg .logo--white {
    display: none;
}

body.is--white-bg .logo--black,
body.is--yellow-bg .logo--black {
    display: block;
}

body.is--black-bg .logo--white {
    display: block;
}

body.is--black-bg .logo--black {
    display: none;
}

section.section {
    display: none;
}

section.section.active {
    display: flex;
    flex-direction: column;
}



/*
#######################################
 HEADER
#######################################
*/
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99;
}

body.is--white-bg .header {
    background-color: white;
}

body.is--black-bg .header {
    background-color: var(--black-color);
}


/*
#######################################
 IDIOMAS
#######################################
*/
.traducible>* {
    display: none;
}

body[data-lang="es"] .traducible .es {
    display: block;
}

body[data-lang="en"] .traducible .en {
    display: block;
}

body[data-lang="eu"] .traducible .eu {
    display: block;
}

body[data-lang="fr"] .traducible .fr {
    display: block;
}

.lang {
    position: relative;
    width: 50px;
    height: 50px;
    cursor: pointer;
}

/* Todas las banderas ocultas por defecto */
/* Todas las banderas superpuestas por defecto */
.lang img {
    position: absolute;
    left: 0;
    top: 0;
    display: none;
    width: 50px;
    height: 50px;
    border-radius: 999px;
    object-fit: cover;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    z-index: 2;
    /* por encima del fondo que pondremos con ::before */
}

/* Solo la activa visible cuando el selector está cerrado */
.lang img.is-active {
    display: block;
}

.lang[data-open="true"] img {
    display: block;
}

.lang[data-open="true"] img:nth-child(1) {
    top: 0;
}

.lang[data-open="true"] img:nth-child(2) {
    top: 60px;
}

.lang[data-open="true"] img:nth-child(3) {
    top: 120px;
}

.lang[data-open="true"] img:nth-child(4) {
    top: 180px;
}

/* Fondo “pill” detrás de las banderas cuando está abierto */


/* Un poquito de hover */
.lang[data-open="true"] img:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    opacity: 1;
}

/* Opcional: las no activas un poco más apagadas */
/* .lang[data-open="true"] img:not(.is-active) {
    opacity: 0.8;
}
 */



/*
#######################################
 FORMULARIO
#######################################
*/
progress#progress-form {
    width: 100%;
    height: 18px;
    margin-top: 20px;
}

progress#progress-form {
    border-radius: 50px;
}

progress#progress-form::-webkit-progress-bar {
    background-color: #f1f1f1;
    border-radius: 50px;
}

progress#progress-form::-webkit-progress-value {
    background-color: var(--primary-color);
    border-radius: 50px;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

/* Ocultamos el radio pero sigue siendo accesible */
.card--radio>input[type="radio"] {
    position: absolute;
    inset: 0;
    /* ocupa todo el contenedor .card */
    opacity: 0;
    pointer-events: none;
    /* el click se lo lleva el label */
}

/* El label hace de “card clicable” */
.card--radio>label {
    position: relative;
    display: flex;
    flex-flow: column wrap;
    gap: 10px;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 10px;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.1s ease;
    height: 100%;
}

/* HOVER */
.card--radio>label:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* ACTIVE */
.card--radio>label:active {
    transform: translateY(0);
    transform: scale(0.99);
}

/* FOCUS */
.card>input[type="radio"]:focus-visible+label {}

/* SELECCIONADO */
.card--radio>input[type="radio"]:checked+label {
    border: 2px solid var(--primary-color);
    background-color: #f5f5f5;
}

/* OPCIONAL: estado deshabilitado, por si lo usas en algún momento */
.card--radio>input[type="radio"]:disabled+label {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

.card--radio>label img {
    max-width: 300px;
    width: 100%;
    height: 200px;
    object-fit: contain;
    text-align: center;
    margin: 0 auto;
}

.card--radio>label img.icon-coffee {
    position: absolute;
    top: 40px;
    right: 10px;
    width: 60px;
    height: 60px;
}

.title__price {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 5px;
}

.title__price h2 {
    flex-basis: calc(70% - 5px);
    text-align: left;
}

.title__price p {
    flex-basis: calc(30% - 5px);
    text-align: right;
}

.seleccion--final {
    margin: 70px 0;
}

.card__resumen {
    text-align: center;
}


.card__resumen .imagen {
    position: relative;
    width: 100%;
}

.card__resumen img {
    width: 300px;
    height: auto;
}

.card__resumen img.icon-coffee {
    position: absolute;
    top: 0;
    left: calc(50% + 180px);
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
}

.card__resumen img.icon-latteart {
    position: absolute;
    top: 100px;
    left: calc(50% + 180px);
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
}

.card__resumen .descripcion {
    margin-top: 20px;
}

.buttons--form {
    background-color: white;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 60px;
}


/*
#######################################
 LOADER
#######################################
*/
.loader {
    width: 50px;
    margin: 0 auto;
    aspect-ratio: 1;
    display: grid;
    border-radius: 50%;
    background:
        linear-gradient(0deg,
            rgb(255 217 39 / 50%) 30%,
            #0000 0 70%,
            rgb(255 217 39 / 100%) 0) 50%/8% 100%,
        linear-gradient(90deg,
            rgb(255 217 39 / 25%) 30%,
            #0000 0 70%,
            rgb(255 217 39 / 75%) 0) 50%/100% 8%;
    background-repeat: no-repeat;
    animation: l23 1s infinite steps(12);
}

.loader::before,
.loader::after {
    content: "";
    grid-area: 1/1;
    border-radius: 50%;
    background: inherit;
    opacity: 0.915;
    transform: rotate(30deg);
}

.loader::after {
    opacity: 0.83;
    transform: rotate(60deg);
}

@keyframes l23 {
    100% {
        transform: rotate(1turn)
    }
}





/*
#######################################
 RESUMEN PAGO
#######################################
*/
#preparar-pago .resumen {
    max-width: 300px;
    margin: 50px auto !important;
    background-color: #333;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
}

#preparar-pago .resumen img {
    max-width: 120px;
    margin: 0;
}



/*
#######################################
 REGISTRO
#######################################
*/
form#register .button {
    margin: 0 auto;
}

.kiosko--registrado {
    background-color: var(--primary-color);
    max-width: 500px;
    border-radius: 20px;
    padding: 20px;
    display: none;
}




/*
#######################################
 BOTONES INFERIORES
#######################################
*/
.total--pedido {
    position: absolute;
    right: calc(280px + 50px);
    top: 50%;
    transform: translateY(-50%);
}

#preparar-pago .total--pedido {
    position: relative;
    top: inherit;
    right: inherit;
    transform: none;
    background-color: transparent;
    max-width: 100%;
}