/* ============================================================
   public.events — Neubrutalism Component Styles
   Sharp corners, thick borders, offset shadows, bold type.
   ============================================================ */

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

.nb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.125rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1;
    cursor: pointer;
    border: 3px solid #0A0A0A;
    transition: all 0.12s ease;
    -webkit-user-select: none;
    user-select: none;
    white-space: nowrap;
    text-decoration: none;
}

/* Primary — yellow fill, black border, offset shadow */
.nb-btn--primary {
    background: #FFE500;
    color: #0A0A0A;
    box-shadow: 5px 5px 0px #0A0A0A;
}

.nb-btn--primary:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0px #0A0A0A;
}

.nb-btn--primary:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0px #0A0A0A;
}

/* Secondary — transparent, black border */
.nb-btn--secondary {
    background: transparent;
    color: #0A0A0A;
    box-shadow: none;
}

.nb-btn--secondary:hover {
    background: #0A0A0A;
    color: #F4EFE4;
}

.nb-btn--secondary:active {
    background: #222;
}

/* Ghost — no border, text only */
.nb-btn--ghost {
    background: transparent;
    color: #0A0A0A;
    border: none;
    box-shadow: none;
    padding: 0.5rem 0;
}

.nb-btn--ghost:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

/* Danger — red fill */
.nb-btn--danger {
    background: #FF3B3B;
    color: #FFFFFF;
    box-shadow: 5px 5px 0px #0A0A0A;
}

.nb-btn--danger:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0px #0A0A0A;
}

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

.nb-btn:focus-visible {
    outline: 3px solid #0A0A0A;
    outline-offset: 2px;
}

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

.nb-card {
    background: #FFFFFF;
    border: 3px solid #0A0A0A;
    box-shadow: 5px 5px 0px #0A0A0A;
    padding: 1.25rem;
    transition: all 0.12s ease;
    position: relative;
}

.nb-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0px #0A0A0A;
}

.nb-card:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0px #0A0A0A;
}

.nb-card--accent {
    background: #FFE500;
}

.nb-card--surface {
    background: #EEEAE0;
}

.nb-card--flat {
    box-shadow: none;
}

.nb-card--flat:hover {
    box-shadow: 5px 5px 0px #0A0A0A;
}

/* Shadow size variants */
.nb-card--sm { box-shadow: 3px 3px 0px #0A0A0A; }
.nb-card--sm:hover { box-shadow: 5px 5px 0px #0A0A0A; }
.nb-card--lg { box-shadow: 8px 8px 0px #0A0A0A; }
.nb-card--lg:hover { box-shadow: 11px 11px 0px #0A0A0A; }

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

.nb-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    white-space: nowrap;
    transition: all 0.12s ease;
}

/* Live — red with pulse dot */
.nb-badge--live {
    background: #FF3B3B;
    color: #FFFFFF;
    font-family: 'DM Mono', monospace;
    border: 2px solid #0A0A0A;
}

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

/* Label — black bg, yellow text */
.nb-badge--label {
    background: #0A0A0A;
    color: #FFE500;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.8125rem;
    letter-spacing: 0.2em;
}

/* Tag — outlined */
.nb-badge--tag {
    background: transparent;
    color: #0A0A0A;
    border: 2px solid #0A0A0A;
    font-family: 'DM Mono', monospace;
}

.nb-badge--tag:hover {
    background: #0A0A0A;
    color: #FFE500;
}

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

.nb-input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #0A0A0A;
    background: #FFFFFF;
    border: 3px solid #0A0A0A;
    transition: all 0.12s ease;
    appearance: none;
}

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

.nb-input:hover {
    box-shadow: 3px 3px 0px #0A0A0A;
}

.nb-input:focus {
    outline: none;
    box-shadow: 3px 3px 0px #0A0A0A;
    border-color: #0A0A0A;
}

.nb-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #EEEAE0;
}

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

select.nb-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='%230A0A0A' stroke-width='3'%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 */
.nb-label {
    display: block;
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #888;
    margin-bottom: 0.5rem;
}

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

.nb-ticker {
    background: #0A0A0A;
    height: 52px;
    overflow: hidden;
    display: flex;
    align-items: center;
    border-top: 3px solid #0A0A0A;
    border-bottom: 3px solid #0A0A0A;
}

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

.nb-ticker__item {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.125rem;
    letter-spacing: 0.15em;
    color: #FFFFFF;
    text-transform: uppercase;
    padding: 0 1rem;
}

.nb-ticker__sep {
    color: #FFE500;
    font-size: 1rem;
    padding: 0 0.25rem;
}

/* ============================================================
   Stamp Badge — Rotating circular element
   ============================================================ */

.nb-stamp {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px dashed #0A0A0A;
    background: #FFE500;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.05em;
    transform: rotate(-4deg);
    animation: stampIn 0.5s ease 0.4s both;
    box-shadow: 3px 3px 0px #0A0A0A;
    flex-shrink: 0;
}

.nb-stamp__value {
    font-size: 2rem;
    display: block;
    line-height: 1;
}

/* ============================================================
   RSVP Buttons — NB style
   ============================================================ */

.rsvp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem 0.75rem;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0A0A0A;
    background: #FFFFFF;
    border: 3px solid #0A0A0A;
    box-shadow: 3px 3px 0px #0A0A0A;
    cursor: pointer;
    transition: all 0.12s ease;
    -webkit-user-select: none;
    user-select: none;
    white-space: nowrap;
}

