/* 1. Root Container - Centering & Background */
.donation-screen-root {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    padding: 20px !important;
    background-attachment: fixed;
    overflow-y: auto;
}

/* 2. The Main Card (Glassmorphism Effect) */
.donation-step-container {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);

    /* Responsive width: 100% on mobile, max 1100px on desktop */
    width: 100% !important;
    max-width: 1100px !important;
    margin: 0 auto;
    padding: clamp(15px, 3vw, 40px) !important;
    transition: all 0.3s ease;
}

/* 3. The Responsive Split (The Magic) */
.responsive-split-layout {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important; /* Forces wrap on small screens */
    gap: 25px;
    width: 100% !important;
    margin-top: 20px;
}

/* 4. The Panels (Grids) */
.split-panel {
    /* On desktop: 2 columns minus gap. On mobile: 100% */
    flex: 1 1 450px !important;
    min-width: 0; /* Fixes Vaadin grid overflow */
    display: flex;
    flex-direction: column;
}

/* 5. Customizing Scrollers for Professional Look */
vaadin-scroller {
    border: 1px solid #eef0f2;
    border-radius: 12px;
    background: #fdfdfd;
    height: 500px !important; /* Fixed height for the scroll area */
}

/* 6. Typography */
.donationText {
    font-size: clamp(1.5rem, 5vw, 2.2rem) !important;
    font-weight: 800 !important;
    color: #1a202c;
    text-align: center;
    letter-spacing: -0.02em;
}

.donationStepText {
    font-size: 1.1rem !important;
    color: #4a5568;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
}

/* 7. Grid Customization */
vaadin-grid {
    border: none !important;
    font-family: inherit !important;
}

vaadin-grid::part(row):hover {
    background-color: #f7fafc !important;
}

/* 8. Mobile Specific Tweak */
@media (max-width: 900px) {
    .donation-screen-root {
        padding: 10px !important;
    }

    .donation-step-container {
        border-radius: 0; /* Full width on mobile */
    }

    .split-panel {
        flex: 1 1 100% !important; /* Force full width */
    }

    vaadin-scroller {
        height: 350px !important; /* Shorter scrollers on mobile */
    }
}

/* 9. Buttons */
vaadin-button {
    border-radius: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1.5em !important;
}

/* 1. Setup the container to cover the screen and block clicks */
.v-loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483647;
    pointer-events: auto; /* Prevents clicking buttons while loading */
    background-color: rgba(255, 255, 255, 0.4); /* Optional: dims the background */
    cursor: wait;
}

/* 2. Create the rotating circle using a pseudo-element */
.v-loading-indicator::after {
    content: "";
    position: fixed;
    /* Center the spinner */
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    margin-left: -20px;

    /* Spinner style */
    border: 4px solid #e0e0e0; /* Gray background circle */
    border-top: 4px solid #2d76d2; /* Blue spinning part */
    border-radius: 50%;

    /* Animation */
    animation: v-spin 1s linear infinite;
}

/* 3. The rotation animation */
@keyframes v-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Optional: Only show the spinner after a short delay (e.g. 300ms)
   to prevent flickering on very fast requests */
.v-loading-indicator {
    animation: fadein 0.3s ease-in;
}

@keyframes fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}
/* Disable default theme, annoying scroller shows. */
body{
    overflow: hidden;
}


/* Submission flow timeline */
.timeline-container {
    position: relative;
    padding-left: 40px;
}

.timeline-line {
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e5e7eb;
    z-index: 1;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    left: -40px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid #3b82f6;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-dot.rejected {
    border-color: #ef4444;
}

.timeline-dot.conditional {
    border-color: #f59e0b;
}

.timeline-dot.approved {
    border-color: #10b981;
}
