/* App styles — add custom CSS here or import additional stylesheets */

/* Data table design system — see resources/css/tables.css */
@import '/css/tables.css';

/* Brand deep orange (owner's request 2026-11-09: every former purple / indigo gradient uses these, for all roles).
   Same values as the clinic button accent below (#d4400f on white text is 4.63:1, WCAG AA). */
:root {
    --dd-orange: #d4400f;
    --dd-orange-rgb: 212, 64, 15;
    --dd-orange-dark: #b8340b;
    --dd-orange-deep: #9f2c08;
    --dd-orange-gradient: linear-gradient(135deg, var(--dd-orange), var(--dd-orange-dark));
    /* Pale tints for hero and stat-card washes. */
    --dd-orange-50: #fff7f2;
    --dd-orange-100: #ffede3;
    --dd-orange-200: #fed7c3;
}

/* Form required indicator */
.form-label.required:after {
    content: " *";
    color: red;
}

/* Custom scrollbar */
.custom-scrollbar {
    overflow-x: auto;
    overflow-y: hidden;
}
.custom-scrollbar::-webkit-scrollbar {
    height: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: var(--gray-500);
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: var(--gray-600);
}
.custom-scrollbar::-webkit-scrollbar-track {
    background-color: var(--gray-200);
}

/* Theme selector cards */
.theme-card-selected {
    border-color: var(--bs-primary) !important;
    outline: 2px solid var(--bs-primary);
    outline-offset: -1px;
    background-color: var(--bs-body-bg) !important;
}
.theme-radio-card {
    transition: border-color 0.15s, outline 0.15s;
}
.rs-item-selected {
    border-color: var(--bs-primary) !important;
    background-color: var(--bs-body-bg) !important;
    outline: 1px solid var(--bs-primary);
    outline-offset: -1px;
}

/* Clinic branding in the navbar brand slot.
   The theme only sets a height on `.navbar-brand img`, which is fine for the
   fixed-ratio platform icon but not for a clinic logo: those are user uploads
   of any shape, so cap both axes and letterbox rather than distort. */
.navbar-brand .clinic-logo {
    height: 2.25rem;
    max-width: 12rem;
    object-fit: contain;
    border-radius: 0.35rem;
}
/* No logo uploaded: an initials tile plus the clinic's name. `min-width: 0` on
   the brand and link is what lets a long name ellipsise instead of pushing the
   navbar icons off-screen. */
.navbar-brand,
.navbar-brand .clinic-brand {
    min-width: 0;
}
.navbar-brand .clinic-brand {
    gap: 0.625rem;
    max-width: 100%;
}
.navbar-brand .clinic-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: var(--primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.navbar-brand .clinic-brand-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--navbar-color);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.navbar-brand .clinic-brand:hover .clinic-brand-name {
    opacity: 0.85;
}
/* A primary tile would vanish on a primary navbar — invert it. */
.navbar-primary .navbar-brand .clinic-brand-mark {
    background: #fff;
    color: var(--primary);
}
/* Clinic logos are drawn for a white page (the public listing), so on a dark or
   primary navbar they would sit on top of their own colour. The platform logo
   needs no plate — whoever uploads that one can see the navbar they picked. */
.navbar-dark .navbar-brand .clinic-logo,
.navbar-primary .navbar-brand .clinic-logo {
    background: #fff;
    padding: 0.15rem 0.3rem;
}

/* ==========================================================================
   Clinic button accent — deep orange for clinic owners and doctors
   --------------------------------------------------------------------------
   `layouts/app.blade.php` sets `data-button-accent="deep-orange"` on <html>
   for those two roles only; Super Admin, staff and guest pages are untouched.

   Scoped to BUTTONS, not the palette: links, the sidebar, badges and charts
   keep the configured theme colour. Most button rules read `var(--primary)`,
   so the cheapest consistent fix is to re-point `--primary` on the button
   element itself — every existing hover, focus ring and tint follows. The
   remaining rules cover buttons that hard-code a colour.

   Severity is preserved: destructive buttons stay red and neutral ones
   (ghost / light / outline-secondary / Cancel) stay grey. Success / info /
   warning action buttons fold into the accent, as tables.css §12 intends.

   #d4400f on white text is 4.63:1 — passes WCAG AA for normal-size text.
   ========================================================================== */
