:root {
    /* Brand Colors - Grape Specific */
    --primary-purple: #b444eb; /* Brighter purple to match your image */
    --secondary-purple: #8b5cf6;
    --main-gradient: linear-gradient(135deg, #c026d3, #8b5cf6);
    --shadow-purple: rgba(139, 92, 246, 0.25);

    /* Neutral Colors */
    --bg-light: #f5f5f5;
    --bg-white-trans: rgba(255, 255, 255, 0.95);
    --text-dark: #333333;
    --text-muted: #888888;
    --border-light: rgba(255, 255, 255, 0.2);

    /* Layout Constants */
    --border-radius: 24px; /* Slightly rounder to match image */
    --btn-radius: 30px;

    /* Tags */
        --title-tag-number-bg: #8c42f0;
        --title-tag-text-bg: #d7bdf9;
        --title-tag-text-color: #523895;
}

body.login-body {
    background: #f0f0f4; /* Soft grey background from your image */
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.container {
    padding: 0 20px;
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 50px;
}

/* ==========================================
   MISSING LOGO AREA & PURPLE CIRCLE CSS
   ========================================== */
.logo-area {
    margin-top: 50px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.logo-float {
    width: 110px;
    height: 110px;
    object-fit: contain;
    margin-bottom: 25px;
    position: relative;
    top: 35px;
    z-index: 2;
    animation: logoFloat 3s ease-in-out infinite;
}

.logotext-img {
    width: 220px;
    height: auto;
    display: block;
    margin: 0 auto;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* ==========================================
   CARDS AND INPUTS
   ========================================== */
.login-form {
    width: 100%;
    background: var(--bg-white-trans);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius);
    padding: 35px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.login-form h1 {
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 15px;
    text-align: center;
    color: var(--text-dark);
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
}

.input-group { margin-bottom: 16px; position: relative; width: 100%; }

input[type="text"], input[type="email"], input[type="password"] {
    width: 100%;
    height: 56px;
    padding: 18px 20px;
    border: 2px solid transparent;
    background: var(--bg-light);
    border-radius: 14px;
    font-size: 15px;
    color: #333;
    display: block;
    transition: all 0.3s;
    outline: none;
    box-sizing: border-box;
}

input:focus {
    background: #fff;
    box-shadow: 0 0 0 4px rgba(192, 38, 211, 0.1);
}

/* ==========================================
   MISSING PASSWORD EYE ICON CSS
   ========================================== */
.password-wrapper {
    position: relative;
    width: 100%;
    display: block;
}

input[type="password"] {
    padding-right: 50px; /* Make room for the eye icon */
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    color: #888;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* SVG eye icon toggle (purple, replaces emoji) */
.password-toggle .eye-show,
.password-toggle .eye-hide {
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--primary-purple);
    line-height: 0;
}
.password-toggle .eye-show { display: inline-flex; }
.password-toggle.password-visible .eye-show { display: none; }
.password-toggle.password-visible .eye-hide { display: inline-flex; }

/* ==========================================
   BUTTONS & LINKS
   ========================================== */
.login-btn {
    width: 100%;
    padding: 16px;
    background: var(--main-gradient);
    border: none;
    border-radius: var(--btn-radius);
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 25px var(--shadow-purple);
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px var(--shadow-purple);
}

.login-btn:active {
    transform: scale(0.98);
}

.forgot-password {
    text-align: right;
    margin: 5px 0 25px;
}

.forgot-password a {
    color: #c026d3; /* Pinkish purple from your image */
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.signup-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #888;
}

.signup-link a {
    color: #c026d3;
    font-weight: 600;
    text-decoration: none;
}

/* Social Buttons */
.social-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
}

.social-link {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 40px;
    border-radius: 20px; font-size: 16px; font-weight: 600;
    text-decoration: none; border: none; cursor: pointer;
}

/* Google Sign-In button container — rendered by GIS renderButton() */
#googleSignInBtnContainer {
    display: flex;
    justify-content: center;
    transition: transform 0.2s ease;
    cursor: pointer;
}
#googleSignInBtnContainer:hover {
    transform: translateY(-2px);
}

/* Footer */
.rights-footer {
    text-align: center;
    width: 100%;
    color: var(--text-muted);
    font-size: 14px;
    padding: 20px 0;
}

/* Logout wrapper on app-settings page */
.settings-logout-wrapper {
    text-align: center;
    margin: 40px 0;
    padding-bottom: 40px;
}
@media (max-width: 768px) {
    /* Mobile: keep top margin (40px from base) so logout doesn't touch card above; bottom gap matches login page (70px total to footer) */
    .app-settings-body .settings-logout-wrapper { margin-bottom: 0; padding-bottom: 60px; }
}

/* Button Loading State */
.login-btn.loading {
    color: transparent;
    position: relative;
    pointer-events: none;
}
.login-btn-spinner {
    width: 36px;
    height: 36px;
    position: absolute;
    top: calc(50% - 18px);
    left: calc(50% - 18px);
}
.login-btn-spinner .login-spinner-dot {
    width: 5px;
    height: 5px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    animation: login-pulse 1.2s ease-in-out infinite;
}
@keyframes login-pulse {
    0%, 100% { transform: scale(0.6); opacity: 0.4; }
    50% { transform: scale(1.4); opacity: 1; }
}

/* Generic Button Pulsing Dots Spinner */
.btn-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    position: relative;
    vertical-align: middle;
}
.btn-spinner .btn-spinner-dot {
    width: 4px;
    height: 4px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    animation: btn-pulse 1.2s ease-in-out infinite;
}
@keyframes btn-pulse {
    0%, 100% { transform: scale(0.6); opacity: 0.4; }
    50% { transform: scale(1.4); opacity: 1; }
}

