/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #0F172A;
    color: #FFFFFF;
    overflow-x: hidden;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0F172A;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #374151;
    border-top: 3px solid #3B82F6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Landing Page */
/* Landing Page (mobile-first) */
.landing-page {
    position: relative;
    background-color: #0F172A;
    display: flex;
    /* enable sticky footer layout */
    flex-direction: column;
    /* stack sections vertically */
    min-height: 100vh;
    /* fill viewport height */
    z-index: 1;
    color: #F9FAFB;
}

.lp-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px;
}

.lp-hero {
    background: radial-gradient(1200px 400px at 50% -200px, rgba(59, 130, 246, 0.35), rgba(59, 130, 246, 0) 70%),
        radial-gradient(800px 300px at 0% -100px, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0) 70%);
    padding: 32px 0 8px 0;
}

.lp-brand {
    text-align: center;
}

.lp-logo {
    width: 96px;
    height: 96px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.lp-title {
    font-size: 28px;
    font-weight: 800;
    margin: 16px 0 8px;
    line-height: 1.15;
}

.lp-subtitle {
    font-size: 16px;
    color: #D1D5DB;
    max-width: 680px;
    margin: 0 auto 16px;
    line-height: 1.6;
}

.lp-store-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Store badges as official image buttons */
.lp-store-badge {
    display: inline-block;
    text-decoration: none;
    padding: 0;
    border: 0;
    background: transparent;
    min-width: 0;
}

.lp-store-badge:hover {
    opacity: 0.9;
}

/* Ensure images size nicely and don’t stretch */
.lp-store-badge img,
.store-badge-img {
    height: 40px;
    width: auto;
    display: block;
}

.lp-main {
    padding: 8px 0 24px;
}

.lp-feature-section {
    padding: 8px 0;
}

.lp-feature-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.lp-feature {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
}

.lp-feature-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.lp-feature-text {
    color: #D1D5DB;
    line-height: 1.6;
    font-size: 14px;
}

/* Clickable card/button for example invite */
.lp-example-invite {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: background 120ms ease, border-color 120ms ease;
}

.lp-example-invite:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.lp-shot {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.lp-shot-placeholder {
    width: 100%;
    height: 220px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(16, 185, 129, 0.25));
    border: 1px dashed rgba(255, 255, 255, 0.25);
}

.lp-shot figcaption {
    color: #D1D5DB;
    margin-top: 8px;
    font-size: 13px;
}

/* Per-image caption */
.lp-shot-caption {
    color: #D1D5DB;
    margin-top: 6px;
    font-size: 13px;
    text-align: center;
    display: block;
}

.lp-shot-caption[hidden] {
    display: none !important;
}

/* Real screenshot styling */
.lp-shot-img {
    width: 85%;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

.lp-shot-img {
    -webkit-user-drag: none;
    user-select: none;
}

/* Ensure hidden images are not displayed, overriding base display */
.lp-shot-img[hidden] {
    display: none !important;
}

/* Simple mobile carousel styling */
.lp-carousel {
    position: relative;
}

.lp-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    /* Neutral gradient with opacity for subtle translucency */
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.75) 0%, rgba(71, 85, 105, 0.75) 100%);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.7);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    /* consistent arrow size */
    line-height: 0;
    /* remove baseline extra space for perfect vertical centering */
    padding: 0;
    /* ensure no implicit text padding */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.lp-carousel-btn[hidden] {
    display: none !important;
}

.lp-carousel-btn.prev {
    left: 8px;
}

.lp-carousel-btn.next {
    right: 8px;
}

.lp-carousel-btn:hover {
    filter: brightness(1.05) saturate(1.1);
}

.lp-carousel-btn:active {
    transform: translateY(-50%) scale(0.96);
}

/* Hide arrows when switching to 3-up layout */
@media (min-width: 1024px) {
    .lp-carousel-btn {
        display: none;
    }
}

/* On large screens, show all screenshots side by side with per-image captions below */
@media (min-width: 1024px) {
    .lp-carousel {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto auto;
        /* row 1 = images, row 2 = captions */
        gap: 8px 16px;
        /* row gap, column gap */
        justify-items: center;
        align-items: start;
    }

    .lp-carousel .lp-shot-img {
        grid-row: 1;
        width: 100%;
        max-width: 100%;
        margin: 0;
        display: block;
    }

    .lp-carousel .lp-shot-caption {
        grid-row: 2;
        width: 100%;
        display: block;
    }

    /* Override hidden state on large screens to show all aligned */
    .lp-carousel .lp-shot-img[hidden],
    .lp-carousel .lp-shot-caption[hidden] {
        display: block !important;
    }
}

.lp-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 0 24px;
    margin-top: auto;
}

.lp-footer-text {
    color: #9CA3AF;
    text-align: center;
    margin: 0 0 8px;
    font-size: 13px;
}

