/* ============================================================
   CHECK-IN PAGE STYLES
   Page-specific CSS for the check-in section.
   Use tokens from tokens.css and classes from components.css.
   ============================================================ */

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: #f8f8f8;
}

.ci-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: 1.5rem;
    box-sizing: border-box;
    background: #f4f4f5;
    font-family: Inter, 'Segoe UI', sans-serif;
}

.ci-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    max-width: 380px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    text-align: center;
}

/* ── Auto-closed warning banner (#36) ── */
.ci-autoclosed-banner {
    width: 100%;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    text-align: left;
    box-sizing: border-box;
}

.ci-autoclosed-banner__body {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex: 1;
    font-size: 0.8rem;
    color: #92400e;
    line-height: 1.5;
}

.ci-autoclosed-banner__icon {
    flex-shrink: 0;
    margin-top: 1px;
    color: #d97706;
}

.ci-autoclosed-banner__dismiss {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: #b45309;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.1s ease;
}

.ci-autoclosed-banner__dismiss:hover {
    background: #fde68a;
}

/* ── Icon ── */
.ci-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
}

.ci-icon--green {
    background: #dcfce7;
    color: #16a34a;
}

.ci-icon--amber {
    background: #fef9c3;
    color: #ca8a04;
}

.ci-icon--red {
    background: #fee2e2;
    color: #dc2626;
}

/* ── Text ── */
.ci-heading {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    color: #111827;
    letter-spacing: -0.02em;
}

.ci-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.ci-hint {
    font-size: 0.88rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.ci-hint--small {
    font-size: 0.78rem;
    color: #9ca3af;
}

/* ── Hours pill ── */
.ci-hours-pill {
    font-size: 1.05rem;
    font-weight: 700;
    color: #16a34a;
    background: #dcfce7;
    border-radius: 999px;
    padding: 0.35rem 1.1rem;
}

/* ── Detail rows ── */
.ci-detail-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.88rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.ci-detail-row:last-child {
    border-bottom: none;
}

.ci-detail-label {
    color: #9ca3af;
    font-weight: 500;
}

.ci-detail-value {
    color: #111827;
    font-weight: 600;
}

/* ── Spinner ── */
.ci-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: ci-spin 0.8s linear infinite;
}

@keyframes ci-spin {
    to { transform: rotate(360deg); }
}

/* ── Buttons ── */
.ci-btn {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s ease;
    margin-top: 0.25rem;
}

.ci-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ci-btn--primary {
    background: #111827;
    color: #ffffff;
}

.ci-btn--primary:hover:not(:disabled) {
    opacity: 0.85;
}

.ci-btn--secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1.5px solid #e5e7eb;
}

.ci-btn--secondary:hover:not(:disabled) {
    background: #e5e7eb;
}

/* ── Position note (run 29): what happened to the location, in plain words ── */
.ci-position-note {
    margin: 1rem 0 0;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 0.85rem;
    line-height: 1.45;
    text-align: left;
}

/* ── Synapse camera (/scan, run 29) ── */
.sc-card {
    gap: 0.75rem;
}

.sc-viewfinder {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: 60vh;
    border-radius: 16px;
    overflow: hidden;
    background: #111827;
}

.sc-viewfinder--live::after {
    content: '';
    position: absolute;
    inset: 18%;
    border: 3px solid rgba(255, 255, 255, 0.85);
    border-radius: 14px;
    pointer-events: none;
}

.sc-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sc-back {
    display: block;
    text-align: center;
    text-decoration: none;
    margin-top: 0.5rem;
}
