/**
 * WePla — Components CSS
 * Source of Truth: WEPLA_VIBE_CODING_UI_GUIDE.md §8-§13
 * All component specs follow the Vibe Guide EXACTLY
 */

/* =============================================
   Buttons — Vibe Guide §8
============================================= */
.btn {
    border: 0;
    border-radius: var(--radius-pill);
    padding: 13px 18px;
    font-weight: 700;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    min-height: 48px;
    text-decoration: none;
    line-height: 1;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 12px 24px rgba(212, 120, 158, 0.24);
}

.btn-secondary {
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-dark);
    color: var(--primary-dark);
}
.btn-outline:active { background: var(--primary-soft); }

.btn-ghost {
    color: var(--text-primary);
    background: rgba(255,255,255,0.58);
    padding: 8px 12px;
    min-height: auto;
}

.btn-block { width: 100%; }
.btn-sm { font-size: 13px; padding: 8px 14px; min-height: 36px; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-sm); min-height: auto; }

.btn-save-full {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(212, 120, 158, 0.24);
}

.icon-btn, .avatar-btn {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 16px;
    background: rgba(255,255,255,.72);
    color: var(--primary-dark);
    box-shadow: var(--shadow-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.icon-btn:active, .avatar-btn:active { transform: scale(0.95); }

/* =============================================
   Cards — Vibe Guide §9 (Glass Card)
============================================= */
.card {
    background: var(--surface-glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: var(--sp-4);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-4) var(--sp-5) 0;
}

.card-title {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: 15px;
    font-weight: 600;
}
.card-title svg { width: 18px; height: 18px; }

.card-body { padding: 20px; }
.card-footer { padding: 0 20px 20px; }

/* =============================================
   Stat Cards
============================================= */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.stat-card {
    background: var(--surface-glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: var(--radius-xl);
    padding: var(--sp-4);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-soft);
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px; background: var(--stat-accent, var(--primary));
}
.stat-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; margin-bottom: var(--sp-2); }
.stat-icon svg { width: 18px; height: 18px; }
.stat-label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--sp-1); }
.stat-value { font-size: 18px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.stat-card-title { font-size: 12px; font-weight: 500; color: var(--text-muted); margin-top: 4px; }
.stat-card-value { font-size: 20px; font-weight: 700; color: var(--text-primary); }

/* =============================================
   Countdown Banner
============================================= */
.countdown-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-xl);
    padding: var(--sp-5);
    color: white;
    text-align: center;
    margin-bottom: var(--sp-4);
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(212, 120, 158, 0.24);
}

/* =============================================
   Progress Bars — DESIGN.md spec
============================================= */
.progress-track {
    height: 9px;
    background: rgba(212, 120, 158, 0.14);
    border-radius: 999px;
    overflow: hidden;
    margin: 18px 0 10px;
}
.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--primary-dark)); transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }
.progress-fill.green { background: var(--success); }
.progress-fill.blue { background: var(--info); }

/* =============================================
   Progress Grid & Cards
============================================= */
.progress-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.progress-card { background: var(--surface-glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-radius: var(--radius-xl); padding: var(--sp-4); box-shadow: var(--shadow-card); border: 1px solid var(--border-soft); display: block; color: inherit; }
.progress-item { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--gray-100); }
.progress-item:last-child { border-bottom: none; }
.progress-item-badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: var(--radius-pill); flex-shrink: 0; }
.progress-item-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; }
.progress-item-info { flex: 1; min-width: 0; }
.progress-item-label { font-size: 14px; font-weight: 600; }
.progress-item-sub { font-size: 12px; color: var(--text-muted); }

/* =============================================
   Budget Overview Card
============================================= */
.budget-overview-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-xl);
    padding: var(--sp-5);
    color: white;
    margin-bottom: var(--sp-4);
}