.lp-footer-links {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.lp-footer-links a {
    color: #9CA3AF;
    text-decoration: none;
    font-size: 13px;
}

.lp-footer-links a:hover {
    text-decoration: underline;
    color: #E5E7EB;
}

/* Responsive layout tweaks */
@media (min-width: 640px) {
    .lp-title {
        font-size: 32px;
    }

    .lp-subtitle {
        font-size: 18px;
    }
}

@media (min-width: 768px) {
    .lp-feature-block {
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .lp-title {
        font-size: 36px;
    }

    /* Always stack info card above screenshots on large screens too */
    .lp-feature-block {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Event Screen */
.event-screen {
    position: relative;
    width: 100%;
    /* Prefer modern dynamic viewport units, fall back to JS-updated --vh */
    height: 100svh;
    height: 100dvh;
    height: calc(var(--vh, 1vh) * 100);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    /* Prevent body scroll */
}

/* Action Buttons */
.action-buttons {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 100;
    display: flex;
    gap: 8px;
}

/* Attendee badge - positioned below ad banner */
.attendee-badge {
    position: absolute;
    top: 82px;
    /* 16px (top margin) + 50px (ad min-height) + 16px (spacing) */
    right: 16px;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 9999px;
    /* stays circular for small numbers, becomes pill for large */
    background-color: rgba(0, 0, 0, 0.55);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    z-index: 100;
    box-sizing: border-box;
}

.attendee-badge .attendee-icon {
    position: absolute;
    width: 80%;
    height: 80%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
}

.attendee-badge #attendee-count {
    position: relative;
    z-index: 1;
    line-height: 1;
}

/* Ad Banner - centered at top */
.ad-banner {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 320px;
    background-color: rgba(0, 0, 0, 0.55);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ad-banner.collapsed .ad-content {
    display: none;
}

.ad-banner.collapsed {
    width: auto;
    min-width: 160px;
}

.ad-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 8px;
    width: 100%;
}

.ad-content .adsbygoogle {
    width: 100%;
    max-width: 100%;
}

.ad-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ad-collapse-btn {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background-color 0.2s ease;
    border-radius: 0 0 8px 8px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ad-collapse-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.ad-collapse-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 1);
}

.ad-collapse-btn .expand-text {
    display: none;
}

.ad-banner.collapsed .ad-collapse-btn svg {
    transform: rotate(180deg);
}

.ad-banner.collapsed .collapse-text {
    display: none;
}

.ad-banner.collapsed .expand-text {
    display: inline;
}

.ad-icon {
    color: rgba(255, 255, 255, 0.7);
}

.action-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.action-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Main Content */
.main-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    /* Ensure proper flex behavior */
    min-height: 0;
}

.scrollable-content {
    flex: 1;
    overflow-y: auto;
    padding: 25vh 16px calc(24px + var(--rsvp-h, 88px) + env(safe-area-inset-bottom, 0px)) 16px;
    /* Match Flutter: top=25vh, left=16, right=16, bottom=24 */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Ensure smooth scrolling */
    scroll-behavior: smooth;
    /* Hide scrollbar for cleaner look */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    /* Ensure proper overflow handling */
    min-height: 0;
}


.scrollable-content::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

/* Event Title - Match Flutter heading1 */
.event-title {
    font-size: 32px;
    /* Match Flutter heading1 */
    font-weight: 700;
    /* Match Flutter bold */
    text-align: center;
    margin-bottom: 16px;
    /* Match Flutter SizedBox(height: 16) */
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.87);
    width: 100%;
}

/* Event Date - Match Flutter heading3 */
.event-date {
    font-size: 24px;
    /* Match Flutter heading3 */
    font-weight: 600;
    /* Match Flutter semiBold */
    text-align: center;
    margin-bottom: 24px;
    /* Match Flutter SizedBox(height: 24) */
    line-height: 1.3;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.87);
    white-space: pre-line;
    width: 100%;
}

/* Address Section - Match Flutter Row with mainAxisAlignment.center */
.address-section {
    display: flex;
    align-items: center;
    gap: 12px;
    /* Match Flutter SizedBox(width: 12) */
    margin-bottom: 32px;
    /* Match Flutter SizedBox(height: 32) */
    justify-content: center;
    width: 100%;
}

.event-address {
    color: inherit;
    text-decoration: none;
    font-size: 14px;
    /* Match Flutter eventAddress */
    font-weight: 500;
    /* Match Flutter medium */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.87);
    text-align: center;
}

.event-address:hover {
    text-decoration: underline;
}

/* Link styling inside event address: inherit color, always underline */
.event-address a,
.event-address a:visited,
.event-address a:hover,
.event-address a:active,
.event-address a:focus {
    color: inherit;
    text-decoration: underline;
}

