/* ============================================================
   weed.events — Botanical Dark Component Styles
   Deep forest bg, sage accent, thin borders, no shadows.
   ============================================================ */

/* ============================================================
   Buttons
   ============================================================ */

.bd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px 24px;
    font-family: 'Libre Franklin', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1;
    cursor: pointer;
    border: 1px solid #2a3318;
    transition: all 0.15s ease;
    -webkit-user-select: none;
    user-select: none;
    white-space: nowrap;
    text-decoration: none;
}

/* Primary — sage fill, forest text */
.bd-btn--primary {
    background: #c8d97e;
    color: #0e1208;
    border-color: #c8d97e;
}

.bd-btn--primary:hover {
    background: #7a8a5a;
    border-color: #7a8a5a;
    color: #e8eed4;
}

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

/* Secondary — transparent, muted border */
.bd-btn--secondary {
    background: transparent;
    color: #5a6840;
    border: 1px solid #3a4828;
}

.bd-btn--secondary:hover {
    border-color: #c8d97e;
    color: #c8d97e;
}

/* Ghost — no border, text only */
.bd-btn--ghost {
    background: transparent;
    color: #5a6840;
    border: none;
    padding: 12px 24px;
}

.bd-btn--ghost:hover {
    color: #e8eed4;
    text-decoration: underline;
    text-decoration-color: #7a8a5a;
    text-underline-offset: 3px;
}

/* Danger — red fill */
.bd-btn--danger {
    background: #e8462a;
    color: #f8f6f0;
    border-color: #e8462a;
}

.bd-btn--danger:hover {
    background: #c83820;
}

.bd-btn:disabled,
.bd-btn[aria-disabled="true"] {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.bd-btn:focus-visible {
    outline: 1px solid #c8d97e;
    outline-offset: 2px;
}

/* ============================================================
   Cards
   ============================================================ */

.bd-card {
    background: #141a08;
    border: 1px solid #2a3318;
    padding: 1.25rem;
    transition: all 0.15s ease;
    position: relative;
}

.bd-card:hover {
    border-color: #c8d97e;
    background: #1a2210;
}

.bd-card--accent {
    background: #2a3318;
}

.bd-card--surface {
    background: #0e1208;
}

.bd-card--flat {
    /* Base styles only */
}

.bd-card--flat:hover {
    border-color: #c8d97e;
}

.bd-card--sm {
    /* Same as base */
}

.bd-card--lg {
    /* Same as base */
}

/* ============================================================
   Badges
   ============================================================ */

.bd-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    font-family: 'Libre Franklin', system-ui, sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: all 0.15s ease;
}

/* Live — red with pulse dot */
.bd-badge--live {
    background: #e8462a;
    color: #f8f6f0;
    font-family: 'DM Mono', monospace;
    border: 1px solid #e8462a;
}

.bd-badge--live::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #f8f6f0;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Label — sage on dark border */
.bd-badge--label {
    color: #c8d97e;
    border: 1px solid #3a4828;
    font-family: 'Libre Franklin', system-ui, sans-serif;
    font-weight: 700;
}

/* Tag — outlined, mono */
.bd-badge--tag {
    background: transparent;
    color: #5a6840;
    border: 1px solid #3a4828;
    font-family: 'DM Mono', monospace;
}

.bd-badge--tag:hover {
    border-color: #c8d97e;
    color: #c8d97e;
}

/* ============================================================
   Inputs
   ============================================================ */

.bd-input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: 'Libre Franklin', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #e8eed4;
    background: #1a2210;
    border: 1px solid #2a3318;
    transition: all 0.15s ease;
    appearance: none;
}

.bd-input::placeholder {
    color: #5a6840;
    font-family: 'DM Mono', monospace;
    font-size: 0.8125rem;
}

.bd-input:hover {
    border-color: #3a4828;
}

.bd-input:focus {
    outline: none;
    border-color: #c8d97e;
    box-shadow: 0 0 0 1px rgba(200, 217, 126, 0.15);
}

.bd-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #0e1208;
}

textarea.bd-input {
    min-height: 6rem;
    resize: vertical;
}

select.bd-input {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235a6840' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

/* Label style */
.bd-label {
    display: block;
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #5a6840;
    margin-bottom: 0.5rem;
}

/* ============================================================
   Ticker / Marquee
   ============================================================ */

.bd-ticker {
    background: #0e1208;
    height: 48px;
    overflow: hidden;
    display: flex;
    align-items: center;
    border-top: 1px solid #2a3318;
}

.bd-ticker__track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: marquee 24s linear infinite;
}