/* =============================================
   Badges
============================================= */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-pill); line-height: 1.4; }
.badge-primary { background: var(--primary-soft); color: var(--primary-dark); }
.badge-success { background: var(--success-light); color: #16A34A; }
.badge-warning { background: var(--warning-light); color: #B45309; }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* =============================================
   Chips / Tags — Vibe Guide §11
============================================= */
.chip {
    border-radius: var(--radius-pill);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    background: rgba(255,255,255,0.68);
    color: var(--text-secondary);
    border: 1px solid var(--border-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.chip.active {
    color: var(--primary-dark);
    background: var(--primary-soft);
}
.tag-success { background: var(--sage-soft); color: #3C9363; }
.tag-warning { background: #FFF4D8; color: #A97800; }
.tag-danger { background: #FFE8EC; color: #C94C68; }

/* =============================================
   Bottom Navigation — Vibe Guide §12
============================================= */
.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    width: min(calc(100% - 28px), 402px);
    height: 60px;
    padding: 6px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    background: rgba(255,255,255,0.76);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(232, 160, 191, 0.18);
    border-radius: 28px;
    box-shadow: 0 18px 45px rgba(43,43,43,0.10);
    z-index: 80;
}

.bottom-nav a, .bottom-nav-item {
    flex: 1;
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 22px;
    font-size: 11px;
    font-weight: 700;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav a.active, .bottom-nav-item.active {
    color: var(--primary-dark);
    background: linear-gradient(180deg, rgba(255,241,246,0.95), rgba(255,255,255,0.62));
    box-shadow: inset 0 0 0 1px rgba(232,160,191,0.18);
}

.bottom-nav a:active { transform: scale(0.92); }
.bottom-nav i, .bottom-nav svg { width: 21px; height: 21px; }
.bottom-nav-label { display: none; margin-top: 4px; font-weight: 600; font-size: 13px; }

/* Desktop overrides for bottom nav -> sidebar */
@media (min-width: 768px) {
    .bottom-nav {
        left: 0;
        bottom: 0;
        top: 0;
        transform: none;
        width: var(--sidebar-width);
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 0;
        border: none;
        border-right: 1px solid var(--border-soft);
        box-shadow: 4px 0 24px rgba(43,43,43,0.04);
        padding: var(--sp-4) 8px;
        gap: 8px;
    }
    .bottom-nav a, .bottom-nav-item {
        flex: none;
        width: 100%;
        height: 56px;
        border-radius: 12px;
    }
    .ai-nav-item {
        position: static !important;
        margin-top: auto; /* Push AI to bottom */
        margin-bottom: var(--sp-4);
    }
}

@media (min-width: 1024px) {
    .bottom-nav {
        align-items: flex-start;
        padding: var(--sp-6) var(--sp-4);
        justify-content: flex-start;
        gap: 12px;
    }
    .bottom-nav a, .bottom-nav-item {
        flex-direction: row;
        justify-content: flex-start;
        padding: 0 var(--sp-4);
        gap: 12px;
        font-size: 15px;
    }
    .bottom-nav-label {
        display: inline;
        margin-top: 0;
    }
    .ai-nav-item {
        margin-top: auto;
    }
}

/* =============================================
   Forms — Vibe Guide §10
============================================= */
.form-group { margin-bottom: var(--sp-4); }
.form-label {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: var(--sp-2);
}
.form-label svg { width: 14px; height: 14px; }

.form-input, .form-select, .form-textarea {
    width: 100%;
    border: 1px solid var(--border-soft);
    background: rgba(255,255,255,0.74);
    border-radius: 18px;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    transition: border var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    -webkit-appearance: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: rgba(212, 120, 158, 0.45);
    box-shadow: 0 0 0 4px rgba(232, 160, 191, 0.16);
    background: #fff;
}
.form-input::placeholder { color: var(--gray-400); }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: var(--sp-1); }
.form-row { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }

/* Input rows — Vibe Guide §10 */
.input-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: var(--sp-4); position: relative; }
.input-label { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.input-control {
    width: 100%;
    border: 1px solid var(--border-soft);
    background: rgba(255,255,255,0.74);
    border-radius: 18px;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    transition: border var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.input-control:focus {
    border-color: rgba(212, 120, 158, 0.45);
    box-shadow: 0 0 0 4px rgba(232, 160, 191, 0.16);
    background: #fff;
}
.section-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--sp-2); }
.input-group-modern { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.input-group-modern .input-row { margin-bottom: 0; position: relative; display: flex; align-items: center; }
.input-group-modern .input-icon { position: absolute; top: 50%; left: 16px; transform: translateY(-50%); width: 20px; height: 20px; pointer-events: none; z-index: 1; }
.input-group-modern .input-control,
.input-group-modern input,
.input-group-modern select {
    padding-left: 48px;
    padding-right: 16px;
    width: 100%;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding-top: 14px;
    padding-bottom: 14px;
    font-size: 15px;
    color: var(--text-primary);
    background: rgba(255,255,255,0.74);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border var(--transition-fast), box-shadow var(--transition-fast);
}
.input-group-modern select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239CA3AF' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 36px;
}
.input-group-modern input::placeholder { color: var(--gray-400); }

/* =============================================
   Modal (Bottom Sheet) — Vibe Guide §13
============================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(43, 43, 43, 0.28);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.modal-sheet {
    width: min(100%, 430px);
    max-height: 88vh;
    overflow-y: auto;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-radius: 32px 32px 0 0;
    box-shadow: 0 -20px 50px rgba(43,43,43,0.14);
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s;
}

.modal-overlay.active .modal-sheet {
    transform: translateY(0);
}

/* Desktop overrides for Modal Dialog */
@media (min-width: 768px) {
    .modal-overlay {
        align-items: center; /* Center vertically on desktop */
    }
    .modal-sheet {
        border-radius: 24px;
        box-shadow: 0 20px 60px rgba(43,43,43,0.2);
        max-height: 80vh;
        transform: translateY(20px) scale(0.95);
        opacity: 0;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    }
    .modal-overlay.active .modal-sheet {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    .modal-handle {
        display: none; /* Hide drag handle on desktop */
    }
}

.modal-handle {
    width: 44px;
    height: 5px;
    border-radius: var(--radius-pill);
    background: rgba(43, 43, 43, 0.14);
    margin: 10px auto 6px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
}

.modal-title { font-size: 17px; font-weight: 700; }

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.modal-close svg { width: 16px; height: 16px; }

.modal-body { padding: 0 20px 20px; }

.modal-footer {
    display: flex;
    gap: var(--sp-3);
    padding: 18px 20px;
    padding-bottom: calc(18px + var(--safe-bottom));
    border-top: 1px solid var(--gray-100);
}
.modal-footer .btn { flex: 1; }

/* =============================================
   Toast
============================================= */
.toast-container { position: fixed; bottom: calc(var(--bottom-total) + var(--sp-4)); left: var(--sp-4); right: var(--sp-4); z-index: 300; display: flex; flex-direction: column; gap: var(--sp-2); }
.toast { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); background: var(--gray-900); color: white; border-radius: var(--radius-md); font-size: 14px; box-shadow: var(--shadow-lg); animation: fadeInUp 0.3s ease; }
.toast-success { background: #16A34A; }
.toast-error { background: var(--danger); }

/* =============================================
   Empty State
============================================= */
.empty-state { text-align: center; padding: var(--sp-8) var(--sp-4); }
.empty-state svg { width: 48px; height: 48px; color: var(--gray-300); margin: 0 auto var(--sp-4); }
.empty-state h3 { font-size: 17px; font-weight: 600; margin-bottom: var(--sp-2); }
.empty-state p { font-size: 14px; color: var(--text-muted); margin-bottom: var(--sp-5); }

/* =============================================
   Group UI (Used in Dashboard & Guests)
============================================= */
.group-pill { display: inline-flex; align-items: center; padding: 12px 20px; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; cursor: pointer; width: 100%; justify-content: center; transition: 0.2s; }
.group-pill.dashed { border: 2px dashed var(--primary); color: var(--primary-dark); background: transparent; }
.group-pill.dashed i { margin-right: 6px; }
.group-pill.solid { border: 2px solid var(--primary-light); background: var(--primary-light); color: var(--primary-dark); }
.group-list-item { padding: var(--sp-4) 0; border-bottom: 1px solid var(--gray-100); display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.group-list-item:last-child { border-bottom: none; }
.group-color-indicator { width: 4px; height: 24px; border-radius: 2px; margin-right: 12px; }
.color-circle { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; box-sizing: border-box; }

/* =============================================
   Slide Menu
============================================= */
.slide-menu-overlay { position: fixed; inset: 0; background: rgba(43,43,43,0.28); z-index: 400; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.slide-menu-overlay.active { opacity: 1; visibility: visible; }
.slide-menu { position: fixed; top: 0; right: 0; bottom: 0; width: 85vw; max-width: 320px; background: rgba(255,255,255,0.94); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); z-index: 401; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1); display: flex; flex-direction: column; box-shadow: -4px 0 24px rgba(43,43,43,0.1); }
.slide-menu.active { transform: translateX(0); }
.slide-menu-header { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-4); border-bottom: 1px solid var(--border-soft); }
.slide-menu-title { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: var(--sp-2); }
.slide-menu-content { flex: 1; overflow-y: auto; padding: var(--sp-4); padding-bottom: calc(var(--sp-4) + var(--safe-bottom)); }

/* =============================================
   Section Headers
============================================= */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.section-title { display: flex; align-items: center; gap: var(--sp-2); font-size: 15px; font-weight: 700; }
.section-title svg { width: 18px; height: 18px; }
.section-link { font-size: 13px; font-weight: 500; color: var(--primary-dark); }

/* =============================================
   Page Header
============================================= */
.page-header { margin-bottom: var(--sp-5); }
.page-header h1 { display: flex; align-items: center; gap: var(--sp-2); font-size: 22px; font-weight: 700; margin-bottom: var(--sp-1); }
.page-header h1 svg { width: 24px; height: 24px; }
.page-header p { font-size: 14px; color: var(--text-muted); }

/* =============================================
   Alerts
============================================= */
.alert { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md); font-size: 14px; margin-bottom: var(--sp-4); }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-error { background: var(--danger-light); color: var(--danger); }
.alert-success { background: var(--success-light); color: #16A34A; }

/* =============================================
   Tables
============================================= */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 400px; }
.data-table th { text-align: left; padding: var(--sp-3); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); border-bottom: 1px solid var(--gray-100); white-space: nowrap; }
.data-table td { padding: var(--sp-3); border-bottom: 1px solid var(--gray-50); white-space: nowrap; }

/* =============================================
   Role Selector
============================================= */
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.role-option { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border: 1.5px solid var(--gray-200); border-radius: var(--radius-md); cursor: pointer; transition: all var(--transition-fast); }
.role-option:has(input:checked) { border-color: var(--primary-dark); background: var(--primary-soft); }
.role-option input[type="radio"] { accent-color: var(--primary-dark); }
.role-option svg { width: 16px; height: 16px; color: var(--primary-dark); }
.role-option span { font-size: 14px; font-weight: 500; }

/* =============================================
   Info Grid
============================================= */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.info-item-label { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.info-item-value { font-size: 15px; font-weight: 600; }

/* =============================================
   Action Scroll Pills
============================================= */
.action-scroll { display: flex; gap: var(--sp-2); overflow-x: auto; padding: var(--sp-4); margin: 0 calc(var(--sp-4) * -1); scrollbar-width: none; }
.action-scroll::-webkit-scrollbar { display: none; }
.action-pill { display: flex; align-items: center; gap: var(--sp-2); padding: 10px 16px; background: rgba(255,255,255,.72); border: 1px solid var(--border-soft); border-radius: var(--radius-pill); font-size: 13px; font-weight: 700; color: var(--text-secondary); white-space: nowrap; flex-shrink: 0; text-decoration: none; }
.action-pill:active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); transform: scale(0.97); }
.action-pill svg { width: 16px; height: 16px; }
.action-pill.primary { background: var(--primary); border-color: var(--primary); color: white; }

/* =============================================
   Quick Action Grid — Vibe Guide §14
============================================= */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.quick-card {
    min-height: 116px;
    border-radius: 28px;
    padding: 18px;
    background: rgba(255,255,255,.72);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-soft);
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-weight: 800;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.quick-card:active {
    transform: scale(0.97);
    box-shadow: var(--shadow-card);
}
.quick-card svg, .quick-card i {
    color: var(--primary-dark);
    width: 24px;
    height: 24px;
    margin-bottom: 12px;
}

/* =============================================
   RSVP / Priority Pills — Modal Form Controls
============================================= */
.rsvp-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: var(--sp-4);
}
.rsvp-pill {
    flex: 1;
    min-width: 80px;
    padding: 10px 14px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    border: 1.5px solid var(--gray-200);
    background: var(--white);
    color: var(--text-secondary);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.rsvp-pill:active { transform: scale(0.96); }
.rsvp-pill.active {
    border-color: var(--primary-dark);
    color: var(--primary-dark);
    background: var(--primary-soft);
    box-shadow: 0 2px 8px rgba(212, 120, 158, 0.18);
}
.rsvp-pill.yes { border-color: var(--success); color: var(--success); }
.rsvp-pill.yes.active { background: var(--success-light); border-color: var(--success); color: #16A34A; box-shadow: 0 2px 8px rgba(34, 197, 94, 0.18); }
.rsvp-pill.pending { border-color: var(--warning); color: var(--warning); }
.rsvp-pill.pending.active { background: var(--warning-light); border-color: var(--warning); color: #B45309; box-shadow: 0 2px 8px rgba(245, 158, 11, 0.18); }
.rsvp-pill.no { border-color: var(--danger); color: var(--danger); }
.rsvp-pill.no.active { background: var(--danger-light); border-color: var(--danger); color: var(--danger); box-shadow: 0 2px 8px rgba(239, 68, 68, 0.18); }

/* =============================================
   Side Select (Bride/Groom Picker) — Modal
============================================= */
.side-select-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-3);
    margin-bottom: var(--sp-4);
}
.side-card-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: var(--sp-4);
    border-radius: var(--radius-lg);
    border: 2px solid var(--gray-200);
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.side-card-btn:active { transform: scale(0.96); }
.side-card-btn .side-icon { width: 28px; height: 28px; color: var(--gray-400); }
.side-card-btn .side-label { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.side-card-btn.active.bride {
    border-color: var(--primary);
    background: var(--primary-soft);
}
.side-card-btn.active.bride .side-icon { color: var(--primary-dark); }
.side-card-btn.active.bride .side-label { color: var(--primary-dark); }
.side-card-btn.active.groom {
    border-color: #3B82F6;
    background: #EFF6FF;
}
.side-card-btn.active.groom .side-icon { color: #3B82F6; }
.side-card-btn.active.groom .side-label { color: #2563EB; }

/* =============================================
   Toggle Row — Modal Form Controls
============================================= */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-3) 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.toggle-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.toggle-switch {
    width: 48px;
    height: 28px;
    border-radius: 14px;
    background: var(--gray-200);
    position: relative;
    transition: background 0.2s ease;
    flex-shrink: 0;
}
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}
.toggle-switch.active {
    background: var(--primary);
}
.toggle-switch.active::after {
    transform: translateX(20px);
}

/* =============================================
   Currency Input — Budget Modal
============================================= */
.currency-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    font-size: 15px;
    background: rgba(255,255,255,0.74);
    outline: none;
    transition: border var(--transition-fast), box-shadow var(--transition-fast);
}
.currency-input:focus {
    border-color: rgba(212, 120, 158, 0.45);
    box-shadow: 0 0 0 4px rgba(232, 160, 191, 0.16);
    background: #fff;
}

/* =============================================
   Modal Back Button
============================================= */
.modal-back-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.modal-back-btn:active { transform: scale(0.9); background: var(--gray-200); }
.modal-back-btn svg, .modal-back-btn i { width: 18px; height: 18px; }

/* =============================================
   Input Group Modern — Enhanced Focus & Icon
============================================= */
.input-group-modern input:focus,
.input-group-modern select:focus {
    border-color: rgba(212, 120, 158, 0.45);
    box-shadow: 0 0 0 4px rgba(232, 160, 191, 0.16);
    background: #fff;
}
.input-group-modern .input-row {
    display: flex;
    align-items: center;
    padding: 0;
    margin-bottom: 0;
}

/* =============================================
   Utility Classes
============================================= */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-dark); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.w-full { width: 100%; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* =============================================
   Modal Footer Fix — Glassmorphism
============================================= */
.modal-footer {
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

/* =============================================
   Custom Select — UI Dropdown
============================================= */
.wepla-custom-select {
    position: relative;
    width: 100%;
}
.wepla-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: 1px solid var(--border-soft);
    background: rgba(255,255,255,0.74);
    border-radius: 18px;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.wepla-custom-select.disabled .wepla-select-trigger {
    background: var(--gray-100);
    color: var(--gray-500);
    cursor: not-allowed;
    border-color: var(--gray-200);
    opacity: 0.8;
}
.input-group-modern .wepla-custom-select .wepla-select-trigger {
    padding-left: 48px;
}
.wepla-select-trigger:active, .wepla-select-trigger.focus {
    background: #fff;
    border-color: rgba(212, 120, 158, 0.45);
    box-shadow: 0 0 0 4px rgba(232, 160, 191, 0.16);
}
.wepla-select-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wepla-select-trigger i {
    width: 18px; height: 18px;
    color: var(--gray-400);
}
.wepla-select-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(43,43,43,0.12);
    border: 1px solid var(--border-soft);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 240px;
    overflow-y: auto;
    padding: 8px;
}
.wepla-select-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.wepla-select-item {
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: background 0.15s ease;
}
.wepla-select-item:hover, .wepla-select-item:active {
    background: var(--gray-50);
}
.wepla-select-item.selected {
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 600;
}

/* =============================================
   Color & Icon Pickers (Inline)
============================================= */
.color-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.color-circle.active {
    border-color: var(--text-primary);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--gray-50);
    border: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--gray-600);
}
.icon-circle i {
    width: 20px;
    height: 20px;
}
.icon-circle.active {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

.file-upload-label:hover {
    background: #f8fafc !important;
    border-color: var(--primary) !important;
}

/* =============================================
   Keyframe Animations
============================================= */
@keyframes sheetUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .6; }
}