.maps-btn {
    width: 36px;
    /* Match Flutter CircleBorder + padding */
    height: 36px;
    border: none;
    border-radius: 50%;
    background-color: #2563EB;
    /* Match Flutter Colors.blue[600] */
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    padding: 8px;
    /* Match Flutter EdgeInsets.all(8) */
}

.maps-btn:hover {
    background-color: #1D4ED8;
}

/* Description Container - Match Flutter exactly */
.description-container {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Match Flutter Colors.black.withValues(alpha: 0.5) */
    border-radius: 12px;
    /* Match Flutter BorderRadius.circular(12) */
    padding: 16px;
    /* Match Flutter EdgeInsets.all(16) */
    margin-bottom: 0;
    /* No margin in Flutter */
    box-shadow: none;
    /* No shadow in Flutter */
}

.event-description {
    font-size: 16px;
    /* Match Flutter bodyMedium */
    line-height: 1.6;
    color: #FFFFFF;
    text-align: left;
    font-weight: 400;
    /* Match Flutter regular */
    white-space: pre-line;
    /* Preserve line breaks like Flutter */
}

/* Link styling inside event description: inherit color, always underline */
.event-description a,
.event-description a:visited,
.event-description a:hover,
.event-description a:active,
.event-description a:focus {
    color: inherit;
    text-decoration: underline;
}

/* RSVP Section - Match Flutter Padding exactly */
.rsvp-section {
    position: relative;
    /* Changed from absolute to relative to match Flutter Column layout */
    padding: 24px 16px calc(16px + env(safe-area-inset-bottom, 0px)) 16px;
    /* Reduced bottom padding by 8px */
    background: none;
    /* Remove drop shadow/gradient behind RSVP button */
    flex-shrink: 0;
    /* Prevent shrinking */
}

.countdown-timer {
    background-color: rgba(239, 68, 68, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 16px;
    /* Match Flutter countdownTimer */
    font-weight: 700;
    /* Match Flutter bold */
    text-align: center;
    margin-bottom: 16px;
    /* Match Flutter SizedBox(height: 16) */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.87);
}

.rsvp-button {
    width: 100%;
    padding: 16px;
    /* Match Flutter EdgeInsets.symmetric(vertical: 16) */
    border: none;
    border-radius: 12px;
    /* Match Flutter BorderRadius.circular(12) */
    background-color: #3B82F6;
    color: white;
    font-size: 18px;
    /* Match Flutter darkRsvpButton */
    font-weight: 700;
    /* Match Flutter bold */
    cursor: pointer;
    transition: all 0.2s ease;
    /* Ensure button stays at bottom */
    position: relative;
    z-index: 10;
}

.rsvp-button:hover {
    background-color: #2563EB;
    transform: translateY(-2px);
}

.rsvp-button:disabled {
    background-color: #6B7280;
    cursor: not-allowed;
    transform: none;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    /* Increased z-index for mobile compatibility */
    overflow: hidden;
    /* Prevent body scroll on mobile */
}

