﻿/* ================================================================
   reservation-status.css
   Drop into wwwroot/css/ and reference in App.razor / _Layout.cshtml
   Depends on the site's existing style.css for CSS variables.
   ================================================================ */

/* ── Status token colours (extend site vars) ────────────────────── */
:root {
    --status-requested : #f59e0b;
    --status-booked    : #2196f3;
    --status-confirmed : #10b981;
    --status-cancelled : #fe7066;

    --rs-bg            : #f5f7fa;
    --rs-surface       : #ffffff;
    --rs-text          : #1a2233;
    --rs-muted         : #848484;
}

/* ── Demo bar (remove in production) ───────────────────────────── */
.demo-bar {
    background: #1a2233;
    padding: 12px 16px;
    text-align: center;
}
.demo-bar p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.demo-pills { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.demo-pill {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all 0.2s;
    background: transparent;
}
.demo-pill[data-status="requested"]        { border-color: var(--status-requested); color: var(--status-requested); }
.demo-pill[data-status="booked"]           { border-color: var(--status-booked);    color: var(--status-booked); }
.demo-pill[data-status="confirmed"]        { border-color: var(--status-confirmed); color: var(--status-confirmed); }
.demo-pill[data-status="cancelled"]        { border-color: var(--status-cancelled); color: var(--status-cancelled); }
.demo-pill[data-status="requested"].active { background: var(--status-requested); color: #fff; }
.demo-pill[data-status="booked"].active    { background: var(--status-booked);    color: #fff; }
.demo-pill[data-status="confirmed"].active { background: var(--status-confirmed); color: #fff; }
.demo-pill[data-status="cancelled"].active { background: var(--status-cancelled); color: #fff; }

/* ── Header ─────────────────────────────────────────────────────── */
.header-top {
    background: var(--primary);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-top .brand {
    font-size: 22px;
    color: #fff;
    letter-spacing: 0.5px;
}
.header-top .ref-pill {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

/* ── Hero band ──────────────────────────────────────────────────── */
.hero-band {
    background: linear-gradient(135deg, var(--darkerPrimary) 0%, var(--primary) 60%, var(--lightPrimary) 100%);
    padding: 36px 24px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-band h1 {
    font-size: clamp(26px, 6vw, 38px);
    color: #fff;
    margin-bottom: 8px;
    position: relative;
    font-weight: 400;
}
.hero-band p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    margin-bottom: 0;
    font-weight: 300;
    position: relative;
}

/* ── Page body ──────────────────────────────────────────────────── */
.page-body {
    max-width: 640px;
    margin: -32px auto 40px;
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

/* ── Card ───────────────────────────────────────────────────────── */
.card {
    background: var(--rs-surface);
    border-radius: var(--borderRadius);
    box-shadow: 0 4px 24px rgba(33, 150, 243, 0.10), 0 1px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 16px;
    animation: rs-fadeUp 0.4s ease both;
}
.card:nth-child(2) { animation-delay: 0.07s; }
.card:nth-child(3) { animation-delay: 0.14s; }
.card:nth-child(4) { animation-delay: 0.21s; }

@keyframes rs-fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card-header {
    padding: 18px 20px 14px;
    border-bottom: var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.card-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(33, 150, 243, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.card-header-icon svg { width: 16px; height: 16px; }
.card-header h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--rs-text);
    margin: 0;
}
.card-body { padding: 20px; }

/* ── Status header row ──────────────────────────────────────────── */
.status-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.updated-label {
    font-size: 12px;
    color: var(--rs-muted);
}

/* ── Status badge ───────────────────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; }

.status-requested                  { background: rgba(245, 158, 11, 0.12); color: var(--status-requested); }
.status-requested  .status-dot     { background: var(--status-requested); box-shadow: 0 0 0 3px rgba(245,158,11,0.2); }
.status-booked                     { background: rgba(33, 150, 243, 0.12); color: var(--status-booked); }
.status-booked     .status-dot     { background: var(--status-booked); box-shadow: 0 0 0 3px rgba(33,150,243,0.2); }
.status-confirmed                  { background: rgba(16, 185, 129, 0.12); color: var(--status-confirmed); }
.status-confirmed  .status-dot     { background: var(--status-confirmed); box-shadow: 0 0 0 3px rgba(16,185,129,0.2); animation: rs-pulse 2s infinite; }
.status-cancelled                  { background: rgba(254, 112, 102, 0.12); color: var(--status-cancelled); }
.status-cancelled  .status-dot     { background: var(--status-cancelled); }

@keyframes rs-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }
    50%       { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.08); }
}

/* ── Timeline ───────────────────────────────────────────────────── */
.status-timeline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    padding: 0 4px;
}
.status-timeline::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: #e8edf2;
    z-index: 0;
}
.timeline-fill {
    position: absolute;
    top: 16px;
    left: 20px;
    height: 2px;
    background: var(--primary);
    z-index: 1;
    transition: width 0.5s ease;
}

/* TimelineStep component */
.tl-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
    z-index: 2;
}
.tl-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e8edf2;
    border: 2px solid #e8edf2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.tl-circle svg { width: 14px; height: 14px; color: #b0bec5; }

.tl-step.done     .tl-circle       { background: var(--primary); border-color: var(--primary); }
.tl-step.done     .tl-circle svg   { color: #fff; }
.tl-step.active   .tl-circle       { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(33,150,243,0.15); }
.tl-step.active   .tl-circle svg   { color: var(--primary); }
.tl-step.cancelled .tl-circle      { background: var(--red); border-color: var(--red); }
.tl-step.cancelled .tl-circle svg  { color: #fff; }

.tl-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--rs-muted);
    text-align: center;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.tl-step.done      .tl-label,
.tl-step.active    .tl-label  { color: var(--primary); font-weight: 600; }
.tl-step.cancelled .tl-label  { color: var(--red); font-weight: 600; }

/* ── Status message ─────────────────────────────────────────────── */
.status-message {
    margin-top: 20px;
    padding: 14px;
    border-radius: 8px;
    border-left: 3px solid transparent;
}
.status-message p {
    font-size: 13px;
    color: var(--rs-text);
    line-height: 1.6;
    margin: 0;
}

/* ── Detail grid ────────────────────────────────────────────────── */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 400px) {
    .detail-grid { grid-template-columns: 1fr; }
}
.detail-item label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--rs-muted);
    margin-bottom: 3px;
    font-weight: 500;
}
.detail-item span {
    font-size: 15px;
    font-weight: 500;
    color: var(--rs-text);
}
.detail-item.full { grid-column: 1 / -1; }

.divider { height: 1px; background: var(--rs-bg); margin: 16px 0; }

/* ── Guest row ──────────────────────────────────────────────────── */
.guest-row { display: flex; align-items: center; gap: 14px; }
.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: "DM Serif Display", "Georgia", serif;
    font-size: 18px;
    flex-shrink: 0;
}
.guest-info { flex: 1; }
.guest-info strong { display: block; font-size: 15px; color: var(--rs-text); font-weight: 600; }
.guest-info span   { font-size: 13px; color: var(--rs-muted); }

/* ── Price rows ─────────────────────────────────────────────────── */
.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: var(--rs-muted);
    border-bottom: var(--border);
}
.price-row:last-child    { border-bottom: none; }
.price-row span:last-child { font-weight: 500; color: var(--rs-text); }
.price-row.total {
    font-size: 16px;
    font-weight: 700;
    color: var(--rs-text);
    padding-top: 12px;
}
.price-row.total span:last-child { color: var(--primary); font-size: 18px; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--borderRadius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 100%;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(33, 150, 243, 0.35);
}
.btn-primary:hover {
    background: var(--darkPrimary);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.45);
    transform: translateY(-1px);
    color: #fff;
}
.btn-primary:active { transform: translateY(0); }
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: rgba(33, 150, 243, 0.06); }

/* ── Help note ──────────────────────────────────────────────────── */
.help-note {
    text-align: center;
    font-size: 12px;
    color: var(--rs-muted);
    padding: 0 20px 20px;
    line-height: 1.6;
}
.help-note a { color: var(--primary); text-decoration: none; }