html[data-button-accent='deep-orange']:not(:has(.dd-error-page)) {
    --accent-btn: #d4400f;
    --accent-btn-rgb: 212, 64, 15;
    --accent-btn-hover: #b8340b;
    --accent-btn-active: #9f2c08;
}

html[data-button-accent='deep-orange']:not(:has(.dd-error-page)) :is(.btn, .btn-group, .ui-btn, .dt-action, .av-btn, .xp-btn, .pd-btn, .pf-btn-save, .sms-btn, .pb-btn, .range-pill) {
    --primary: var(--accent-btn);
    --primary-rgb: var(--accent-btn-rgb);
}

/* Bootstrap solid buttons. */
html[data-button-accent='deep-orange']:not(:has(.dd-error-page)) :is(.btn-primary, .btn-success, .btn-info, .btn-warning, .btn-teal) {
    --btn-color: #fff;
    --btn-bg: var(--accent-btn);
    --btn-border-color: var(--accent-btn);
    --btn-hover-color: #fff;
    --btn-hover-bg: var(--accent-btn-hover);
    --btn-hover-border-color: var(--accent-btn-hover);
    --btn-active-color: #fff;
    --btn-active-bg: var(--accent-btn-active);
    --btn-active-border-color: var(--accent-btn-active);
    --btn-disabled-color: #fff;
    --btn-disabled-bg: var(--accent-btn);
    --btn-disabled-border-color: var(--accent-btn);
    --btn-focus-shadow-rgb: var(--accent-btn-rgb);
}

/* Bootstrap outline buttons. */
html[data-button-accent='deep-orange']:not(:has(.dd-error-page)) :is(.btn-outline-primary, .btn-outline-success, .btn-outline-info, .btn-outline-warning) {
    --btn-color: var(--accent-btn);
    --btn-border-color: var(--accent-btn);
    --btn-hover-color: #fff;
    --btn-hover-bg: var(--accent-btn);
    --btn-hover-border-color: var(--accent-btn);
    --btn-active-color: #fff;
    --btn-active-bg: var(--accent-btn-hover);
    --btn-active-border-color: var(--accent-btn-hover);
    --btn-disabled-color: var(--accent-btn);
    --btn-disabled-border-color: var(--accent-btn);
    --btn-focus-shadow-rgb: var(--accent-btn-rgb);
}

html[data-button-accent='deep-orange']:not(:has(.dd-error-page)) .btn-link {
    --btn-color: var(--accent-btn);
    --btn-hover-color: var(--accent-btn-hover);
    --btn-active-color: var(--accent-btn-active);
}

/* Gradient primaries. `.ui-btn-primary` mixes --primary with violet, which
   turns muddy against orange, so it gets a same-hue gradient instead; the
   module buttons below hard-code indigo. */
html[data-button-accent='deep-orange']:not(:has(.dd-error-page)) :is(.ui-btn-primary, .sms-btn-primary, .pd-btn-primary, .pf-btn-save) {
    background: linear-gradient(135deg, var(--accent-btn), var(--accent-btn-hover));
    color: #fff;
    box-shadow: 0 0.25rem 0.65rem rgba(var(--accent-btn-rgb), 0.3);
}

html[data-button-accent='deep-orange']:not(:has(.dd-error-page)) :is(.ui-btn-primary, .sms-btn-primary, .pd-btn-primary, .pf-btn-save):is(:hover, :focus) {
    color: #fff;
    box-shadow: 0 0.4rem 0.9rem rgba(var(--accent-btn-rgb), 0.42);
}