.bd-ticker__item {
    font-family: 'Libre Franklin', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #5a6840;
    padding: 0 1rem;
}

.bd-ticker__sep {
    color: #c8d97e;
    font-size: 8px;
    padding: 0 1rem;
}

/* ============================================================
   RSVP Buttons
   ============================================================ */

.rsvp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem 0.75rem;
    font-family: 'Libre Franklin', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #e8eed4;
    background: #1a2210;
    border: 1px solid #2a3318;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-user-select: none;
    user-select: none;
    white-space: nowrap;
}

.rsvp-btn:hover {
    border-color: #c8d97e;
}

/* Going — sage accent */
.rsvp-btn[aria-pressed="true"][data-status="going"] {
    background: #c8d97e;
    color: #0e1208;
}

/* Maybe — dark surface */
.rsvp-btn[aria-pressed="true"][data-status="maybe"] {
    background: #2a3318;
    color: #e8eed4;
}

/* Not going — deep forest */
.rsvp-btn[aria-pressed="true"][data-status="not_going"] {
    background: #0e1208;
    color: #5a6840;
}

.rsvp-btn:focus-visible {
    outline: 1px solid #c8d97e;
    outline-offset: 2px;
}

/* ============================================================
   Guest Avatars
   ============================================================ */

.guest-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid #2a3318;
    background: #c8d97e;
    color: #0e1208;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.875rem;
    overflow: hidden;
    flex-shrink: 0;
}

.guest-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guest-avatar-stack {
    display: flex;
    align-items: center;
}

.guest-avatar-stack .guest-avatar {
    margin-left: -0.5rem;
    transition: transform 0.15s ease;
}

.guest-avatar-stack .guest-avatar:first-child {
    margin-left: 0;
}

.guest-avatar-stack .guest-avatar:hover {
    transform: translateY(-2px);
    z-index: 1;
}

.guest-avatar-stack__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    margin-left: -0.5rem;
    border: 1px solid #2a3318;
    background: #1a2210;
    color: #5a6840;
    font-family: 'DM Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 500;
}

/* ============================================================
   Toast Notifications
   ============================================================ */

.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 300;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 16rem;
    max-width: 24rem;
    padding: 0.875rem 1rem;
    background: #141a08;
    border: 1px solid #2a3318;
    color: #e8eed4;
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    transform: translateX(calc(100% + 2rem));
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.3s ease;
    pointer-events: none;
}

.toast.is-visible {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.toast__dismiss {
    margin-left: auto;
    padding: 0.25rem;
    color: #5a6840;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.toast__dismiss:hover {
    color: #e8eed4;
}

.toast--success { border-left: 3px solid #c8d97e; }
.toast--error { border-left: 3px solid #e8462a; }
.toast--warning { border-left: 3px solid #7a8a5a; }

@media (max-width: 39.9375em) {
    .toast {
        top: auto;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        max-width: none;
        transform: translateY(calc(100% + 2rem));
    }
    .toast.is-visible { transform: translateY(0); }
}

/* ============================================================
   Modal
   ============================================================ */

.modal {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal.is-open {
    opacity: 1;
    visibility: visible;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 18, 8, 0.85);
}

.modal__content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 28rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    background: #141a08;
    border: 1px solid #2a3318;
    padding: 1.5rem;
    transform: translateY(1rem);
    transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.modal.is-open .modal__content {
    transform: translateY(0);
}

.modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: #5a6840;
    background: none;
    border: 1px solid #2a3318;
    cursor: pointer;
    transition: all 0.15s ease;
}

.modal__close:hover {
    background: #c8d97e;
    color: #0e1208;
}

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

.step-active {
    background: #c8d97e !important;
    border-color: #c8d97e !important;
    color: #0e1208 !important;
}

.step-completed {
    background: #2a3318 !important;
    border-color: #2a3318 !important;
    color: #c8d97e !important;
}

/* ============================================================
   Skeleton Loading
   ============================================================ */

.skeleton {
    position: relative;
    overflow: hidden;
    background: #1a2210;
    border: 1px solid #2a3318;
    color: transparent !important;
}

.skeleton * { visibility: hidden; }

.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, #141a08 50%, transparent 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   Reduced Motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .bd-btn, .bd-card, .rsvp-btn, .bd-input,
    .modal, .modal__content, .toast,
    .guest-avatar-stack .guest-avatar {
        transition: none;
    }

    .toast { transition: opacity 0.1s ease; transform: none; }
    .toast.is-visible { transform: none; }

    .skeleton::after { animation: none; background: #1a2210; }
    .bd-ticker__track { animation: none; }
}
