/*
 * Estilos para el Plugin Modal Misión
 */


@font-face {
    font-family: 'TT Norms';
    src: url('../fonts/TT_Norms/TTNorms-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'TT Norms';
    src: url('../fonts/TT_Norms/TTNorms-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'TT Norms';
    src: url('../fonts/TT_Norms/TTNorms-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

.modal-mision-content,
.vista-01,
.vista-02,
.vista-03,
.vista-exito {
    font-family: 'TT Norms', Arial, sans-serif;
}

/* 1. El fondo oscuro (Overlay) */
.modal-mision-overlay {
    display: none; /* Oculto por defecto */
    position: fixed; /* Se queda fijo en la pantalla */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Color negro con 70% de opacidad */
    z-index: 1000; /* Se asegura que esté por encima de otros elementos */
    justify-content: center;
    align-items: center;
}
button#btn-participar:disabled, button#btn-aceptar-mision:disabled, button#btn-querer-premio:disabled {
    display: flex;
    min-width: 120px;
    justify-content: center;
    align-items: center;
    border-radius: 14px;
    background: #C1C7CD;
    padding: 16px 24px;
    border: none;
    color: #959ba0ff;
    font-weight: 700;
}
.btn-properties {
    display: flex;
    justify-content: center;
    margin-top: 32px;
    flex-direction: column;
    align-items: center;
}
button#btn-participar, button#btn-aceptar-mision, button#btn-querer-premio, button#btn-entiendo {
    display: flex;
    min-width: 120px;
    justify-content: center;
    align-items: center;
    border-radius: 14px;
    background: #3037e7;
    padding: 16px 24px;
    border: none;
    color: #00ffdc;
    font-weight: 700;
    cursor: pointer;
}
.data-parrafo {font-size: 16px;}
p.data-parrafo a {
    color: var(--Primary, #3037E7);
}

.mision-exito span {
    font-weight: bold;
}

.modal-mision-content {
    background: #fff;
    padding: 32px 56px;
    border-radius: 24px;
   /* height: 510px; */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}
.floating-label-group {
    position: relative;
    margin-bottom: 20px;
}
.floating-label {
    position: absolute;
    left: 12px;
    top: 16px;
    color: #3037E7;
    font-size: 16px;
    pointer-events: none;
    transition: 0.2s ease all;
    background: #fff;
    padding: 0 4px;
}
.rut-input:focus + .floating-label,
.rut-input:not(:placeholder-shown) + .floating-label {
    top: -10px;
    left: 8px;
    font-size: 13px;
    color: #3037E7;
}
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
}
.frame-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: stretch;
}
/* 3. El botón de cierre (la 'X') */
.modal-mision-close {
    display: flex;
    padding: var(--4-px-025-rem, 4px);
    align-items: flex-start;
    gap: var(--0-px-0-rem, 0px);
}
.modal-mision-content-x {
    border-radius: var(--radius-s-05-rem, 8px);
    background: #F4F5F9;
    display: flex;
}

.modal-mision-close:hover {
    color: #ff0000; /* Cambia a color rojo al pasar el mouse */
}

/* 4. Clase para mostrar el modal con una animación suave */
.modal-mision-overlay.visible {
    display: flex; /* Cambia a flex para mostrarlo y centrar el contenido */
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-steps {
    display: flex;
    align-items: flex-start;
    align-self: stretch;
    margin: 32px 0px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
}
.checkbox-container {
    position: relative;
    display: flex;
	margin-top: 15px;
}

.checkbox-container input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 25px;
    height: 20px;
    border: 2px solid #3037E7;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    margin-right: 10px;
    background: #fff;
    transition: box-shadow 0.2s;
    position: relative;
}

.checkbox-container input[type="checkbox"]:checked {
    background-color: #3037E7;
    border-color: #3037E7;
}

.checkbox-container input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 3px;
    width: 5px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 89px;
    transform: translateY(-50%);
    width: 80px;
    height: 2px;
    background-color: #e0e0e0;
    z-index: 1;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid;
    color: #A2A9B0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 5px;
    position: relative;
    z-index: 2;
}

