/**
 * Home Screen Styles - Roseo Form
 * All styles use CSS variables from MFM plugin config
 * 
 * Variables disponibles desde config:
 * --mfm-primary, --mfm-secondary, --mfm-accent
 * --mfm-text, --mfm-text-light
 * --mfm-font, --mfm-radius, --mfm-btn-radius
 * --mfm-transition
 * 
 * Variables específicas de Home Screen (inyectadas desde admin):
 * --mfm-home-bg-start, --mfm-home-bg-end
 * --mfm-home-title-size, --mfm-home-subtitle-size
 * --mfm-home-icon-size
 * --mfm-home-btn-size, --mfm-home-btn-padding, --mfm-home-btn-radius
 */

/* ============================================
   CONTAINER PRINCIPAL
   ============================================ */
.roseo-home-screen {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
            var(--mfm-home-bg-start, var(--mfm-secondary, #015328)) 0%,
            var(--mfm-home-bg-end, var(--mfm-primary, #009239)) 100%);
    padding: 60px 20px;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 10;
}

/* ============================================
   HERO SECTION
   ============================================ */
.home-hero {
    max-width: 800px;
    width: 100%;
    text-align: center;
    color: var(--mfm-text-light, #ffffff);
    padding: 20px;
    padding-bottom: 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ============================================
   SELECTOR DE IDIOMA
   ============================================ */
.mfm-language-selector {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 32px;
}

.mfm-lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--mfm-home-btn-radius, var(--mfm-btn-radius, 8px));
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: var(--mfm-transition, all 0.2s ease);
    font-family: var(--mfm-font, 'Roboto', sans-serif);
    font-size: 14px;
    font-weight: 500;
    color: var(--mfm-text-light, #ffffff);
    backdrop-filter: blur(10px);
}

.mfm-lang-btn:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.2);
}

.mfm-lang-btn.active {
    border-color: var(--mfm-text-light, #ffffff);
    background: var(--mfm-text-light, #ffffff);
    color: var(--mfm-secondary, #015328);
}

.mfm-lang-flag {
    font-size: 18px;
    line-height: 1;
}

.mfm-lang-flag-img {
    width: 20px;
    height: 14px;
    vertical-align: middle;
    object-fit: contain;
    display: inline-block;
}

.mfm-lang-code {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   ICONO HERO
   ============================================ */
.home-hero-icon {
    width: var(--mfm-home-icon-size, 120px);
    height: var(--mfm-home-icon-size, 120px);
    margin: 0 auto 40px;
    animation: homeIconPulse 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.home-hero-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes homeIconPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ============================================
   TÍTULO Y SUBTÍTULO
   ============================================ */
.home-title {
    font-size: var(--mfm-home-title-size, 48px);
    font-weight: 800;
    color: var(--mfm-text-light, #ffffff);
    margin-bottom: 24px;
    line-height: 1.2;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-family: var(--mfm-font, 'Roboto', sans-serif);
}

.home-subtitle {
    font-size: var(--mfm-home-subtitle-size, 20px);
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    margin-bottom: 48px;
    font-family: var(--mfm-font, 'Roboto', sans-serif);
}

/* ============================================
   BOTONES
   ============================================ */
.home-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 48px;
    margin-bottom: 32px;
}

/* Botón principal (Empezar / Continuar) */
.roseo-btn-start,
.roseo-btn-continue {
    font-size: var(--mfm-home-btn-size, 20px);
    padding: var(--mfm-home-btn-padding, 20px 60px);
    background: var(--mfm-text-light, #ffffff);
    color: var(--mfm-secondary, #015328);
    border: none;
    border-radius: var(--mfm-home-btn-radius, 50px);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    justify-content: center;
    font-family: var(--mfm-font, 'Roboto', sans-serif);
}

.roseo-btn-continue {
    background: var(--mfm-primary, #009239);
    color: var(--mfm-text-light, #ffffff);
}

/* Botón secundario (Nueva solicitud) */
.roseo-btn-start-new {
    font-size: 16px;
    padding: 14px 40px;
    background: transparent;
    color: var(--mfm-text-light, #ffffff);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--mfm-home-btn-radius, 50px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    justify-content: center;
    font-family: var(--mfm-font, 'Roboto', sans-serif);
}

/* Hover states */
.roseo-btn-start:hover,
.roseo-btn-continue:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.roseo-btn-start:hover {
    background: #f0fdf4;
}

.roseo-btn-continue:hover {
    background: var(--mfm-secondary, #015328);
}

.roseo-btn-start-new:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Icono en botones */
.roseo-btn-start i,
.roseo-btn-continue i,
.roseo-btn-start-new i {
    transition: transform 0.4s ease;
}

.roseo-btn-start:hover i,
.roseo-btn-continue:hover i,
.roseo-btn-start-new:hover i {
    transform: translateX(4px);
}


.progress-info {
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    backdrop-filter: blur(8px);
    width: auto;
    max-width: 95%;
    box-shadow: none;
    text-align: left;
    font-family: var(--mfm-font, 'Roboto', sans-serif);
    line-height: 1 !important;
    transition: all 0.3s ease;
    flex-wrap: nowrap;
    color: rgba(255, 255, 255, 0.95) !important;
}

.progress-info:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.progress-info i {
    color: var(--mfm-accent, #B3C8BB);
    font-size: 14px;
    flex-shrink: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    height: 14px;
}

#roseo-form-wrapper .progress-info p,
#roseo-form-wrapper .progress-info span,
.progress-info p,
.progress-info span {
    margin: 0;
    padding: 0;
    line-height: 1 !important;
    font-size: 14px !important;
    color: inherit !important;
    display: inline-block;
}

@media (min-width: 400px) {
    .progress-info span {
        white-space: nowrap;
    }
}

.progress-info:hover {
    background: rgba(0, 0, 0, 0.45);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.4);
}

.progress-info i {
    color: var(--mfm-accent, #B3C8BB);
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1;
    /* Reset line-height to prevent vertical misalignment */
    display: flex;
    /* Helps with centering SVG/Font icons */
    align-items: center;
    height: 18px;
    /* Force height matching font-size */
}

/* ============================================
   TEXTO DE AYUDA
   ============================================ */
.home-help {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 24px;
    padding-bottom: 20px;
    font-family: var(--mfm-font, 'Roboto', sans-serif);
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (max-width: 768px) {
    .roseo-home-screen {
        padding: 40px 20px;
        min-height: 100vh;
    }

    .home-hero {
        padding: 10px;
    }

    .home-title {
        font-size: 28px;
    }

    .home-subtitle {
        font-size: 16px;
        margin-bottom: 28px;
    }

    .home-hero-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 24px;
    }

    .home-buttons {
        margin-top: 32px;
        margin-bottom: 24px;
        gap: 16px;
    }

    .roseo-btn-start,
    .roseo-btn-continue {
        font-size: 16px;
        padding: 14px 32px;
        min-width: 260px;
    }

    .roseo-btn-start-new {
        font-size: 14px;
        padding: 12px 28px;
        min-width: 200px;
    }

    .progress-info {
        font-size: 14px;
        padding: 10px 16px;
        margin-top: 16px;
        max-width: 90%;
        line-height: 1.5;
    }

    .progress-info i {
        font-size: 16px;
    }

    .home-help {
        font-size: 13px;
        margin-top: 20px;
        padding: 0 10px 30px 10px;
    }

    .mfm-language-selector {
        margin-bottom: 24px;
    }

    .mfm-lang-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* ============================================
   RESPONSIVE - MÓVIL
   ============================================ */
@media (max-width: 480px) {
    .roseo-home-screen {
        padding: 30px 16px;
        min-height: 100vh;
    }

    .home-hero {
        padding: 5px;
    }

    .home-title {
        font-size: 24px;
        margin-bottom: 14px;
    }

    .home-subtitle {
        font-size: 15px;
        margin-bottom: 20px;
        line-height: 1.5;
    }

    .home-hero-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }

    .home-buttons {
        margin-top: 24px;
        gap: 14px;
    }

    .roseo-btn-start,
    .roseo-btn-continue,
    .roseo-btn-start-new {
        width: 100%;
        min-width: auto;
        max-width: 300px;
    }

    .roseo-btn-start,
    .roseo-btn-continue {
        font-size: 15px;
        padding: 14px 24px;
    }

    .roseo-btn-start-new {
        font-size: 13px;
        padding: 10px 20px;
    }

    .progress-info {
        font-size: 13px;
        padding: 10px 14px;
        margin-top: 14px;
        max-width: 95%;
        gap: 8px;
        border-radius: 20px;
        line-height: 1.4;
    }

    .progress-info i {
        font-size: 14px;
    }

    .home-help {
        font-size: 12px;
        margin-top: 16px;
        padding: 0 8px 40px 8px;
        line-height: 1.4;
    }

    .mfm-lang-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    .mfm-lang-flag {
        font-size: 16px;
    }

    .mfm-lang-flag-img {
        width: 18px;
        height: 12px;
    }
}