.rsvp-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px #0A0A0A;
}

.rsvp-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px #0A0A0A;
}

/* Going — green accent */
.rsvp-btn[aria-pressed="true"][data-status="going"] {
    background: #22c55e;
    color: #FFFFFF;
}

/* Maybe — yellow accent */
.rsvp-btn[aria-pressed="true"][data-status="maybe"] {
    background: #FFE500;
    color: #0A0A0A;
}

/* Not going — dark */
.rsvp-btn[aria-pressed="true"][data-status="not_going"] {
    background: #0A0A0A;
    color: #F4EFE4;
}

.rsvp-btn:focus-visible {
    outline: 3px solid #0A0A0A;
    outline-offset: 2px;
}

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

.guest-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 2px solid #0A0A0A;
    background: #FFE500;
    color: #0A0A0A;
    font-family: 'Bebas Neue', sans-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.12s 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: 2px solid #0A0A0A;
    background: #EEEAE0;
    color: #0A0A0A;
    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: #FFFFFF;
    border: 3px solid #0A0A0A;
    box-shadow: 5px 5px 0px #0A0A0A;
    color: #0A0A0A;
    font-family: 'DM Mono', monospace;
    font-size: 0.8125rem;
    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: #888;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.toast__dismiss:hover {
    color: #0A0A0A;
}

.toast--success { border-left: 6px solid #22c55e; }
.toast--error { border-left: 6px solid #FF3B3B; }
.toast--warning { border-left: 6px solid #FFE500; }

@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(10, 10, 10, 0.6);
}

.modal__content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 28rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    background: #FFFFFF;
    border: 3px solid #0A0A0A;
    box-shadow: 8px 8px 0px #0A0A0A;
    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: #888;
    background: none;
    border: 2px solid #0A0A0A;
    cursor: pointer;
    transition: all 0.12s ease;
}

.modal__close:hover {
    background: #0A0A0A;
    color: #FFE500;
}

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

.step-active {
    background: #FFE500 !important;
    border-color: #0A0A0A !important;
    color: #0A0A0A !important;
}

.step-completed {
    background: #0A0A0A !important;
    border-color: #0A0A0A !important;
    color: #FFE500 !important;
}

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

.skeleton {
    position: relative;
    overflow: hidden;
    background: #EEEAE0;
    border: 2px solid #0A0A0A;
    color: transparent !important;
}

.skeleton * { visibility: hidden; }

.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, #F4EFE4 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) {
    .nb-btn, .nb-card, .rsvp-btn, .nb-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: #EEEAE0; }
    .nb-ticker__track { animation: none; }
    .nb-stamp { animation: none; }
}