.step.active .step-number {
    background-color: #F4F5F9;
    color: #3037E7;
    border: 2px solid;
}

.step-title {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.step.active .step-title {
    color: #007bff;
    font-weight: bold;
}

.step.completed .step-number {
    background-color: #F4F5F9;
    color: #3037E7;
}

.step.completed .step-title {
    color: #28a745;
}

/* Estilos para los premios */
.premio-combustible {
    display: flex;
    justify-content: space-between;
}
.mensaje-validacion-rut{
    font-size: 16px;
    margin-top: 4px;
    text-align: center;
}

/* Linear Progress Indicator - Material Design */
/* 1. Track - Contenedor con color de fondo */
.linear-progress {
    position: relative;
    width: 100%;
    height: 4px;
    margin-top: 8px;
    background-color: #C8D1FF; /* Color claro del track (azul muy claro) */
    border-radius: 2px;
    overflow: hidden;
}

/* 2. Indicator - Barra animada con color sólido */
.linear-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    background-color: #3037E7; /* Color sólido azul primario */
    border-radius: 2px;
    animation: indeterminate 1.5s infinite ease-in-out;
}

@keyframes indeterminate {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(300%);
    }
}
.mision-exito {
    color: #203391;
    text-align: center;
    font-feature-settings: 'liga' off;
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: 28px;
    letter-spacing: 0px;
}
.premio-1, .premio-2, .premio-3 {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.premio-1 img, .premio-2 img, .premio-3 img {
    transition: all 0.3s ease;
    border-radius: 8px;
}

/* Efecto de gris para imágenes no seleccionadas */
.premio-1:not(.selected) img,
.premio-2:not(.selected) img,
.premio-3:not(.selected) img {
    filter: grayscale(100%);
    opacity: 0.7;
}

/* Efecto hover */
.premio-1:hover, .premio-2:hover, .premio-3:hover {
    transform: scale(1.05);
}

/* Estilo para premio seleccionado */
.premio-1.selected, .premio-2.selected, .premio-3.selected {
    background-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.premio-1.selected img,
.premio-2.selected img,
.premio-3.selected img {
    filter: none;
    opacity: 1;
}

.modal-mision-content h2 {
    color: #203391;
    font-size: var(--Title-Large-fontSize, 20px);
    font-style: normal;
    font-weight: 700;
    line-height: var(--Title-Large-lineHeight, 28px);
    letter-spacing: var(--Title-Large-letterSpacing, 0px);
    text-align: center;
    margin: 0px;
    padding-bottom: 32px;
}

.mision-text{
    color: var(--Black, rgba(0, 0, 0, 0.90));
    font-feature-settings: 'liga' off;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: var(--Body-Small-letterSpacing, 0px);
}

/* Label tradicional sobre el input */
.label-rut {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #3037E7;
    font-size: 16px;
    margin-left: 16px;
    margin-top: 10px;
}

.input-label-inside {
    position: relative;
    width: 100%;
}

.label-inside {
    position: absolute;
    left: 18px;
    top: 9px;
    color: #4F4D58;
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
    z-index: 2;
}

.input-label-inside:focus-within .label-inside {
    color: #3037E7;
}
.vista-principal {
    width: 384px;
}
.rut-input {
    width: 100%;
    height: 60px;
    font-size: 16px;
    border: 1px solid #3037E7;
    border-radius: 20px;
    padding: 24px 16px 8px 16px;
    color: #000;
    background: #fff;
    box-sizing: border-box;
    font-weight: 400;
}
.mision-title {
    font-size: 16px;
    font-weight: 500;
}
.rut-input::placeholder {
    color: #A2A9B0;
    font-size: 16px;
    opacity: 1;
    font-weight: 400;
    position: relative;
    top: 0px;
}

/* Eliminar floating label */
.floating-label-group, .floating-label {
    all: unset;
}

.rut-input:focus {
    background: #fff !important;
    outline: none;
}

.rut-input:-webkit-autofill,
.rut-input:-webkit-autofill:focus,
.rut-input:-webkit-autofill:hover,
.rut-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: #A2A9B0 !important;
    transition: background-color 5000s ease-in-out 0s;
}

.mision-option {
    border: 1px solid #DDE1E6;
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    background: #fff;
    display: block;
    position: relative;
    transition: border-color 0.2s;
}

.mision-option:has(input[type="radio"]:checked) {
    border-color: #3037E7;
}

/* Eliminar color y font-weight en .mision-title al seleccionar */
.mision-option .mision-title {
    font-size: 16px;
    font-weight: 500;
    color: inherit;
}

.mision-option input[type="radio"] {
    position: absolute;
    left: 16px;
    top: 22px;
    accent-color: #3037E7;
}
.mision-option .mision-text {
    margin: 0px 0px 0px 32px;
    color: #00000091;
}
.mision-option .mision-title {
    margin-left: 32px;
    display: inline-block;
}
.mision-option input[type="radio"]:focus-visible ~ .mision-title {
    outline: 2px solid #3037E7;
    outline-offset: 2px;
}
.mision-combustible {
    margin-bottom: 10px;
}

/* ========================================
   Vista No-Full (Usuario no registrado en Full Copec)
   ======================================== */

.vista-no-full {
    font-family: 'TT Norms', Arial, sans-serif;
    animation: fadeInSlide 0.4s ease-out forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.no-full-header {
    display: flex;
    align-items: center;
    margin: 25px 0px 20px;
}

.btn-volver-rut {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #3037E7;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-volver-rut:hover {
    opacity: 0.8;
}

.btn-volver-rut img {
    transition: transform 0.2s ease;
}

.btn-volver-rut:hover img {
    transform: translateX(-3px);
}

.vista-no-full h2 {
    color: #203391;
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    text-align: center;
    margin: 0;
    padding-bottom: 24px;
}

.no-full-image {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.no-full-image img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
}

.no-full-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.app-store-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.app-store-buttons a {
    display: block;
    background-color: #1032F1;
    border-radius: 30px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-store-buttons a:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.app-store-buttons img {
    display: block;
    height: 44px;
    width: auto;
}

.btn-download-app,
.btn-registrate-web {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 280px;
    padding: 16px 24px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-download-app {
    background: #F3F5FE;
    color: #1032F1;
    border: none;
}

.btn-download-app:hover {
    background: #F3F5FE;
    transform: translateY(-2px);
    color: #1032F1;
}

.btn-registrate-web {
    background: #3037E7;
    color: #00ffdc;
    border: none;
}

.btn-registrate-web:hover {
    background: #3037E7;
    transform: translateY(-2px);
    color: #00ffdc;
}

/* Animación de salida para vista-rut cuando cambia a no-full */
.vista-01.fade-out {
    animation: fadeOutSlide 0.3s ease-out forwards;
}

@keyframes fadeOutSlide {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.modal-steps.fade-out {
    animation: fadeOutSlide 0.3s ease-out forwards;
}

@media (max-width: 600px) {
    .modal-mision-content {
        width: 98vw;
        min-width: unset;
        padding: 28px 5.5vw;
    }
    .vista-principal {
        width: 100%;
        padding: 0;
    }
	.step:not(:last-child)::after {
		content: '';
		position: absolute;
		top: 50%;
		left: 90px;
		transform: translateY(-50%);
		width: 50px;
		height: 2px;
		background-color: #e0e0e0;
		z-index: 1;
	}
    .modal-mision-content h2 {
        font-size: 18px;
        padding-bottom: 16px;
    }
    .mision-title {
        font-size: 15px;
    }
    .mision-text {
        font-size: 13px;
        line-height: 20px;
    }
    .data-parrafo {
        font-size: 14px;
    }
	.premio-combustible {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		gap: 15px;
	}
    
    /* Responsive para vista no-full */
    .vista-no-full h2 {
        font-size: 18px;
        line-height: 24px;
    }
    
    .app-store-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .app-store-buttons img {
        height: 40px;
    }
    
    .btn-download-app,
    .btn-registrate-web {
        min-width: 100%;
        font-size: 14px;
        padding: 14px 20px;
    }
}