/* Mobile-specific modal fixes */
@media (max-width: 768px) {
    .modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        /* Dynamic viewport height for mobile */
        z-index: 9999;
        -webkit-transform: translateZ(0);
        /* Force hardware acceleration */
        transform: translateZ(0);
    }

    .modal-content {
        width: 95%;
        max-width: none;
        max-height: 85vh;
        max-height: 85dvh;
        margin: 0 16px;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    .rsvp-dialog-content,
    .download-dialog-content {
        width: 95%;
        max-width: none;
        max-height: 85vh;
        max-height: 85dvh;
        margin: 0 16px;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

.modal-content {
    background-color: #1F2937;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* RSVP Dialog Specific Styles - Match Flutter exactly */
.rsvp-dialog-content {
    background-color: #1F2937;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Download Dialog Specific Styles */
.download-dialog-content {
    background-color: #1F2937;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.download-dialog-title {
    padding: 20px 24px 0 24px;
    margin-bottom: 16px;
    text-align: center;
}

.download-dialog-title h2 {
    font-size: 24px;
    font-weight: 700;
    color: #F9FAFB;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.download-dialog-title p {
    font-size: 16px;
    color: #D1D5DB;
    margin: 0;
    line-height: 1.4;
}

.download-dialog-body {
    padding: 0 24px 16px 24px;
    display: flex;
    justify-content: center;
}

.download-store-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-store-badge {
    display: inline-block;
    text-decoration: none;
    padding: 0;
    border: 0;
    background: transparent;
    min-width: 0;
    transition: opacity 0.2s ease;
}

.download-store-badge:hover {
    opacity: 0.9;
}

.download-store-badge img {
    height: 50px;
    width: auto;
    display: block;
}

.download-dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 20px 24px;
    border-top: 1px solid #374151;
}

.rsvp-dialog-title {
    padding: 20px 24px 0 24px;
    margin-bottom: 16px;
}

.rsvp-dialog-title h2 {
    font-size: 20px;
    font-weight: 600;
    color: #F9FAFB;
    margin: 0;
    line-height: 1.2;
}

.rsvp-dialog-body {
    padding: 0 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.rsvp-dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 1px solid #374151;
}

/* Banner Styles - Match Flutter exactly */
.profile-info-banner,
.info-banner,
.warning-banner {
    padding: 12px 8px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid;
}

.profile-info-banner {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: #10B981;
}

.info-banner {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: #F59E0B;
}

.warning-banner {
    background-color: rgba(248, 113, 113, 0.1);
    border-color: #F87171;
}

.banner-content {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.banner-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.profile-info-banner .banner-icon {
    color: #10B981;
}

.info-banner .banner-icon {
    color: #F59E0B;
}

.warning-banner .banner-icon {
    color: #F87171;
}

.banner-content span {
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
}

.profile-info-banner .banner-content span {
    color: #10B981;
}

.info-banner .banner-content span {
    color: #F59E0B;
}

.warning-banner .banner-content span {
    color: #F87171;
}

.warning-text {
    flex: 1;
}

.warning-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
}

.warning-message {
    font-size: 14px;
    line-height: 1.4;
}

/* Form Fields - Match Flutter exactly */
.form-fields {
    margin-bottom: 8px;
}

.form-group {
    margin-bottom: 8px;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* Custom slider */
.slider {
    position: relative;
    width: 100%;
    height: 28px;
    cursor: pointer;
    user-select: none;
    touch-action: none;
}

.slider-track {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 6px;
    background: #374151;
    border-radius: 9999px;
    transform: translateY(-50%);
}

.slider-fill {
    position: absolute;
    top: 50%;
    left: 0;
    height: 6px;
    background: #3B82F6;
    border-radius: 9999px;
    transform: translateY(-50%);
}

.slider-thumb {
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    background: #3B82F6;
    border: 2px solid #1F2937;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Slider styles for party size */
#rsvp-party-size {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 9999px;
    background: #374151;
    outline: none;
}

#rsvp-party-size::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3B82F6;
    cursor: pointer;
    border: 2px solid #1F2937;
    margin-top: -6px;
    /* centers the thumb on a 6px track */
}

#rsvp-party-size::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3B82F6;
    cursor: pointer;
    border: 2px solid #1F2937;
}

#rsvp-party-size::-moz-range-track {
    height: 6px;
    border-radius: 9999px;
    background: #374151;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #9CA3AF;
    z-index: 1;
}

.form-group input {
    width: 100% !important;
    padding: 12px 16px 12px 48px !important;
    border: 1px solid #374151;
    border-radius: 8px;
    background-color: #111827;
    color: #F9FAFB;
    font-size: 16px;
    font-weight: 400;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.form-group input::placeholder {
    color: #9CA3AF;
}

.form-group input:focus {
    outline: none;
    border-color: #3B82F6;
}

.form-group input:disabled {
    background-color: #374151;
    color: #6B7280;
    cursor: not-allowed;
}

.error-message {
    color: #F87171;
    font-size: 14px;
    margin-top: 4px;
    min-height: 20px;
}

/* Loading Spinner for Submit Button */
.loading-spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Button Styles - Match Flutter exactly */
.btn-primary,
.btn-secondary {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    text-align: center;
}

.btn-primary {
    background-color: #10B981;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #059669;
}

.btn-primary:disabled {
    background-color: #6B7280;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: transparent;
    color: #6B7280;
}

.btn-secondary:hover:not(:disabled) {
    background-color: rgba(107, 114, 128, 0.1);
}

.btn-secondary:disabled {
    color: #4B5563;
    cursor: not-allowed;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #374151;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #FFFFFF;
}

.close-btn {
    background: none;
    border: none;
    color: #9CA3AF;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #FFFFFF;
}

/* Form Styles */
.rsvp-form {
    padding: 0;
}

.form-group {
    margin-bottom: 8px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #D1D5DB;
}



.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    justify-content: center;
    text-align: center;
}

.btn-primary {
    background-color: #3B82F6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563EB;
}

.btn-secondary {
    background-color: #374151;
    color: #D1D5DB;
}

.btn-secondary:hover {
    background-color: #4B5563;
}

/* .btn-danger removed with delete dialog */

/* RSVP List removed */

/* Modal Body */
.modal-body {
    padding: 24px;
}

.modal-body p {
    color: #D1D5DB;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 1px solid #374151;
}

/* Android Chrome fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (max-width: 768px) {
    .modal {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
    }
}

/* Chrome, Brave, Opera specific mobile fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .modal {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000;
        perspective: 1000;
    }

    /* Force modal visibility on problematic mobile browsers */
    .modal:not(.hidden) {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .modal {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    .modal-content {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
    }
}