/* =============================================
   Forms & Checkboxes
============================================= */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--gray-300);
    background-color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.custom-checkbox:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.custom-checkbox:checked::after {
    content: '';
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

/* =============================================
   Flatpickr Custom Theme Overrides
============================================= */
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, .flatpickr-day.endRange.inRange, .flatpickr-day.selected:focus, .flatpickr-day.startRange:focus, .flatpickr-day.endRange:focus, .flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover, .flatpickr-day.selected.prevMonthDay, .flatpickr-day.startRange.prevMonthDay, .flatpickr-day.endRange.prevMonthDay, .flatpickr-day.selected.nextMonthDay, .flatpickr-day.startRange.nextMonthDay, .flatpickr-day.endRange.nextMonthDay {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}
.flatpickr-day.today {
    border-color: var(--primary-dark) !important;
}
.flatpickr-months .flatpickr-month {
    height: 48px;
}
/* Fix for Vietnamese long month names hiding the year */
.flatpickr-calendar {
    width: 320px !important;
}
.flatpickr-current-month {
    font-size: 115% !important;
    width: 100% !important;
    left: 0 !important;
    padding: 10px 40px 0 40px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.flatpickr-current-month .flatpickr-monthDropdown-months {
    appearance: none;
    -webkit-appearance: none;
}
