/* ============================================================
   BookingEngine Global Styles — Guest Portal Redesign
   Design System: Campground Pro (Claude Design handoff)
   ============================================================ */

:root {
    /* ---- Max width ---- */
    --be-max-width: 1360px;

    /* ---- Forest palette ---- */
    --be-forest-900: #0F2E22;
    --be-forest-800: #143826;
    --be-forest-700: #1B4332;
    --be-forest-600: #2D5A42;
    --be-forest-500: #4A7C5B;
    --be-forest-300: #8FB09B;
    --be-forest-100: #D8E4DC;
    --be-forest-50:  #EEF3EF;

    /* Aliases */
    --be-forest: var(--be-forest-700);
    --be-forest-mid: var(--be-forest-600);
    --be-forest-light: var(--be-forest-50);
    --be-forest-subtle: #f6faf7;

    /* ---- Amber palette ---- */
    --be-amber-700: #A8832E;
    --be-amber-600: #C99A38;
    --be-amber-500: #D4A843;
    --be-amber-300: #E8C778;
    --be-amber-100: #F4E4B8;
    --be-amber-50:  #FBF5E4;

    --be-amber: var(--be-amber-500);
    --be-amber-hover: var(--be-amber-600);

    /* ---- Bark palette (text) ---- */
    --be-bark-900: #2B241B;
    --be-bark-700: #4A3F2F;
    --be-bark-500: #786854;
    --be-bark-300: #B4A58E;

    /* ---- Neutral surfaces ---- */
    --be-beige-100: #F5F5F2;
    --be-beige-200: #ECEBE5;
    --be-beige-300: #DFDDD3;
    --be-cream:     #FAF9F5;
    --be-paper:     #FFFFFF;

    --be-bg: var(--be-beige-100);

    /* ---- Semantic ---- */
    --be-success: #3F7D5F;
    --be-danger:  #B0462E;
    --be-danger-surface: #FDF1EF;
    --be-danger-border:  #F0CAC3;
    --be-error:   #B0462E;
    --be-info:    #4A7C5B;
    --be-status-online: #6FD28A;

    /* ---- Status ---- */
    --be-status-confirmed:     var(--be-success);
    --be-status-confirmed-bg:  var(--be-forest-50);
    --be-status-pending:       var(--be-amber-700);
    --be-status-pending-bg:    var(--be-amber-50);
    --be-status-cancelled:     #6b7280;
    --be-status-cancelled-bg:  #f3f4f6;
    --be-status-checkedin:     #1558b0;
    --be-status-checkedin-bg:  #dbeafe;
    --be-status-checkedout:    #4b5563;
    --be-status-checkedout-bg: #e5e7eb;

    /* ---- Typography ---- */
    --be-font-sans:  'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
    --be-font-serif: 'Fraunces', 'Plus Jakarta Sans', Georgia, serif;
    --be-font-mono:  'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --be-font: var(--be-font-sans);

    /* ---- Radius ---- */
    --be-radius-xs: 6px;
    --be-radius-sm: 10px;
    --be-radius-md: 14px;
    --be-radius-lg: 20px;
    --be-radius-xl: 28px;
    --be-radius-full: 999px;

    /* ---- Shadows ---- */
    --be-shadow-sm: 0 1px 2px rgba(27,67,50,.06), 0 1px 3px rgba(27,67,50,.04);
    --be-shadow-md: 0 4px 12px rgba(27,67,50,.08), 0 2px 4px rgba(27,67,50,.05);
    --be-shadow-lg: 0 16px 40px rgba(27,67,50,.12), 0 4px 12px rgba(27,67,50,.06);
    --be-shadow-xl: 0 24px 64px rgba(27,67,50,.18), 0 8px 20px rgba(27,67,50,.08);

    /* Legacy aliases */
    --be-card-radius: var(--be-radius-md);
    --be-card-shadow: var(--be-shadow-sm);
    --be-card-shadow-hover: var(--be-shadow-lg);
    --be-transition: 0.15s ease;
}

/* ============================================================
   Base reset
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--be-font-sans);
    font-feature-settings: 'ss01', 'cv11';
    color: var(--be-bark-900);
    background: var(--be-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   Layout containers
   ============================================================ */