/* ==========================================
   FORGOT PASSWORD: 4-DIGIT CODE INPUTS (SEPARATE & SQUARED)
   ========================================== */
.login-form .code-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    gap: 15px !important;
    width: 100% !important;
    margin-bottom: 25px !important;
}

.login-form .code-input {
    flex: 0 0 50px !important;
    width: 50px !important;
    height: 50px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-block !important;

    text-align: center !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    box-sizing: border-box !important;
    transition: all 0.3s;
}

/* Updated focus ring to match purple theme */
.login-form .code-input:focus {
    border-color: #b444eb !important;
    box-shadow: 0 0 0 4px rgba(192, 38, 211, 0.1) !important;
    outline: none !important;
}

/* Keep the step 2 container initially hidden for the multi-step form */
#step2 {
    display: none;
    animation: slideUp 0.4s ease-out;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-shake {
    animation: shake 0.4s;
    border-color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.05);
}

/* ==========================================
   1. DASHBOARD LAYOUT (Grid System)
   Layout shell (sidebar, header, main-container positioning)
   is defined in shared.css. This section adds content-level
   styling only.
   ========================================== */

.dashboard-grid {
    display: grid;
    /* This creates the Einstein responsive layout */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

/* ==========================================
   2. ADMIN CARDS
   ========================================== */

.admin-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
    position: relative;
    transition: box-shadow 0.2s ease;

    /* ADD THESE TWO LINES */
    width: 100%;
    box-sizing: border-box;
}

.admin-card:hover {
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.1);
}

/* Clickable admin cards get the lift animation on hover */
.admin-card-clickable {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}
.admin-card-clickable:hover {
    transform: translateY(-5px);
}

/* The colorful strip on the left */
.admin-card.highlight::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(to bottom, #d946ef, #8b5cf6);
}

.card-header {
    padding: 20px 25px;
    background: #fafafa;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 17px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 i {
    color: #8b5cf6; /* Purple Einstein Icons */
}

.card-body {
    padding: 25px;
}

/* Tighter body for menu-style cards */
.card-body.no-padding {
    padding: 0;
}

/* ==========================================
   3. INTERACTIVE ELEMENTS (Grape Style)
   ========================================== */

/* Standardized action row for all blocks (text left, icon right, fully clickable) */
.block-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 15px;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    transition: padding-left 0.16s ease, background 0.2s;
}
.block-action-row:last-child { border-bottom: none; }
.block-action-row:hover { padding-left: 24px; background: #faf5ff; }

/* Action row icons — fixed-width centered column so plain icons align across rows */
.block-action-row .row-icon {
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-purple);
    font-size: 20px;
    transition: transform 0.15s ease;
}
/* .action-icon-circle keeps its own 30x30 circle; pad to match the 36px .row-icon column */
.block-action-row .action-icon-circle {
    flex-shrink: 0;
    margin-left: 3px;
    margin-right: 3px;
    transition: transform 0.15s ease;
}
.block-action-row:hover .row-icon,
.block-action-row:hover .action-icon-circle { transform: scale(1.13); }

/* DEPRECATED: Use .block-action-row instead */
.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 25px;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    transition: background 0.2s;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: #fdf4ff; /* Very light pink/purple */
}

.menu-item span {
    font-size: 15px;
    font-weight: 500;
    color: #4b5563;
}

/* Circular Buttons */
.edit-btn, .question-mark-btn, .settings-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: filter 0.2s;
}

