/**
 * Flavor RSVP App - Estilos (Classic)
 *
 * Lógica de colores automática:
 * - Tema CLARO: usa --color-text-body (oscuro sobre papel beige)
 * - Tema OSCURO: usa --color-bg-primary (el fondo oscuro del tema)
 * - El papel siempre es beige claro, necesitamos colores oscuros encima
 *
 * Usa la clase .theme-dark en body (añadida por NUO Demo Tools y Flavour Chromas)
 */

/* ========================================
   CSS Variables - Por defecto: tema CLARO
   Usa --color-text-body para todo (color oscuro sobre papel beige)
   ======================================== */
.flavor-rsvp-app {
    /* Fondo del papel - siempre beige */
    --rsvp-paper-bg: #efe7d8;
    --rsvp-backdrop: var(--color-bg-primary, #fdfbf7);

    /* Colores de contenido */
    --rsvp-content-color: var(--color-text-body, #4A4A4A);
    --rsvp-text-heading: var(--rsvp-content-color);
    --rsvp-text-body: var(--rsvp-content-color);
    --rsvp-text-muted: var(--rsvp-content-color);
    --rsvp-btn-bg: var(--rsvp-content-color);
    --rsvp-btn-text: var(--color-bg-primary, #FDFBF7);
    --rsvp-btn-secondary: var(--rsvp-content-color);
}

/* ========================================
   Tema OSCURO - Usa --color-bg-primary (el fondo oscuro)
   ======================================== */
.theme-dark .flavor-rsvp-app,
body.theme-dark .flavor-rsvp-app {
    --rsvp-content-color: var(--color-bg-primary, #1A2A3A);
    --rsvp-btn-text: var(--color-text-heading, #FFFFFF);
}

/* ========================================
   Base / Reset
   ======================================== */

.flavor-rsvp-app {
    position: fixed;
    inset: 0;
    z-index: 9999;
    overflow: clip;
    /* El fondo hereda del tema */
    background-color: var(--rsvp-backdrop, var(--color-bg-primary, #fdfbf7));
}

/* Textura papel opcional - controlada por CSS variable del tema */
.flavor-rsvp-app::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Solo muestra textura si el tema define --rsvp-paper-texture */
    background-image: var(--rsvp-paper-texture, none);
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: var(--rsvp-paper-texture-opacity, 0.3);
    pointer-events: none;
    z-index: 0;
}

.flavor-rsvp-screen {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1))
            drop-shadow(0 12px 24px rgba(0, 0, 0, 0.12))
            drop-shadow(0 24px 48px rgba(0, 0, 0, 0.08));
}

.flavor-rsvp-screen.is-active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   Intro Screen
   ======================================== */

.flavor-rsvp-intro__content {
    min-width: 700px;
    max-width: 700px;
    width: 100%;
    text-align: center;
    /* Fondo del papel - siempre beige claro */
    background: var(--rsvp-paper-bg, #efe7d8);
    padding: 3.5rem 2.5rem;
    position: relative;
    /* Máscara con bordes rasgados naturales - ondulaciones suaves orgánicas */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0.5,1.5 Q3,0.8 6,1.8 Q10,0.5 14,1.2 Q18,2.2 22,0.8 Q26,1.5 30,0.5 Q35,1.8 40,1 Q45,0.3 50,1.5 Q55,0.8 60,1.8 Q65,0.5 70,1.2 Q75,2 80,0.8 Q85,1.5 90,1 Q95,0.5 99,1.5 Q99.5,5 99.2,10 Q100,15 99.5,20 Q99,25 99.5,30 Q100,35 99.2,40 Q99.5,45 99,50 Q99.5,55 99.2,60 Q100,65 99.5,70 Q99,75 99.5,80 Q100,85 99.2,90 Q99.5,95 99,98.5 Q95,99.5 90,98.8 Q85,99.5 80,98.5 Q75,99.2 70,98.8 Q65,99.5 60,98.5 Q55,99 50,98.5 Q45,99.5 40,98.8 Q35,99 30,99.5 Q25,98.5 20,99 Q15,98.5 10,99.2 Q5,98.8 1,98.5 Q0.5,95 0.8,90 Q0,85 0.5,80 Q1,75 0.5,70 Q0,65 0.8,60 Q0.5,55 1,50 Q0.5,45 0.8,40 Q0,35 0.5,30 Q1,25 0.5,20 Q0,15 0.8,10 Q0.5,5 0.5,1.5 Z' fill='white'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0.5,1.5 Q3,0.8 6,1.8 Q10,0.5 14,1.2 Q18,2.2 22,0.8 Q26,1.5 30,0.5 Q35,1.8 40,1 Q45,0.3 50,1.5 Q55,0.8 60,1.8 Q65,0.5 70,1.2 Q75,2 80,0.8 Q85,1.5 90,1 Q95,0.5 99,1.5 Q99.5,5 99.2,10 Q100,15 99.5,20 Q99,25 99.5,30 Q100,35 99.2,40 Q99.5,45 99,50 Q99.5,55 99.2,60 Q100,65 99.5,70 Q99,75 99.5,80 Q100,85 99.2,90 Q99.5,95 99,98.5 Q95,99.5 90,98.8 Q85,99.5 80,98.5 Q75,99.2 70,98.8 Q65,99.5 60,98.5 Q55,99 50,98.5 Q45,99.5 40,98.8 Q35,99 30,99.5 Q25,98.5 20,99 Q15,98.5 10,99.2 Q5,98.8 1,98.5 Q0.5,95 0.8,90 Q0,85 0.5,80 Q1,75 0.5,70 Q0,65 0.8,60 Q0.5,55 1,50 Q0.5,45 0.8,40 Q0,35 0.5,30 Q1,25 0.5,20 Q0,15 0.8,10 Q0.5,5 0.5,1.5 Z' fill='white'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* Textura de papel */
.flavor-rsvp-intro__content::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04' numOctaves='5' result='noise'/%3E%3CfeDiffuseLighting in='noise' lighting-color='%23faf6ef' surfaceScale='1.2'%3E%3CfeDistantLight azimuth='45' elevation='60'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

/* Borde hand-drawn del papel */
.flavor-rsvp-intro__content::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: currentColor;
    color: var(--rsvp-text-muted);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M3,2 Q8,1 15,3 L40,1 Q60,4 85,2 L97,3 Q99,2 98,8 L99,30 Q97,55 99,80 L98,97 Q99,99 92,98 L60,99 Q40,96 20,99 L5,98 Q1,99 2,92 L1,70 Q3,45 1,20 L2,5 Q1,1 3,2 Z' fill='none' stroke='white' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M3,2 Q8,1 15,3 L40,1 Q60,4 85,2 L97,3 Q99,2 98,8 L99,30 Q97,55 99,80 L98,97 Q99,99 92,98 L60,99 Q40,96 20,99 L5,98 Q1,99 2,92 L1,70 Q3,45 1,20 L2,5 Q1,1 3,2 Z' fill='none' stroke='white' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    pointer-events: none;
    z-index: 2;
}


.flavor-rsvp-intro__subtitle {
    font-family: var(--font-body, 'Georgia', serif);
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--rsvp-text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin: 0 0 1rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.3s forwards;
    position: relative;
    z-index: 1;
}

.flavor-rsvp-intro__names {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 400;
    color: var(--rsvp-text-heading);
    margin: 0 0 3rem;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.flavor-rsvp-intro__text-animated {
    display: inline-block;
    background: linear-gradient(90deg, var(--rsvp-text-heading) 50%, transparent 50%);
    background-size: 200% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: revealText 1.5s ease 0.6s forwards;
}

@keyframes revealText {
    0% { background-position: 100% 0; }
    100% { background-position: 0% 0; }
}

.flavor-rsvp-intro__buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    opacity: 0;
    transform: scale(0.8);
    animation: scaleIn 0.6s ease 1.8s forwards;
    position: relative;
    z-index: 1;
}

.flavor-rsvp-intro__btn {
    font-family: var(--font-body, sans-serif);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: none;
    padding: 1.25rem 3rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.flavor-rsvp-intro__btn--confirm {
    background: var(--rsvp-btn-bg);
    color: var(--rsvp-btn-text);
}

.flavor-rsvp-intro__btn--decline {
    background: transparent;
    color: var(--rsvp-btn-secondary);
    border: 2px solid var(--rsvp-btn-secondary);
}

.flavor-rsvp-intro__btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.flavor-rsvp-intro__btn--decline:hover {
    background: rgba(61, 53, 41, 0.1);
}

.flavor-rsvp-intro__btn:active {
    transform: scale(0.98);
}

/* ========================================
   Form Screen
   ======================================== */

.flavor-rsvp-form__wrapper {
    min-width: 700px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    position: relative;
    background: var(--rsvp-paper-bg, #efe7d8);
    /* Máscara con bordes rasgados naturales - ondulaciones suaves orgánicas */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0.5,1.5 Q3,0.8 6,1.8 Q10,0.5 14,1.2 Q18,2.2 22,0.8 Q26,1.5 30,0.5 Q35,1.8 40,1 Q45,0.3 50,1.5 Q55,0.8 60,1.8 Q65,0.5 70,1.2 Q75,2 80,0.8 Q85,1.5 90,1 Q95,0.5 99,1.5 Q99.5,5 99.2,10 Q100,15 99.5,20 Q99,25 99.5,30 Q100,35 99.2,40 Q99.5,45 99,50 Q99.5,55 99.2,60 Q100,65 99.5,70 Q99,75 99.5,80 Q100,85 99.2,90 Q99.5,95 99,98.5 Q95,99.5 90,98.8 Q85,99.5 80,98.5 Q75,99.2 70,98.8 Q65,99.5 60,98.5 Q55,99 50,98.5 Q45,99.5 40,98.8 Q35,99 30,99.5 Q25,98.5 20,99 Q15,98.5 10,99.2 Q5,98.8 1,98.5 Q0.5,95 0.8,90 Q0,85 0.5,80 Q1,75 0.5,70 Q0,65 0.8,60 Q0.5,55 1,50 Q0.5,45 0.8,40 Q0,35 0.5,30 Q1,25 0.5,20 Q0,15 0.8,10 Q0.5,5 0.5,1.5 Z' fill='white'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0.5,1.5 Q3,0.8 6,1.8 Q10,0.5 14,1.2 Q18,2.2 22,0.8 Q26,1.5 30,0.5 Q35,1.8 40,1 Q45,0.3 50,1.5 Q55,0.8 60,1.8 Q65,0.5 70,1.2 Q75,2 80,0.8 Q85,1.5 90,1 Q95,0.5 99,1.5 Q99.5,5 99.2,10 Q100,15 99.5,20 Q99,25 99.5,30 Q100,35 99.2,40 Q99.5,45 99,50 Q99.5,55 99.2,60 Q100,65 99.5,70 Q99,75 99.5,80 Q100,85 99.2,90 Q99.5,95 99,98.5 Q95,99.5 90,98.8 Q85,99.5 80,98.5 Q75,99.2 70,98.8 Q65,99.5 60,98.5 Q55,99 50,98.5 Q45,99.5 40,98.8 Q35,99 30,99.5 Q25,98.5 20,99 Q15,98.5 10,99.2 Q5,98.8 1,98.5 Q0.5,95 0.8,90 Q0,85 0.5,80 Q1,75 0.5,70 Q0,65 0.8,60 Q0.5,55 1,50 Q0.5,45 0.8,40 Q0,35 0.5,30 Q1,25 0.5,20 Q0,15 0.8,10 Q0.5,5 0.5,1.5 Z' fill='white'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.flavor-rsvp-form__container,
.flavor-rsvp-form__paper {
    padding: 2.5rem 2rem;
    position: relative;
    max-height: calc(90vh - 2rem);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    z-index: 1;
    /* Máscara con el borde interior decorativo - el contenido se corta aquí */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M3,2 Q8,1 15,3 L40,1 Q60,4 85,2 L97,3 Q99,2 98,8 L99,30 Q97,55 99,80 L98,97 Q99,99 92,98 L60,99 Q40,96 20,99 L5,98 Q1,99 2,92 L1,70 Q3,45 1,20 L2,5 Q1,1 3,2 Z' fill='white'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M3,2 Q8,1 15,3 L40,1 Q60,4 85,2 L97,3 Q99,2 98,8 L99,30 Q97,55 99,80 L98,97 Q99,99 92,98 L60,99 Q40,96 20,99 L5,98 Q1,99 2,92 L1,70 Q3,45 1,20 L2,5 Q1,1 3,2 Z' fill='white'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* Ocultar scrollbar nativo webkit */
.flavor-rsvp-form__container::-webkit-scrollbar,
.flavor-rsvp-form__paper::-webkit-scrollbar {
    display: none;
}

/* Textura de papel */
.flavor-rsvp-form__wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04' numOctaves='5' result='noise'/%3E%3CfeDiffuseLighting in='noise' lighting-color='%23faf6ef' surfaceScale='1.2'%3E%3CfeDistantLight azimuth='45' elevation='60'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

/* Borde hand-drawn decorativo - línea decorativa sobre el marco sólido */
.flavor-rsvp-form__border {
    position: absolute;
    inset: 0;
    background-color: currentColor;
    color: var(--rsvp-text-muted);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M3,2 Q8,1 15,3 L40,1 Q60,4 85,2 L97,3 Q99,2 98,8 L99,30 Q97,55 99,80 L98,97 Q99,99 92,98 L60,99 Q40,96 20,99 L5,98 Q1,99 2,92 L1,70 Q3,45 1,20 L2,5 Q1,1 3,2 Z' fill='none' stroke='white' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M3,2 Q8,1 15,3 L40,1 Q60,4 85,2 L97,3 Q99,2 98,8 L99,30 Q97,55 99,80 L98,97 Q99,99 92,98 L60,99 Q40,96 20,99 L5,98 Q1,99 2,92 L1,70 Q3,45 1,20 L2,5 Q1,1 3,2 Z' fill='none' stroke='white' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    pointer-events: none;
    z-index: 11;
}

.flavor-rsvp-form__content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.flavor-rsvp-form__scroll-area {
    max-height: calc(90vh - 5rem);
    overflow-y: auto;
    padding-right: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.flavor-rsvp-form__scroll-area::-webkit-scrollbar {
    display: none;
}

/* Custom scrollbar container */
.flavor-rsvp-scrollbar {
    position: absolute;
    top: 2.5rem;
    right: 0.5rem;
    bottom: 2.5rem;
    width: 4px;
    background: rgba(61, 53, 41, 0.1);
    border-radius: 2px;
    z-index: 10;
}

.flavor-rsvp-scrollbar__thumb {
    position: absolute;
    width: 100%;
    background: rgba(61, 53, 41, 0.35);
    border-radius: 2px;
    cursor: grab;
    transition: background 0.2s ease;
}

.flavor-rsvp-scrollbar__thumb:hover {
    background: rgba(61, 53, 41, 0.55);
}

.flavor-rsvp-form__title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--rsvp-text-heading);
    margin: 0 0 0.5rem;
    position: relative;
    z-index: 1;
}

.flavor-rsvp-form__subtitle {
    font-family: var(--font-body, 'Georgia', serif);
    font-size: 1rem;
    color: var(--rsvp-text-heading);
    margin: 0 0 2rem;
    position: relative;
    z-index: 1;
}

.flavor-rsvp-form__fields {
    text-align: left;
    position: relative;
    z-index: 1;
}

.flavor-rsvp-field {
    margin-bottom: 1.5rem;
}

.flavor-rsvp-field label {
    display: block;
    font-family: var(--font-body, sans-serif);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--rsvp-text-heading);
    margin-bottom: 0.5rem;
}

.flavor-rsvp-field input,
.flavor-rsvp-field select,
.flavor-rsvp-field textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--font-body, sans-serif);
    font-size: 1rem;
    color: var(--rsvp-text-heading);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(61, 53, 41, 0.2);
    border-radius: 4px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.flavor-rsvp-field input:focus,
.flavor-rsvp-field select:focus,
.flavor-rsvp-field textarea:focus {
    outline: none;
    border-color: var(--rsvp-text-heading);
    box-shadow: 0 0 0 3px rgba(61, 53, 41, 0.1);
}

.flavor-rsvp-field input::placeholder,
.flavor-rsvp-field textarea::placeholder {
    color: #a89f91;
}

.flavor-rsvp-form__submit {
    width: 100%;
    margin-top: 1rem;
    font-family: var(--font-body, sans-serif);
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rsvp-btn-text);
    background: var(--rsvp-btn-bg);
    border: none;
    padding: 1.25rem 2rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.flavor-rsvp-form__submit:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.flavor-rsvp-form__submit:active {
    transform: scale(0.98);
}

/* ========================================
   Names List
   ======================================== */

.flavor-rsvp-names-list {
    margin-bottom: 1rem;
}

.flavor-rsvp-name-entry {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

.flavor-rsvp-name-entry input {
    flex: 1;
    padding: 0.875rem 1rem;
    font-family: var(--font-body, sans-serif);
    font-size: 1rem;
    color: var(--rsvp-text-heading);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(61, 53, 41, 0.2);
    border-radius: 4px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.flavor-rsvp-name-entry input:focus {
    outline: none;
    border-color: var(--rsvp-text-heading);
    box-shadow: 0 0 0 3px rgba(61, 53, 41, 0.1);
}

.flavor-rsvp-name-entry input::placeholder {
    color: #a89f91;
}

.flavor-rsvp-remove-name {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--rsvp-text-muted);
    background: transparent;
    border: 1px solid rgba(61, 53, 41, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.flavor-rsvp-remove-name:hover {
    background: rgba(61, 53, 41, 0.1);
    color: var(--rsvp-text-heading);
}

.flavor-rsvp-add-name {
    width: 100%;
    padding: 0.875rem 1rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-body, sans-serif);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--rsvp-text-heading);
    background: rgba(255, 255, 255, 0.4);
    border: 2px dashed rgba(61, 53, 41, 0.35);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.flavor-rsvp-add-name:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: var(--rsvp-text-heading);
    color: var(--rsvp-text-heading);
}

/* ========================================
   Step Indicator
   ======================================== */

.flavor-rsvp-steps {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.flavor-rsvp-step {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body, sans-serif);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--rsvp-text-muted);
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(61, 53, 41, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.flavor-rsvp-step.is-active {
    color: #fff;
    background: var(--rsvp-btn-bg);
    border-color: var(--rsvp-btn-bg);
}

.flavor-rsvp-step.is-completed {
    color: var(--rsvp-text-heading);
    background: rgba(61, 53, 41, 0.1);
    border-color: var(--rsvp-text-heading);
}

/* ========================================
   Allergies Grid
   ======================================== */

.flavor-rsvp-allergies-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.flavor-rsvp-allergy-option {
    position: relative;
}

.flavor-rsvp-allergy-option input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.flavor-rsvp-allergy-option__box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(61, 53, 41, 0.15);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.flavor-rsvp-allergy-option__box .material-symbols-outlined {
    font-size: 1.5rem;
    color: var(--rsvp-text-muted);
    transition: color 0.2s ease;
}

.flavor-rsvp-allergy-option__label {
    font-family: var(--font-body, sans-serif);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--rsvp-text-heading);
}

.flavor-rsvp-allergy-option input:checked + .flavor-rsvp-allergy-option__box {
    background: rgba(255, 255, 255, 0.7);
    border-color: var(--rsvp-text-heading);
}

.flavor-rsvp-allergy-option input:checked + .flavor-rsvp-allergy-option__box .material-symbols-outlined {
    color: var(--rsvp-text-heading);
}

.flavor-rsvp-allergy-option:hover .flavor-rsvp-allergy-option__box {
    border-color: rgba(61, 53, 41, 0.4);
}

/* Custom allergy card */
.flavor-rsvp-allergy-option--custom .flavor-rsvp-allergy-option__box {
    cursor: text;
}

.flavor-rsvp-allergy-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
    color: var(--rsvp-text-muted);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.flavor-rsvp-allergy-option--custom:hover .flavor-rsvp-allergy-remove {
    opacity: 1;
}

.flavor-rsvp-allergy-remove:hover {
    color: var(--rsvp-text-heading);
}

.flavor-rsvp-allergy-input {
    width: 100%;
    padding: 0.25rem 0;
    font-family: var(--font-body, sans-serif);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--rsvp-text-heading);
    text-align: center;
    background: transparent;
    border: none;
    border-bottom: 1px dashed rgba(61, 53, 41, 0.3);
    outline: none;
}

.flavor-rsvp-allergy-input::placeholder {
    color: #a89f91;
}

.flavor-rsvp-allergy-input:focus {
    border-bottom-color: var(--rsvp-text-heading);
}

/* ========================================
   Back Arrow Button
   ======================================== */

.flavor-rsvp-form__back-arrow {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 40px;
    height: 40px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--rsvp-text-muted);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.flavor-rsvp-form__back-arrow:hover {
    color: var(--rsvp-text-heading);
    transform: translateX(-3px);
}

.flavor-rsvp-form__back-arrow .material-symbols-outlined {
    font-size: 1.5rem;
}

/* ========================================
   Otros Field (textarea for additional allergies)
   ======================================== */

.flavor-rsvp-otros-container {
    margin-top: 1rem;
    text-align: left;
}

.flavor-rsvp-otros-container .flavor-rsvp-field__label {
    display: block;
    font-family: var(--font-body, sans-serif);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--rsvp-text-heading);
    margin-bottom: 0.5rem;
}

.flavor-rsvp-otros-container textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--font-body, sans-serif);
    font-size: 1rem;
    color: var(--rsvp-text-heading);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(61, 53, 41, 0.2);
    border-radius: 4px;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.flavor-rsvp-otros-container textarea:focus {
    outline: none;
    border-color: var(--rsvp-text-heading);
    box-shadow: 0 0 0 3px rgba(61, 53, 41, 0.1);
}

.flavor-rsvp-otros-container textarea::placeholder {
    color: #a89f91;
}

/* ========================================
   Bus Options
   ======================================== */

.flavor-rsvp-bus-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.flavor-rsvp-bus-option {
    position: relative;
}

.flavor-rsvp-bus-option input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.flavor-rsvp-bus-option__box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(61, 53, 41, 0.15);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.flavor-rsvp-bus-option__box .material-symbols-outlined {
    font-size: 1.75rem;
    color: var(--rsvp-text-muted);
    transition: color 0.2s ease;
}

.flavor-rsvp-bus-option__content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.flavor-rsvp-bus-option__label {
    font-family: var(--font-body, sans-serif);
    font-size: 1rem;
    font-weight: 500;
    color: var(--rsvp-text-heading);
}

.flavor-rsvp-bus-option__info {
    font-family: var(--font-body, sans-serif);
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--rsvp-text-muted);
}

.flavor-rsvp-bus-option input:checked + .flavor-rsvp-bus-option__box {
    background: rgba(255, 255, 255, 0.7);
    border-color: var(--rsvp-text-heading);
}

.flavor-rsvp-bus-option input:checked + .flavor-rsvp-bus-option__box .material-symbols-outlined {
    color: var(--rsvp-text-heading);
}

.flavor-rsvp-bus-option:hover .flavor-rsvp-bus-option__box {
    border-color: rgba(61, 53, 41, 0.4);
}

/* ========================================
   Thanks Screen
   ======================================== */

.flavor-rsvp-thanks__content {
    min-width: 700px;
    max-width: 700px;
    width: 100%;
    text-align: center;
    background: var(--rsvp-paper-bg, #efe7d8);
    padding: 3.5rem 2.5rem;
    position: relative;
    /* Máscara con bordes rasgados naturales - ondulaciones suaves orgánicas */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0.5,1.5 Q3,0.8 6,1.8 Q10,0.5 14,1.2 Q18,2.2 22,0.8 Q26,1.5 30,0.5 Q35,1.8 40,1 Q45,0.3 50,1.5 Q55,0.8 60,1.8 Q65,0.5 70,1.2 Q75,2 80,0.8 Q85,1.5 90,1 Q95,0.5 99,1.5 Q99.5,5 99.2,10 Q100,15 99.5,20 Q99,25 99.5,30 Q100,35 99.2,40 Q99.5,45 99,50 Q99.5,55 99.2,60 Q100,65 99.5,70 Q99,75 99.5,80 Q100,85 99.2,90 Q99.5,95 99,98.5 Q95,99.5 90,98.8 Q85,99.5 80,98.5 Q75,99.2 70,98.8 Q65,99.5 60,98.5 Q55,99 50,98.5 Q45,99.5 40,98.8 Q35,99 30,99.5 Q25,98.5 20,99 Q15,98.5 10,99.2 Q5,98.8 1,98.5 Q0.5,95 0.8,90 Q0,85 0.5,80 Q1,75 0.5,70 Q0,65 0.8,60 Q0.5,55 1,50 Q0.5,45 0.8,40 Q0,35 0.5,30 Q1,25 0.5,20 Q0,15 0.8,10 Q0.5,5 0.5,1.5 Z' fill='white'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0.5,1.5 Q3,0.8 6,1.8 Q10,0.5 14,1.2 Q18,2.2 22,0.8 Q26,1.5 30,0.5 Q35,1.8 40,1 Q45,0.3 50,1.5 Q55,0.8 60,1.8 Q65,0.5 70,1.2 Q75,2 80,0.8 Q85,1.5 90,1 Q95,0.5 99,1.5 Q99.5,5 99.2,10 Q100,15 99.5,20 Q99,25 99.5,30 Q100,35 99.2,40 Q99.5,45 99,50 Q99.5,55 99.2,60 Q100,65 99.5,70 Q99,75 99.5,80 Q100,85 99.2,90 Q99.5,95 99,98.5 Q95,99.5 90,98.8 Q85,99.5 80,98.5 Q75,99.2 70,98.8 Q65,99.5 60,98.5 Q55,99 50,98.5 Q45,99.5 40,98.8 Q35,99 30,99.5 Q25,98.5 20,99 Q15,98.5 10,99.2 Q5,98.8 1,98.5 Q0.5,95 0.8,90 Q0,85 0.5,80 Q1,75 0.5,70 Q0,65 0.8,60 Q0.5,55 1,50 Q0.5,45 0.8,40 Q0,35 0.5,30 Q1,25 0.5,20 Q0,15 0.8,10 Q0.5,5 0.5,1.5 Z' fill='white'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* Textura de papel */
.flavor-rsvp-thanks__content::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04' numOctaves='5' result='noise'/%3E%3CfeDiffuseLighting in='noise' lighting-color='%23faf6ef' surfaceScale='1.2'%3E%3CfeDistantLight azimuth='45' elevation='60'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

/* Borde hand-drawn del papel */
.flavor-rsvp-thanks__content::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: currentColor;
    color: var(--rsvp-text-muted);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M3,2 Q8,1 15,3 L40,1 Q60,4 85,2 L97,3 Q99,2 98,8 L99,30 Q97,55 99,80 L98,97 Q99,99 92,98 L60,99 Q40,96 20,99 L5,98 Q1,99 2,92 L1,70 Q3,45 1,20 L2,5 Q1,1 3,2 Z' fill='none' stroke='white' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M3,2 Q8,1 15,3 L40,1 Q60,4 85,2 L97,3 Q99,2 98,8 L99,30 Q97,55 99,80 L98,97 Q99,99 92,98 L60,99 Q40,96 20,99 L5,98 Q1,99 2,92 L1,70 Q3,45 1,20 L2,5 Q1,1 3,2 Z' fill='none' stroke='white' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    pointer-events: none;
    z-index: 2;
}

.flavor-rsvp-thanks__title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--rsvp-text-heading);
    margin: 0 0 1rem;
    position: relative;
    z-index: 1;
}

.flavor-rsvp-thanks__message {
    font-family: var(--font-body, 'Georgia', serif);
    font-size: 1.125rem;
    color: var(--rsvp-text-muted);
    margin: 0;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 740px) {
    .flavor-rsvp-intro__content,
    .flavor-rsvp-form__wrapper,
    .flavor-rsvp-thanks__content {
        min-width: calc(100vw - 4rem);
        max-width: calc(100vw - 4rem);
    }
}

@media (max-width: 480px) {
    .flavor-rsvp-intro__content,
    .flavor-rsvp-form__container,
    .flavor-rsvp-thanks__content {
        padding: 2rem 1.5rem;
    }

    .flavor-rsvp-intro__buttons {
        gap: 0.75rem;
    }

    .flavor-rsvp-intro__btn {
        padding: 1rem 2rem;
        font-size: 0.875rem;
    }

    .flavor-rsvp-form__title,
    .flavor-rsvp-thanks__title {
        font-size: 2rem;
    }

    .flavor-rsvp-allergies-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .flavor-rsvp-form__back-arrow {
        top: 1rem;
        left: 1rem;
    }
}