.be-page-container {
    max-width: var(--be-max-width);
    margin: 0 auto;
    padding: 48px 28px;
}

.be-page-container--narrow {
    max-width: 780px;
    margin: 0 auto;
    padding: 48px 28px;
}

@media (max-width: 600px) {
    .be-page-container,
    .be-page-container--narrow {
        padding: 24px 16px;
    }
}

/* ============================================================
   Typography classes
   ============================================================ */

.be-h-display {
    font-family: var(--be-font-serif);
    font-weight: 500;
    font-size: clamp(36px, 4.6vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--be-forest-900);
    margin: 0;
}

.be-h-title {
    font-family: var(--be-font-serif);
    font-weight: 500;
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--be-forest-900);
    margin: 0;
}

.be-h-section {
    font-family: var(--be-font-serif);
    font-weight: 500;
    font-size: 22px;
    letter-spacing: -0.01em;
    color: var(--be-forest-900);
    margin: 0;
}

.be-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--be-forest-500);
    margin-bottom: 8px;
}

.be-sub {
    color: var(--be-bark-500);
    font-size: 15px;
    line-height: 1.55;
}

/* Legacy heading aliases */
.be-page-heading {
    font-family: var(--be-font-serif);
    font-weight: 500;
    font-size: clamp(32px, 4vw, 42px);
    color: var(--be-forest-900);
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.be-section-heading {
    font-size: 11px;
    font-weight: 700;
    color: var(--be-forest-500);
    margin: 0 0 14px 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ============================================================
   Cards
   ============================================================ */

.be-card {
    background: var(--be-paper);
    border-radius: var(--be-radius-md);
    box-shadow: var(--be-shadow-sm);
    border: 1px solid rgba(27,67,50,.06);
    overflow: hidden;
}

.be-card--hover {
    transition: box-shadow var(--be-transition), transform var(--be-transition);
    cursor: pointer;
}

.be-card--hover:hover {
    box-shadow: var(--be-shadow-lg);
    transform: translateY(-2px);
}

/* ============================================================
   Buttons
   ============================================================ */

.be-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--be-radius-sm);
    font-weight: 600;
    font-size: 14px;
    border: none;
    transition: all var(--be-transition);
    white-space: nowrap;
    cursor: pointer;
}

.be-btn-primary {
    background: var(--be-forest-700);
    color: var(--be-cream);
    box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, var(--be-shadow-sm);
}

.be-btn-primary:hover {
    background: var(--be-forest-800);
    box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, var(--be-shadow-md);
    transform: translateY(-1px);
}

.be-btn-gold {
    background: linear-gradient(180deg, var(--be-amber-500) 0%, var(--be-amber-600) 100%);
    color: var(--be-forest-900);
    box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 2px 8px rgba(212,168,67,.35);
}

.be-btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 6px 16px rgba(212,168,67,.45);
}

.be-btn-ghost {
    background: transparent;
    color: var(--be-forest-700);
    border: 1px solid var(--be-forest-100);
}

.be-btn-ghost:hover {
    background: var(--be-forest-50);
    border-color: var(--be-forest-300);
}

.be-btn-dark {
    background: var(--be-bark-900);
    color: var(--be-cream);
}

.be-btn-dark:hover {
    background: var(--be-forest-900);
}

.be-btn-danger {
    background: var(--be-danger);
    color: var(--be-cream);
}

.be-btn-danger:hover {
    filter: brightness(1.1);
}

.be-btn-lg {
    padding: 15px 26px;
    font-size: 15px;
    border-radius: 12px;
}

.be-btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 8px;
}

.be-btn:disabled {
    background: var(--be-beige-200);
    color: var(--be-bark-300);
    cursor: default;
    box-shadow: none;
    transform: none;
    border-color: transparent;
}

/* ============================================================
   Chips / badges
   ============================================================ */

.be-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--be-beige-200);
    border-radius: var(--be-radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--be-bark-700);
}

.be-chip-forest {
    background: var(--be-forest-50);
    color: var(--be-forest-700);
}

.be-chip-amber {
    background: var(--be-amber-50);
    color: var(--be-amber-700);
}