.edit-btn { background: #e879f9; }
.question-mark-btn { background: #b46dfd; }
.settings-btn { background: linear-gradient(135deg, #d946ef, #8b5cf6); }

/* Floating edit button on .admin-card — smaller + inset from edges */
.edit-btn.top-right {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.edit-btn:hover, .question-mark-btn:hover, .settings-btn:hover {
    filter: brightness(1.1);
}

/* Metrics (Einstein Numbers) */
.metrics-flex {
    display: flex;
    justify-content: center;
    padding: 10px 0;
}

.metric-item label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #9ca3af;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.metric-value {
    font-size: 42px;
    font-weight: 800;
    color: #8b5cf6;
}

/* ==========================================
   4. ANIMATIONS
   ========================================== */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   5. MOBILE RESPONSIVENESS
   ========================================== */
@media (max-width: 768px) {
    .main-container {
        margin-left: 0;
        padding: 100px 20px 90px; /* bottom clears the 70px mobile nav */
    }
}

/* ==========================================
   6. GUEST LIST STYLES
   ========================================== */

.stats-banner {
    background: linear-gradient(90deg, #38ef7d 10%, #11998e 90%);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.18);
}

.stats-banner-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.stats-banner-item {
    text-align: center;
    min-width: 0;
    flex: 1 1 0;
}

.stats-banner-item.total-item {
    border-left: 2px solid rgba(255,255,255,0.3);
    padding-left: 15px;
}

.stats-number { font-size: clamp(24px, 8vw, 48px); font-weight: 300; margin-bottom: 5px; line-height: 1; }
.stats-label {
    font-size: clamp(8px, 2.5vw, 14px);
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: clamp(0px, 0.3vw, 1px);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.2;
}

@media (max-width: 450px) {
    .stats-banner { padding: 20px 10px; }
    .stats-banner-row { gap: 4px; }
    .stats-banner-item.total-item { padding-left: 10px; }
    .stats-label { font-size: clamp(8px, 2.2vw, 11px); letter-spacing: 0; }
    .stats-number { font-size: clamp(22px, 7vw, 36px); }
}

@media (max-width: 350px) {
    .stats-banner { padding: 15px 8px; }
    .stats-banner-row { gap: 2px; }
    .stats-banner-item.total-item { padding-left: 6px; }
    .stats-label { font-size: 8px; text-transform: none; }
    .stats-number { font-size: 22px; }
}

/* Nested variant: stats-banner used inside a narrow card (event-home Guest List). */
/* Reuses .stats-banner gradient + structure, just trims padding/font to fit a ~270px-wide card body. */
.stats-banner.stats-banner-nested {
    padding: 16px 10px;
    margin-bottom: 0;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(34, 197, 94, 0.16);
}
.stats-banner.stats-banner-nested .stats-banner-row {
    flex-wrap: wrap;       /* safety net: if labels still don't fit, whole items wrap to new row */
    gap: 8px 6px;          /* row-gap col-gap */
    justify-content: space-around;
}
.stats-banner.stats-banner-nested .stats-banner-item {
    flex: 0 1 auto;        /* size to content rather than equal columns */
    padding: 0 4px;
}
.stats-banner.stats-banner-nested .stats-number {
    font-size: 26px;       /* uniform size so all numbers match */
}
.stats-banner.stats-banner-nested .stats-label {
    font-size: 10px;       /* uniform size so all labels match (no clamp to keep consistency) */
    letter-spacing: 0;
    white-space: nowrap;   /* never wrap a single label across two lines */
    word-wrap: normal;
    overflow-wrap: normal;
    hyphens: none;
}
.stats-banner.stats-banner-nested .stats-banner-item.total-item {
    padding-left: 8px;
    border-left: 2px solid rgba(255, 255, 255, 0.3);
}

@media (max-width: 450px) {
    .stats-banner.stats-banner-nested { padding: 14px 8px; }
    .stats-banner.stats-banner-nested .stats-number { font-size: 24px; }
    .stats-banner.stats-banner-nested .stats-label { font-size: 9.5px; }
    .stats-banner.stats-banner-nested .stats-banner-item.total-item { padding-left: 6px; }
}

@media (max-width: 350px) {
    .stats-banner.stats-banner-nested { padding: 12px 6px; }
    .stats-banner.stats-banner-nested .stats-number { font-size: 22px; }
    .stats-banner.stats-banner-nested .stats-label { font-size: 9px; }
    .stats-banner.stats-banner-nested .stats-banner-item.total-item { padding-left: 5px; }
}

/* Control Panel */
.controls-card {
    background: var(--bg-white-trans);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 15px;
    transition: all 0.3s ease;
    flex: 1;
}

.control-btn:hover {
    background: rgba(180, 68, 235, 0.05);
    transform: translateY(-2px);
}

.control-icon {
    width: 44px;
    height: 44px;
    background: var(--main-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    margin-bottom: 8px;
    box-shadow: 0 4px 10px var(--shadow-purple);
}

.control-label { font-size: 12px; color: var(--text-muted); font-weight: 600; }

/* View Mode Cards */
.view-mode-card {
    padding: 22px 18px;
    border-radius: 17px;
    background: #fff;
    border: 1.8px solid #ede3ff;
    box-shadow: 0 2px 16px rgba(154,67,255,0.08);
}

.view-mode-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.vm-section, .vm-column { display: flex; flex-direction: column; gap: 10px; }
/* ---- VM-Button Toggle Pattern (project-wide) ----
   Toggle button component. See CLAUDE.md "New toggle button" and main.js section 10.
   Modes: .vm-section = radio, .vm-column = checkbox.
   Toggle logic lives in main.js (global handler) or in page-specific onclick.
*/
.vm-choice-row { display: flex; align-items: center; gap: 12px; }

.vm-button {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 2px solid #d6c8f5;
    background: #fff;
    color: var(--primary-purple);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vm-button i { opacity: 0; transition: opacity 0.2s ease; }
.vm-button.active i { opacity: 1; }

.vm-button.active {
    background: #f6e7ff;
    border-color: var(--primary-purple);
}

.vm-labels span {
    font-size: 15px;
    color: var(--primary-purple);
    font-weight: 700;
}

/* Guest List Items */
.guest-item {
    background: var(--bg-white-trans);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
    position: relative;
    border-left: 4px solid var(--primary-purple);
    animation: slideUp 0.4s ease-out;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.guest-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.guest-item:hover .edit-guest { color: var(--primary-purple); }

.guest-number {
    position: absolute;
    left: -14px; /* Pulled out slightly to sit perfectly on the border */
    top: 20px;
    background: var(--primary-purple);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 5px var(--shadow-purple);
}

.guest-info {
    margin-left: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.guest-details h4 { font-size: 16px; color: var(--text-dark); margin: 0; }
.guest-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #ff8c42, #ff6b1a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    margin-right: 15px;
}

.edit-guest {
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s;
}

.edit-guest:hover { color: var(--primary-purple); }

/* Sub Guests */
.multiple-guests { border-left-color: var(--secondary-purple); }
.multiple-guests .guest-number { background: var(--secondary-purple); }

.sub-guest {
    display: flex;
    align-items: center;
    margin-top: 15px;
    padding-left: 35px;
}

.sub-guest .guest-avatar { width: 28px; height: 28px; font-size: 12px; }
.sub-guest span { font-size: 14px; color: var(--text-muted); }

/* Floating Add Button */
.add-guest-btn {
    position: fixed;
    bottom: 100px; /* High enough to clear mobile menu */
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--main-gradient);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 25px var(--shadow-purple);
    transition: transform 0.2s ease;
    z-index: 99;
}

.add-guest-btn:hover { transform: scale(1.1); }


/* ==========================================
   EDIT GUEST FAMILY STYLES
   ========================================== */

/* Field row: label + input + pencil in a row */
.egf-field-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.egf-field-label {
    min-width: 120px;
    color: var(--text-dark);
    font-size: 14px;
    text-align: right;
    flex-shrink: 0;
}

.egf-field-input {
    flex: 1;
    min-width: 120px;
    border: none;
    border-bottom: 1px solid transparent;
    background: transparent;
    font-size: 14px;
    color: var(--text-dark);
    padding: 6px 4px;
    outline: none;
    transition: border-color 0.2s;
}

.egf-field-input:focus {
    border-bottom: 1px solid var(--primary-purple);
}

.egf-field-select {
    flex: 1;
    min-width: 120px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
    font-size: 14px;
    color: var(--text-dark);
    padding: 8px 12px;
    outline: none;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: auto;
}

.egf-field-select:focus {
    border-color: var(--primary-purple);
}

/* Small pencil button for inline edit */
.egf-pencil-btn {
    width: 30px;
    height: 30px;
    font-size: 14px;
    flex-shrink: 0;
}

/* Member card accordion */
.egf-member-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 4px 0;
}

.egf-member-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
}

.egf-trash-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.egf-trash-btn:hover {
    opacity: 1;
}

.egf-chevron {
    transition: transform 0.3s ease;
}

/* Responsive adjustments for field rows */
@media (max-width: 480px) {
    .egf-field-label {
        min-width: 100px;
        font-size: 13px;
    }
    .egf-field-row {
        gap: 6px;
    }
}


/* ==========================================
   7. SETTINGS STYLES
   ========================================== */

/* Language Dropdown */
.language-selector-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;     /* long labels (eg German) wrap the box to next line instead of overflowing the card */
    gap: 8px 12px;
}

.language-label {
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 600;
}

.language-selector-wrapper {
    position: relative;
    z-index: 20;
    margin-left: auto;   /* keep the selector flush-right whether inline or wrapped to its own line */
}

/* An open dropdown must overlay the fields below it. Each
   .language-selector-wrapper is its own stacking context (z-index:20), so the
   options panel's z-index can't beat later sibling wrappers. Raise the whole
   wrapper only while it's open — stays below modals/overlays (z-index 10000+). */
.language-selector-wrapper:has(.language-selector.open) {
    z-index: 100;
}

.language-selector {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 140px;
    transition: all 0.2s ease;
}

.language-selector:hover,
.language-selector.open {
    background: #fff;
    border-color: var(--primary-purple);
    box-shadow: 0 4px 15px var(--shadow-purple);
}

.language-selector .chevron {
    margin-left: 15px;
    color: var(--primary-purple);
    font-size: 12px;
    transition: transform 0.2s ease;
}

.language-selector.open .chevron {
    transform: rotate(180deg);
}

.language-options {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0,0,0,0.05);
    z-index: 9999;
    min-width: 160px;
    display: none;
    flex-direction: column;
    padding: 8px 0;
    overflow: hidden;
}

.language-selector.open + .language-options {
    display: flex;
    animation: slideUp 0.2s ease-out;
}

.language-option {
    padding: 12px 18px;
    font-size: 15px;
    color: var(--text-dark);
    cursor: pointer;
    transition: background 0.2s;
}

.language-option:hover {
    background: #fdf4ff;
    color: var(--primary-purple);
}

.language-option.selected {
    font-weight: 700;
    color: var(--primary-purple);
    background: #fdf4ff;
}

.language-option.highlighted {
    background: #fdf4ff;
    color: var(--primary-purple);
}

/* Login page language selector — top-right corner */
.login-lang-selector {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 100;
}

.login-lang-selector .language-selector {
    padding: 8px 12px;
    min-width: auto;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
}

.login-lang-selector .language-options {
    min-width: 140px;
}

/* Archived Items */
.archived-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.archived-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.archived-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
}

.archive-icon {
    color: var(--text-muted);
    font-size: 18px;
    transition: color 0.2s;
    cursor: pointer;
}

.archive-icon:hover {
    color: var(--primary-purple);
}

/* Danger Button (Red Gradient) */
.danger-btn {
    padding: 16px;
    background: linear-gradient(135deg, #ff5f57, #ff2a2a);
    border: none;
    border-radius: var(--btn-radius);
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 25px rgba(255, 42, 42, 0.25);
}

.danger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 42, 42, 0.35);
}

/* ==========================================
   8. EXPORT PAGE STYLES
   ========================================== */

/* Field Pills */
.fields-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.field-pill {
    background: #f7f4fd;
    color: var(--secondary-purple);
    border: 1.5px solid #e2d7f6;
    font-weight: 600;
    font-size: 15px;
    border-radius: 12px;
    padding: 8px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.field-pill.selected {
    background: var(--main-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 15px var(--shadow-purple);
}

.field-pill:hover:not(.selected) {
    background: #ede6fa;
}

/* Export Format Boxes */
.export-format-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.export-format-box {
    background: var(--bg-light);
    border-radius: 14px;
    height: 80px;
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    flex-grow: 1; /* Allows them to stretch slightly to fill space */
    max-width: 100px;
}

.export-format-box.selected {
    border-color: var(--primary-purple);
    background: #fdf4ff;
    box-shadow: 0 4px 15px rgba(180, 68, 235, 0.15);
}

.export-format-icon {
    font-size: 26px;
    color: var(--secondary-purple);
    margin-bottom: 6px;
    transition: transform 0.2s;
}

.export-format-box.selected .export-format-icon {
    color: var(--primary-purple);
    transform: scale(1.1);
}

.export-format-text {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 700;
}

.export-format-text.selected {
    color: var(--primary-purple);
}

/* Destination Dropdown */
.destination-select {
    width: 100%;
    border-radius: 12px;
    padding: 14px 16px;
    border: 1.5px solid rgba(0,0,0,0.1);
    font-size: 15px;
    margin-top: 10px;
    background: #fff;
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s;
    cursor: pointer;
}

.destination-select:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(180, 68, 235, 0.1);
}

/* ==========================================
   9. PREMIUM PAGE STYLES
   ========================================== */

.premium-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.premium-info {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 12px;
    text-align: justify;
}

.premium-info:last-of-type {
    margin-bottom: 0;
}

/* Floating Help Button */
.question-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--main-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    float: right;
    margin: -5px -5px 15px 15px;
    box-shadow: 0 4px 12px var(--shadow-purple);
    font-size: 16px;
    transition: transform 0.2s ease;
}

.question-btn:hover {
    transform: scale(1.1);
}

/* Empty Slot Modifier */
.empty-slot-btn {
    background: #d996f3;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(217, 150, 243, 0.3);
}

.empty-slot-btn:hover {
    background: #c982e6;
}

/* Notification Overlay Iframe */
.notification-overlay-iframe {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    border: none;
    display: none;
    z-index: 10000;
    background-color: transparent;
}


/* ==========================================
   10. FORM & EVENT CREATION STYLES
   ========================================== */

.info-text {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-muted);
    background: #f4f2fa;
    border-radius: 12px;
    padding: 16px;
    margin-top: 15px;
    text-align: justify;
}