/* Payments screen solid button (Accounts). */
html[data-button-accent='deep-orange']:not(:has(.dd-error-page)) .pb-btn:not(.pb-btn-ghost) {
    background: var(--accent-btn);
    border-color: var(--accent-btn);
}

html[data-button-accent='deep-orange']:not(:has(.dd-error-page)) .pb-btn:not(.pb-btn-ghost):hover {
    background: var(--accent-btn-hover);
    border-color: var(--accent-btn-hover);
}

html[data-button-accent='deep-orange']:not(:has(.dd-error-page)) .pb-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(var(--accent-btn-rgb), 0.25);
}

html[data-button-accent='deep-orange']:not(:has(.dd-error-page)) .pd-btn-ghost:hover {
    border-color: rgba(var(--accent-btn-rgb), 0.45);
    color: var(--accent-btn);
    box-shadow: 0 0.3rem 0.8rem rgba(var(--accent-btn-rgb), 0.14);
}

/* Toolbar actions (`x-table-action`) that were green / blue / amber. */
html[data-button-accent='deep-orange']:not(:has(.dd-error-page)) :is(.dt-action-success, .dt-action-info, .dt-action-warning) {
    --dt-action-rgb: var(--accent-btn-rgb);
    --dt-action-color: var(--accent-btn);
}

html[data-button-accent='deep-orange']:not(:has(.dd-error-page))[data-color-theme='dark'] :is(.dt-action-success, .dt-action-info, .dt-action-warning) {
    --dt-action-color: color-mix(in srgb, var(--accent-btn) 70%, #fff);
}

/* Dashboard: time-range pills. */
html[data-button-accent='deep-orange']:not(:has(.dd-error-page)) .range-pill.is-active,
html[data-button-accent='deep-orange']:not(:has(.dd-error-page)) .range-pill.is-active:hover {
    background: var(--accent-btn);
    color: #fff;
    box-shadow: 0 0.25rem 0.6rem rgba(var(--accent-btn-rgb), 0.35);
}

html[data-button-accent='deep-orange']:not(:has(.dd-error-page)) .range-pill.is-active:hover {
    background: var(--accent-btn-hover);
}

html[data-button-accent='deep-orange']:not(:has(.dd-error-page)) .range-pill:focus-visible {
    box-shadow: 0 0 0 3px rgba(var(--accent-btn-rgb), 0.35);
}

/* The dashboard's Quick Access tiles (`.qa-tile`) are intentionally NOT
   re-coloured: each keeps its own emerald / amber / indigo / cyan identity. */

/* Layout static: sidebar & floating settings button */
@media (min-width: 992px) {
    #main-sidebar.align-self-start {
        margin: 1rem 0 1rem 1rem;
        border-radius: 0.5rem;
        overflow: clip;
    }
    #main-sidebar.align-self-start .sidebar-content {
        height: auto;
        overflow: visible;
    }
}
.btn-floating-settings {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1050;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease-in-out;
    background-color: var(--white) !important;
    color: var(--primary) !important;
    border: 1px solid var(--gray-300);
}
.btn-floating-settings:hover {
    transform: scale(1.1);
}

/* Toasts: their colours moved to src/components/primitives/dialog/variants.ts (docs/REACT_MIGRATION.md §8.11). */

/* Online presence indicator */
.online-pulse {
    width: 6px;
    height: 6px;
    animation: online-pulse 2s ease-in-out infinite;
}
@keyframes online-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Header "+ List Your Chamber" (components/layout/Navbar.tsx): a solid deep-orange pill, the same accent as the
   doctor / clinic-owner buttons above (it is only shown to those roles). */