.be-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--be-radius-xs);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.be-badge--confirmed { background: var(--be-status-confirmed-bg); color: var(--be-status-confirmed); }
.be-badge--pending   { background: var(--be-status-pending-bg);   color: var(--be-status-pending); }
.be-badge--cancelled { background: var(--be-status-cancelled-bg); color: var(--be-status-cancelled); }
.be-badge--checkedin { background: var(--be-status-checkedin-bg); color: var(--be-status-checkedin); }
.be-badge--checkedout { background: var(--be-status-checkedout-bg); color: var(--be-status-checkedout); }

/* ============================================================
   Forms
   ============================================================ */

.be-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.be-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--be-bark-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.be-input,
.be-select {
    padding: 12px 14px;
    background: white;
    border: 1px solid var(--be-beige-300);
    border-radius: var(--be-radius-sm);
    font-size: 14.5px;
    color: var(--be-bark-900);
    transition: all var(--be-transition);
    outline: none;
    font-family: inherit;
}

.be-input:focus,
.be-select:focus {
    border-color: var(--be-forest-500);
    box-shadow: 0 0 0 3px var(--be-forest-50);
}

.be-input::placeholder {
    color: var(--be-bark-300);
}

.be-field-error {
    display: block;
    color: var(--be-danger);
    font-size: 0.8rem;
    margin-top: 2px;
    line-height: 1.3;
}

/* ============================================================
   Divider
   ============================================================ */

.be-divider {
    height: 1px;
    background: var(--be-beige-300);
    margin: 0;
    border: 0;
}

/* ============================================================
   Focus indicators (accessibility)
   ============================================================ */

*:focus-visible {
    outline: 2px solid var(--be-forest-500);
    outline-offset: 2px;
}

.be-card--hover:focus-visible {
    box-shadow: var(--be-shadow-lg);
    outline: 2px solid var(--be-forest-500);
    outline-offset: 2px;
}

/* ============================================================
   Loading & empty states
   ============================================================ */

.be-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    gap: 16px;
}

.be-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    gap: 12px;
}

/* ============================================================
   Utility
   ============================================================ */

.be-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--be-bark-700);
    text-decoration: none;
    margin-bottom: 16px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color var(--be-transition);
}

.be-back-link:hover {
    color: var(--be-forest-700);
}

.be-price-accent {
    color: var(--be-forest-700);
    font-weight: 700;
    font-family: var(--be-font-serif);
}

.be-text-hint {
    color: var(--be-bark-500);
}

.be-mono {
    font-family: var(--be-font-mono);
    letter-spacing: 0.04em;
}

/* ============================================================
   Timer animation
   ============================================================ */

@keyframes be-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes be-pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.be-timer-urgent {
    animation: be-pulse-red 1.2s ease-in-out infinite;
    color: var(--be-danger) !important;
    font-weight: 700;
}

/* ============================================================
   Fade-in & screen transitions
   ============================================================ */

@keyframes be-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.be-fade-in {
    animation: be-fade-in 0.25s ease;
}

/* Scroll-triggered reveal */
.be-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.be-reveal.be-visible {
    opacity: 1;
    transform: translateY(0);
}

.be-reveal-delay-1 { transition-delay: 0.1s; }
.be-reveal-delay-2 { transition-delay: 0.2s; }
.be-reveal-delay-3 { transition-delay: 0.3s; }

/* ============================================================
   Skeleton helpers
   ============================================================ */

.be-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.be-skeleton-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================================
   FluentUI component overrides — brand polish
   ============================================================ */

fluent-button[appearance="accent"],
fluent-button[appearance="accent"]::part(control) {
    border-radius: var(--be-radius-sm);
    font-weight: 600;
    letter-spacing: -0.01em;
}

fluent-text-field::part(root),
fluent-text-area::part(root),
fluent-number-field::part(root),
fluent-select::part(control) {
    border-radius: var(--be-radius-sm);
}

fluent-text-field:focus-within::part(root),
fluent-text-area:focus-within::part(root),
fluent-number-field:focus-within::part(root) {
    border-color: var(--be-forest-500);
    box-shadow: 0 0 0 1px var(--be-forest-500);
}

/* ============================================================
   Scrollbar
   ============================================================ */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(27,67,50,0.18);
    border-radius: 10px;
    border: 2px solid var(--be-beige-100);
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(27,67,50,0.32);
    background-clip: content-box;
    border: 2px solid var(--be-beige-100);
}