/* Event Type Pills */
.type-btn-box {
    background: linear-gradient(135deg, rgba(217,70,239,0.05), rgba(139,92,246,0.05));
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 10px;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.option-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.type-btn {
    background: #fff;
    color: var(--secondary-purple);
    border: 2px solid transparent;
    font-weight: 700;
    border-radius: 30px;
    padding: 10px 24px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.type-btn.active {
    background: var(--main-gradient);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 6px 15px var(--shadow-purple);
}

.type-btn:not(.active):hover {
    background: #fdf4ff;
    transform: translateY(-2px);
    border-color: rgba(217, 70, 239, 0.3);
}

.type-btn-clear {
    background: #fff;
    color: var(--secondary-purple);
    border: 2px solid rgba(217, 70, 239, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.type-btn-clear:hover {
    background: #fdf4ff;
    transform: translateY(-2px);
    border-color: rgba(217, 70, 239, 0.5);
}

/* Custom Dropdown Overrides */
.form-dropdown-wrapper {
    width: 100%;
    margin-top: 10px;
}

.form-dropdown-wrapper .language-selector {
    width: 100%;
    min-width: 0; /* let width:100% win over base .language-selector min-width:140px so fixed-width time dropdowns (hour/minute) don't overflow their wrapper */
    background: var(--bg-light);
    border: 2px solid transparent;
    box-shadow: none;
}

.form-dropdown-wrapper .language-options {
    width: 100%;
}

/* ==========================================
   SCROLLABLE DROPDOWNS (For long lists)
   ========================================== */
.scrollable-dropdown {
    max-height: 250px;
    overflow-y: auto;
}

/* Custom scrollbar for dropdowns */
.scrollable-dropdown::-webkit-scrollbar { width: 6px; }
.scrollable-dropdown::-webkit-scrollbar-track { background: transparent; }
.scrollable-dropdown::-webkit-scrollbar-thumb { background: #d1b3ff; border-radius: 4px; }

/* ==========================================
   WIZARD NAVIGATION (Back / Next Buttons)
   ========================================== */
.wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 45px; /* Gives plenty of breathing room from the cards above */
    margin-bottom: 40px;
    gap: 20px; /* Ensures they never touch on tiny phone screens */
}

/* Optional: Make the Back button a reusable class too! */
.premium-btn.outline {
    background: transparent;
    color: var(--secondary-purple);
    border: 2px solid var(--secondary-purple);
    box-shadow: none;
}

.premium-btn.outline:hover {
    background: rgba(139, 92, 246, 0.05); /* Slight purple tint on hover */
    box-shadow: none;
}

/* ==========================================
   EVENT CREATION (STEP 3) INPUTS
   ========================================== */
.address-input, .location-input {
    width: 100%;
    background: #f1eff6;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
    border: 2px solid transparent;
    margin-bottom: 15px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    outline: none;
}

.address-input:focus, .location-input:focus {
    background: #fff;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 4px rgba(180, 68, 235, 0.1);
}

.address-input::placeholder {
    color: #bbb;
}

/* Custom placeholder logic class */
.location-input {
    color: #bbb; /* Acts as placeholder initially */
}
.location-input.typing {
    color: var(--text-dark); /* Turns dark when user types */
}

/* Button row for Search / Skip */
.address-btn-row {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

/* ==========================================
   11. RSVP SETTINGS & FIELD LISTS
   ========================================== */
.guest-fields-list {
    margin-bottom: 24px;
}

.guest-field-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.guest-field-label {
    background: #e5dbfa;
    border: 1px solid #bba3ea;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 500;
    flex: 1;
    margin-right: 12px;
}

/* Up/Down Arrow Buttons */
.field-order-btns {
    display: flex;
    gap: 8px;
}

.move-btn {
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    font-size: 14px;
    color: #fff;
    background: var(--primary-purple);
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.move-btn:disabled, .move-btn[aria-disabled="true"] {
    background: #d4c7e8;
    color: #ad90db;
    cursor: default;
}

.move-btn:not([aria-disabled="true"]):hover {
    background: #8b5cf6; /* Slightly lighter purple on hover */
}

/* Advanced Settings Table */
.advanced-settings-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 16px;
}

.advanced-label {
    width: 40%;
    font-size: 15px;
    color: var(--text-dark);
    text-align: right;
    padding-right: 20px;
    font-weight: 500;
}

.advanced-input-cell {
    width: 50%;
    text-align: left;
}

.advanced-dropdown {
    background: #f8f7fc;
    border: 1.4px solid #e2d7f6;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    color: var(--text-dark);
    width: 100%;
    cursor: pointer;
    outline: none;
}

.advanced-dropdown:focus {
    border-color: var(--primary-purple);
}

.advanced-help-cell {
    width: 10%;
    text-align: right;
    vertical-align: middle;
}

/* ==========================================
   12. RSVP CREATE FIELD (TEMPLATES)
   ========================================== */
.templates-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 10px;
    justify-content: flex-start;
    margin-bottom: 8px;
}

.template-btn {
    background: #f7f4fd;
    color: var(--primary-purple);
    border: 1.4px solid #e2d7f6;
    font-weight: 600;
    font-size: 15px;
    border-radius: 12px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(140,92,246,0.05);
}

.template-btn.selected {
    background: linear-gradient(90deg, #a56dfb, #b46dfd);
    color: #fff;
    box-shadow: 0 4px 14px rgba(140,92,246,0.2);
    border: 1.4px solid transparent;
}

.template-btn .eye-icon {
    font-size: 16px;
}

.custom-field-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    margin-top: 16px;
}

.create-label {
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 500;
}

.create-field-name {
    color: var(--primary-purple);
    font-weight: 600;
    font-size: 16px;
    min-width: 80px;
    border-bottom: 1px dashed var(--primary-purple);
    padding-bottom: 2px;
    cursor: pointer;
}

.create-icon {
    color: var(--primary-purple);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.create-icon:hover {
    color: #8b5cf6;
}

/* ==========================================
   13. RSVP CUSTOM FIELD DETAILS
   ========================================== */
.field-details-row {
    display: flex;
    align-items: center;
    margin: 12px 0 16px 0;
    gap: 12px;
    font-size: 16px;
}

.field-details-label {
    font-weight: 500;
    min-width: 140px;
    color: var(--text-dark);
}

.field-details-value {
    color: var(--primary-purple);
    font-weight: 600;
    font-size: 16px;
}

.field-details-editable {
    border-bottom: 1px dashed var(--primary-purple);
    cursor: pointer;
    transition: opacity 0.2s;
}

.field-details-editable:hover {
    opacity: 0.7;
}

.settings-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
}

.settings-label {
    font-size: 15px;
    color: var(--text-dark);
    min-width: 180px;
    font-weight: 500;
}

/* ==========================================
   14. SAVE THE DATE & INVITATION BLOCKS
   ========================================== */
/* Gives the main cards more internal breathing room */
.content-card {
    background: rgba(255,255,255,0.98);
    border-radius: 19px;
    box-shadow: 0 10px 35px rgba(154,67,255,0.13);
    border: 1.2px solid rgba(200,180,255,0.12);
    padding: 40px 32px;
    margin: 12px 0;
    position: relative;
    animation: slideUp 0.5s ease-out;
    width: 100%; /* Forces the card to stretch to the 800px container */
    box-sizing: border-box; /* Keeps the padding safely inside the box */
}

/* Makes the "Empty Padding" blocks truly tall */
.centered-gray-text {
    text-align: center;
    color: #999;
    font-size: 1.2em; /* INCREASED font size */
    margin: 60px 0;   /* INCREASED from 40px */
    width: 100%;
    display: block;
}

/* DEPRECATED: Use .block-action-row instead */
.list-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 8px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    font-size: 17px; color: #222;
    cursor: pointer;
    transition: background 0.15s;
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: #fcfaff; }

.row-icon { color: var(--primary-purple); font-size: 20px; }
.action-icon-circle {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--primary-purple); color: #fff; font-size: 17px;
    box-shadow: 0 2px 6px rgba(180, 68, 235, 0.18);
    cursor: pointer; transition: transform 0.15s ease;
}
.action-icon-circle:hover { transform: scale(1.13); }

/* Settings Gear Button */
.settings-btn {
    position: absolute; right: 12px; top: 12px;
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #d946ef, #8b5cf6); color: #fff;
    border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2em; cursor: pointer;
    box-shadow: 0 2px 7px rgba(154,67,255,0.11);
    z-index: 10; transition: all .18s;
}
.settings-btn:hover { background: #b46dfd; transform: scale(1.05); }

/* Inside menu-items the gear should flow with the flex row, not float to the card corner */
.menu-item .settings-btn {
    position: static;
    z-index: auto;
}

/* Add Block Zone */
.add-block-zone {
    display: none; /* Hidden by default! */
    align-items: center; justify-content: center;
    padding: 6px 0; margin: 2px 0;
    position: relative; z-index: 5; cursor: pointer; transition: all 0.2s;
}
.add-block-zone::before {
    content: ''; flex: 1; height: 2px;
    background: linear-gradient(to right, transparent 0%, #d946ef 100%);
    opacity: 0.45; transition: opacity 0.2s; border-radius: 2px;
}
.add-block-zone::after {
    content: ''; flex: 1; height: 2px;
    background: linear-gradient(to left, transparent 0%, #d946ef 100%);
    opacity: 0.45; transition: opacity 0.2s; border-radius: 2px;
}
.add-block-zone .dot { display: none; }
.add-block-zone .add-btn {
    width: 44px; height: 44px; flex-shrink: 0; margin: 0 6px;
    background: linear-gradient(135deg, #d946ef, #8b5cf6); color: white;
    border: none; border-radius: 50%; font-size: 1.8em; font-weight: bold;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(154, 67, 255, 0.25); transition: all 0.2s ease;
}
.add-block-zone:hover .add-btn { transform: scale(1.12); box-shadow: 0 6px 18px rgba(154, 67, 255, 0.35); }
.add-block-zone:hover::before,
.add-block-zone:hover::after { opacity: 0.9; }

/* ADD BLOCK button pulse — active when add zones are visible */
@keyframes addZonePulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 2px 6px rgba(180, 68, 235, 0.18); }
    50%       { opacity: 0.55; transform: scale(0.87); box-shadow: 0 2px 12px rgba(180, 68, 235, 0.10); }
}
.action-icon-circle.edit.pulsing {
    animation: addZonePulse 1.3s ease-in-out infinite;
}

/* Invitation Preview Card */
.invite-bg-card {
    margin: 12px 0;
    background: linear-gradient(135deg, #b56cfb 40%, #50eceb 120%);
    border-radius: 22px;
    padding: 20px 15px;
    box-shadow: 0 3px 14px rgba(137, 77, 254, 0.13);
    display: flex; flex-direction: column; align-items: center;
    position: relative; animation: slideUp 0.5s ease-out;
    width: 100%;
    box-sizing: border-box;
}

/* The white frame holding the image - Constrained to phone width */
.invite-img-block {
    background: #fff; border-radius: 13px; margin: 0 auto 16px auto;
    padding: 12px;
    box-shadow: 0 7px 28px rgba(186,88,247,0.12);
    width: 100%;
    max-width: 360px; /* Constrained to typical smartphone width */
    position: relative;
}

/* The actual image - Forced into a tall mobile layout */
.invite-img-block img {
    width: 100%;
    border-radius: 13px;
    display: block;
    aspect-ratio: 3 / 4; /* MAGIC FIX: Forces a tall, portrait phone shape ALWAYS */
    object-fit: cover; /* Ensures the image fills the tall shape beautifully */
}

/* Tags */
.tag-label {
    position: absolute; background: #b46dfd; color: #fff;
    font-size: 0.83em; top: 12px; left: 14px; border-radius: 12px;
    padding: 3px 14px 3px 10px; font-weight: 700; z-index: 2;
    display: flex; align-items: center; height: 26px;
}
.tag-label .tag-number {
    margin-right: 6px; background: #a565fa; border-radius: 50%;
    width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
}
.tag-label.bg { left: unset; right: 14px; background: #d946ef; bottom: 11px; top: unset; }

.inline-tag {
    background: #b46dfd; color: #fff; font-size: 0.83em; font-weight: 700;
    border-radius: 12px; padding: 3px 14px; margin: 2px 6px 2px 0;
    display: inline-flex; align-items: center; height: 26px;
}
.inline-tag.big { padding: 4px 16px; }
.inline-tag .tag-number {
    margin-right: 4px; background: rgba(255,255,255,0.25); border-radius: 50%;
    width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.95em;
}

.title-tag-container { position: relative; display: inline-flex; align-items: center; height: 28px; }
.title-tag-number {
    position: absolute; left: 5px; z-index: 2; background: var(--title-tag-number-bg);
    color: #fff; font-size: 0.78em; font-weight: 800; border-radius: 50%;
    width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
}
.title-tag-text {
    background: var(--title-tag-text-bg); color: var(--title-tag-text-color);
    font-size: 0.83em; font-weight: 700; border-radius: 25px; height: 28px;
    display: flex; align-items: center; justify-content: flex-end;
    padding: 0 16px 0 34px; min-width: 90px;
}

/* Countdown */
.countdown-block { text-align: center; }
.countdown-table { display: flex; justify-content: center; gap: 25px; margin-top: 10px; }
.count-col { text-align: center; }
.time-num {
    font-weight: 900;
    font-size: 2.8em; /* INCREASED from 2.2em */
    color: #523895;
    display: block;
}
.time-label { display: block; font-size: 0.96em; color: #7e67af; margin-top: 5px; font-weight: 700; }

/* Calendar Buttons */
.calendar-buttons { display: flex; flex-direction: column; gap: 12px; margin-top: 15px; }
.calendar-btn {
    padding: 16px 24px; border: none; border-radius: 15px; font-size: 1.1em;
    font-weight: 700; cursor: pointer; transition: transform 0.2s;
    width: 70%; /* INCREASED from 50% */
    max-width: 400px;
    position: relative;
}
.calendar-btn.google { background: #4285f4; color: #fff; }
.calendar-btn.other { background: #b46dfd; color: #fff; }
.calendar-btn:hover { transform: translateY(-2px); }

/* Empty Card Text */
.centered-gray-text { text-align: center; color: #999; font-size: 1.09em; margin: 20px 0; width: 100%; display: block; }

/* ==========================================
   15. SHARE INVITATION STYLES
   ========================================== */
.image-row { display: flex; align-items: center; gap: 22px; min-height: 150px; position: relative; }
.invitation-img-box {
    background: #f6f6fb; border-radius: 15px; overflow: hidden;
    width: 120px; height: 140px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(180,105,245,0.06); margin-left: 50px; position: relative; border: 1.2px solid #eceafe;
}
.invitation-img { width: 90px; height: 90px; object-fit: contain; border-radius: 12px; display: block; margin: 0 auto; }

.img-remove-btn, .text-share-x-btn {
    position: absolute; left: 0px; top: -10px; width: 38px; height: 38px;
    background: #b46dfd; color: #fff; border-radius: 50%; border: none; font-size: 1.4em;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 3px 9px rgba(181,105,245,0.13); cursor: pointer; z-index: 2; transition: background .2s;
}
.img-remove-btn:hover, .text-share-x-btn:hover { background: #d946ef; }

.change-image-btn {
    background: #b46dfd; color: #fff; font-size: 1.11em; font-weight: 700;
    padding: 16px 30px; border: none; border-radius: 18px; cursor: pointer;
    box-shadow: 0 4px 16px rgba(154,67,255,0.12); margin-left: 20px; transition: background 0.18s, transform 0.09s;
}
.change-image-btn:hover { background: #a065fb; transform: translateY(-2px); }

.text-share-row { display: flex; gap: 24px; align-items: flex-start; min-height: 68px; margin-bottom: 28px; position: relative; }
.editable-text {
    margin: 0 auto 0 0; min-height: 34px; display: flex; flex-direction: column;
    font-size: 1.1em; color: #232136; letter-spacing: -.03em; word-break: break-all;
    text-align: center; padding-top: 10px; align-items: center; width: 100%; white-space: pre-line;
}

.edit-text-btn {
    background: #b46dfd; color: #fff; font-size: 1.11em; font-weight: 700;
    padding: 15px 46px; border: none; border-radius: 18px; cursor: pointer;
    transition: background 0.18s, transform 0.09s; display: block; margin: 20px auto 0 auto;
    box-shadow: 0 4px 16px rgba(154,67,255,0.12);
}
.edit-text-btn:hover { background: #a065fb; transform: translateY(-2px); }

.share-apps-title { font-size: 1.18em; font-weight: 900; color: #252247; margin-bottom: 19px; margin-top: 2px; text-align: center; }
.share-apps-grid { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 18px; margin-bottom: 2px; margin-top: 17px; }
.share-apps-grid > div { flex: 0 0 auto; width: 92px; }

.share-app-icon {
    width: 64px; height: 64px; border-radius: 50%; background: #f8f3fe;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 10px auto;
    font-size: 2.1em; box-shadow: 0 3px 10px rgba(154,67,255,0.06); cursor: pointer; transition: transform 0.2s;
}
.share-app-icon:hover { transform: scale(1.1); }
.icon-whatsapp { color: #1ad05c;}
.icon-telegram { color: #3ebdf9;}
.icon-gmail { font-size: 2.4em;}
.icon-copy { color: #b46dfd;}
.icon-twitter { color: #000;}
.share-app-name { text-align: center; font-size: 1.01em; color: #222145; font-weight: 570; letter-spacing: 0.01em; word-break: normal; overflow-wrap: normal; }

/* Narrow viewports: shrink share-icons so all 5 fit inside the content-card */
@media (max-width: 480px) {
    .share-apps-grid { gap: 16px 8px; }
    .share-apps-grid > div { width: calc(33.333% - 8px); }
    .share-app-icon { width: 54px; height: 54px; font-size: 1.75em; }
    .share-app-icon img { width: 28px !important; height: 28px !important; }
    .share-app-name { font-size: 0.9em; }
}

/* ==========================================
   ADD PAGE BLOCK MENU STYLES
   ========================================== */
.block-type-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 20px;
}

.block-type-info {
    flex: 1;
}

.block-type-title {
    font-size: 1.15em;
    font-weight: 800;
    color: #232136;
    margin-bottom: 8px;
}

.block-type-divider {
    height: 1px;
    background: #ece5f6;
    margin-bottom: 12px;
    width: 100%;
}

.block-type-desc {
    font-size: 0.95em;
    color: #4a4a52;
    line-height: 1.45;
}

.block-type-add-btn {
    background: #b444eb;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(180, 68, 235, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.block-type-add-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(180, 68, 235, 0.35);
}

/*SELECT IMAGE CLOSE BTN*/
.close-x {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ce20ff, #8a00d4);
    color: white;

    /* Centering logic */
    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    padding: 0;
    margin: 0;
    z-index: 10002;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.close-x span {
    font-family: 'Arial', sans-serif;
    font-size: 32px;
    line-height: 1;
    pointer-events: none; /* Makes the text "transparent" to clicks */

    /* THE FIX: Manual Nudge */
    position: relative;
    top: 2px; /* INCREASE this number (e.g., 3px, 4px) to move it LOWER */
}

/* ==========================================
   EVENT PHOTOS / IMAGE PICKER — Chip & Grid
   Shared by: event-photos.html, image-picker panels
   ========================================== */
.ep-chip-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 8px;
    justify-content: left;
    margin-bottom: 20px;
}
.ep-sub-chips {
    margin-top: -10px;
    margin-bottom: 22px;
}
.ep-back-btn {
    background: none;
    border: 1.5px solid #e2d7f6;
    color: #8753cf;
    font-size: 1.05rem;
    border-radius: 13px;
    padding: 6px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background .15s;
    outline: none;
}
.ep-back-btn:hover { background: #f7f4fd; }
.ep-chip-btn {
    background: #f7f4fd;
    color: #8753cf;
    border: 1.5px solid #e2d7f6;
    font-weight: 600;
    font-size: 0.97rem;
    border-radius: 13px;
    padding: 6px 16px;
    margin: 0;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    box-shadow: 0 2px 8px rgba(140,92,246,0.08);
    outline: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.ep-chip-btn:hover { background: #efe7fb; border-color: #c9b4ed; }
.ep-chip-btn.selected {
    background: linear-gradient(135deg, #c026d3, #8b5cf6);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(168,85,247,0.25);
}
.ep-chip-btn.inactive { opacity: 0.55; color: #b6a6dd; cursor: default; }
.ep-chip-btn.inactive:hover { background: #f7f4fd; border-color: #e2d7f6; }
.ep-photos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 16px;
    padding-top: 4px;
}
.ep-photo-card {
    position: relative;
    border-radius: 13px;
    overflow: hidden;
    background: #faf7fd;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.ep-photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 13px;
    box-shadow: 0 2px 12px rgba(187,180,220,0.15);
    transition: opacity 0.3s ease;
}
.ep-photo-card img.loading { opacity: 0; }
.ep-photo-card img.loaded { opacity: 1; }
.ep-spinner {
    width: 36px;
    height: 36px;
    position: absolute;
    top: calc(50% - 18px);
    left: calc(50% - 18px);
}
.ep-spinner-dot {
    width: 5px;
    height: 5px;
    background: var(--primary-purple, #b444eb);
    border-radius: 50%;
    position: absolute;
    animation: ep-pulse 1.2s ease-in-out infinite;
}
@keyframes ep-pulse {
    0%, 100% { transform: scale(0.6); opacity: 0.4; }
    50% { transform: scale(1.4); opacity: 1; }
}