#main-navbar .navbar-nav-link.dd-list-chamber {
    /* !important: the navbar theme's link colour rules (light / dark / primary navbars) would otherwise win. */
    color: #fff !important;
    background-color: var(--accent-btn, #d4400f);
    padding-inline: .875rem;
    transition: background-color .15s ease-in-out;
}
#main-navbar .navbar-nav-link.dd-list-chamber:hover,
#main-navbar .navbar-nav-link.dd-list-chamber:focus-visible {
    color: #fff !important;
    background-color: var(--accent-btn-hover, #b8340b);
}
/* The icon and label too: a theme rule colours the navbar's inner icons/labels directly. */
#main-navbar .navbar-nav-link.dd-list-chamber > * {
    color: #fff !important;
}
#main-navbar .navbar-nav-link.dd-list-chamber:active {
    background-color: var(--accent-btn-active, #9f2c08);
}

/* ==========================================================================
   BMDC verification (KYC) — header "Verify Now" button + popup (features/kyc/KycModal.tsx)
   ========================================================================== */
.dd-verify-now {
    display: inline-flex; align-items: center; gap: .375rem;
    padding: .4rem .9rem; border: 0; border-radius: 999px;
    background: #d97706; color: #fff; font-weight: 600; font-size: .8125rem; line-height: 1.2;
    box-shadow: 0 0 0 0 rgba(217, 119, 6, .55);
    animation: dd-verify-pulse 2.2s ease-out infinite;
    cursor: pointer; white-space: nowrap;
}
.dd-verify-now:hover, .dd-verify-now:focus-visible { background: #b45309; color: #fff; animation-play-state: paused; }
.dd-verify-now i { font-size: 1rem; }
@keyframes dd-verify-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(217, 119, 6, .55); }
    70%  { box-shadow: 0 0 0 10px rgba(217, 119, 6, 0); }
    100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .dd-verify-now { animation: none; }
}

.kyc-modal .kyc-head-icon {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 2.5rem; height: 2.5rem; margin-right: .75rem; border-radius: 50%;
    background: #fef3c7; color: #b45309; font-size: 1.35rem;
}
.kyc-modal .kyc-why {
    padding: .75rem .9rem; margin-bottom: .75rem; border-radius: .5rem;
    background: #f0f9ff; border: 1px solid #bae6fd; color: #0c4a6e;
}
.kyc-modal .kyc-steps { padding-left: 1.1rem; margin-bottom: 1rem; }
.kyc-modal .kyc-steps li + li { margin-top: .15rem; }
.kyc-modal .kyc-doc {
    height: 100%; padding: .85rem; border: 1px dashed #cbd5e1; border-radius: .6rem; background: #f8fafc;
}
.kyc-modal .kyc-doc.is-done { border-style: solid; border-color: #86efac; background: #f0fdf4; }
.kyc-modal .kyc-doc-icon { font-size: 1.5rem; color: #475569; }
.kyc-modal .kyc-doc-status { color: #15803d; }
.kyc-modal .kyc-file { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; cursor: pointer; margin: 0; }
.kyc-modal .kyc-file input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.kyc-modal .kyc-file-btn {
    display: inline-flex; align-items: center; padding: .35rem .75rem; border-radius: .4rem;
    border: 1px solid #cbd5e1; background: #fff; font-size: .8125rem; font-weight: 600;
}
.kyc-modal .kyc-file:focus-within .kyc-file-btn { outline: 2px solid #2563eb; outline-offset: 2px; }
.kyc-modal .kyc-file-name { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ==========================================================================
   Restriction explanations (src/components/restriction): why an action is unavailable, its status, and how to get
   access. Used by the 403 pages and inline where a feature is locked.
   ========================================================================== */
.dd-restriction-page { max-width: 760px; margin: 1.5rem auto; padding: 0 1rem; }
.dd-restriction {
    --rs-accent: #64748b; --rs-soft: #f1f5f9; --rs-ink: #334155;
    background: var(--card-bg, #fff); border: 1px solid #e5e7eb; border-top: 4px solid var(--rs-accent);
    border-radius: 1rem; padding: 1.5rem 1.6rem; box-shadow: 0 .75rem 2rem -1.2rem rgba(15, 23, 42, .35);
}
.dd-restriction--orange { --rs-accent: var(--dd-orange, #d4400f); --rs-soft: var(--dd-orange-50, #fff7f2); --rs-ink: var(--dd-orange-deep, #9f2c08); }
.dd-restriction--blue   { --rs-accent: #2563eb; --rs-soft: #eff6ff; --rs-ink: #1e40af; }
.dd-restriction--red    { --rs-accent: #dc2626; --rs-soft: #fef2f2; --rs-ink: #991b1b; }
.dd-restriction--amber  { --rs-accent: #d97706; --rs-soft: #fffbeb; --rs-ink: #92400e; }
.dd-restriction-head { display: flex; gap: 1rem; align-items: flex-start; }
.dd-restriction-icon {
    flex: 0 0 3rem; width: 3rem; height: 3rem; border-radius: .9rem; display: inline-flex; align-items: center; justify-content: center;
    background: var(--rs-soft); color: var(--rs-accent); font-size: 1.6rem;
}
.dd-restriction-badge {
    display: inline-flex; align-items: center; padding: .15rem .6rem; border-radius: 999px; margin-bottom: .4rem;
    font-size: .72rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
    background: var(--rs-soft); color: var(--rs-ink);
}
.dd-restriction-title { font-size: 1.25rem; font-weight: 700; margin: 0 0 .35rem; line-height: 1.3; }
.dd-restriction-reason { margin: 0; color: #475569; }
.dd-restriction-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 1rem 0 0; padding: .7rem .9rem; border-radius: .6rem; background: #f8fafc; }
.dd-restriction-facts dt { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
.dd-restriction-facts dd { margin: 0; font-weight: 600; }
.dd-restriction-steps { margin-top: 1.1rem; }
.dd-restriction-steps-title { font-weight: 700; font-size: .85rem; margin-bottom: .4rem; }
.dd-restriction-steps ol { margin: 0; padding-left: 1.2rem; color: #334155; }
.dd-restriction-steps li + li { margin-top: .3rem; }
.dd-restriction-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.dd-restriction.is-compact { padding: 1rem 1.1rem; box-shadow: none; }
.dd-restriction.is-compact .dd-restriction-title { font-size: 1.05rem; }
@media (max-width: 575.98px) {
    .dd-restriction { padding: 1.1rem; }
    .dd-restriction-head { flex-direction: column; gap: .6rem; }
}

/* Header verification status (features/kyc/VerificationStatus): Verify Now → Under Verification → Verified. */
.dd-verify-status {
    display: inline-flex; align-items: center; gap: .375rem; padding: .4rem .9rem; border-radius: 999px; border: 1px solid transparent;
    font-weight: 600; font-size: .8125rem; line-height: 1.2; white-space: nowrap; cursor: pointer; background: none;
}
.dd-verify-status i { font-size: 1rem; }
.dd-verify-status.is-review { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.dd-verify-status.is-review:hover, .dd-verify-status.is-review:focus-visible { background: #dbeafe; color: #1e40af; }
.dd-verify-status.is-rejected { background: #dc2626; color: #fff; }
.dd-verify-status.is-rejected:hover, .dd-verify-status.is-rejected:focus-visible { background: #b91c1c; color: #fff; }
.dd-verify-status.is-verified { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.dd-verify-status.is-verified:hover, .dd-verify-status.is-verified:focus-visible { background: #d1fae5; color: #065f46; }
.kyc-modal .kyc-review {
    padding: .75rem .9rem; margin-bottom: .9rem; border-radius: .5rem; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a;
}
.kyc-modal .kyc-review.is-verified { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
/* A locked action (shown, with the reason one click away, instead of hidden). */
.dd-locked-hint { display: inline-flex; align-items: center; gap: .25rem; margin-left: .35rem; padding: .05rem .4rem; border-radius: 999px;
    font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; background: #eff6ff; color: #1d4ed8; }
.dd-locked-hint.is-action { background: var(--dd-orange-50, #fff7f2); color: var(--dd-orange, #d4400f); }
