/* ============================================================
   StomaDesk overrides for WowDash template
   Do NOT edit public/wowdash/css/style.css — override here.
   ============================================================ */

/* Theme toggle: hide JS-written label, show sun/moon icon */
[data-theme-toggle] {
    font-size: 0;
    color: transparent;
}

[data-theme-toggle]::after {
    font-family: "remixicon";
    font-size: 20px;
    content: "\f1bf"; /* ri-sun-line */
}

html[data-theme="dark"] [data-theme-toggle]::after {
    content: "\ef6f"; /* ri-moon-clear-line */
}

/* Brand / logo sizing */
.sidebar-logo img {
    max-height: 44px;
    width: auto;
}

.sidebar.active .sidebar-logo img.logo-icon {
    max-width: 44px;
    max-height: 44px;
    width: auto;
}

/* ============================================================
   Patient card link in the appointments schedule
   (WowDash sets `a { color: inherit }` — give it an explicit color)
   ============================================================ */

.patient-card-link {
    color: var(--primary-600, #487fff);
    font-weight: 500;
}

.patient-card-link:hover {
    color: var(--primary-700, #486cea);
    text-decoration: underline;
}

html[data-theme="dark"] .patient-card-link {
    color: var(--primary-400, #519fff);
}

html[data-theme="dark"] .patient-card-link:hover {
    color: var(--primary-300, #6bb1ff);
}

/* ============================================================
   Dashboard stat cards (clickable)
   WowDash sets `a { color: inherit }` — keep colors, add hover cue.
   ============================================================ */

.stat-card {
    display: block;
    color: inherit;
    text-decoration: none;
}

.stat-card .card {
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover .card,
.stat-card:focus-visible .card {
    border-color: var(--primary-300, #b1cfff);
    box-shadow: 0 6px 20px rgba(72, 127, 255, 0.12);
}

html[data-theme="dark"] .stat-card:hover .card,
html[data-theme="dark"] .stat-card:focus-visible .card {
    border-color: var(--primary-700, #2a4a9e);
    box-shadow: 0 6px 20px rgba(72, 127, 255, 0.2);
}

/* ============================================================
   Equal-height widgets (dashboards and reports)
   Clickable stat cards are `a.stat-card` wrapping `.card`;
   plain report widgets use `div.stat-widget` as the `.card` itself.
   ============================================================ */

.stat-card,
.stat-card > .card,
.stat-widget {
    height: 100%;
}

.stat-card .card-body,
.stat-widget .card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.stat-card .card-body .text-secondary-light:last-child,
.stat-widget .card-body .text-secondary-light:last-child {
    margin-top: auto;
}

/* ============================================================
   Auth pages (Orchid login override)
   ============================================================ */

.auth-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.auth-right .form-check.style-check {
    margin-bottom: 0;
}

.auth-right .btn-primary {
    --bs-btn-font-size: 0.875rem;
}

/* ============================================================
   Landing page
   ============================================================ */

.landing-nav {
    background: var(--color-base, #ffffff);
    border-bottom: 1px solid rgba(128, 138, 157, 0.16);
}

.landing-nav .nav-link {
    color: var(--text-secondary-light, #6c757d);
    font-weight: 500;
}

.landing-nav .nav-link:hover {
    color: var(--brand-color, #4c49d8);
}

.landing-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.landing-hero {
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(76, 73, 216, 0.14), transparent 60%),
        radial-gradient(900px 500px at 10% 0%, rgba(56, 189, 248, 0.12), transparent 60%),
        var(--color-base, #ffffff);
}

.landing-hero-title {
    letter-spacing: -0.02em;
}

.landing-mockup {
    max-width: 900px;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.landing-section {
    padding-top: 88px;
    padding-bottom: 88px;
}

.landing-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.landing-footer {
    border-top: 1px solid rgba(128, 138, 157, 0.16);
}

/* ============================================================
   Weekly calendar grid (doctor + clinic panels)
   ============================================================ */

.cal-scroll {
    overflow-x: auto;
}

.cal-day-card {
    height: 100%;
}

.cal-grid {
    display: flex;
    min-width: 960px;
    max-height: 72vh;
    overflow: auto;
}

.cal-day-col {
    flex: 1 1 0;
    min-width: 120px;
    border-left: 1px solid var(--border-color, rgba(209, 213, 219, 0.5));
}

.cal-day-col--time {
    flex: 0 0 52px;
    min-width: 52px;
}

.cal-day-head {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 8px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid var(--border-color, rgba(209, 213, 219, 0.5));
    background-color: var(--white, #ffffff);
    white-space: nowrap;
}

.cal-day-head--today {
    background: var(--primary-50, #e4f1ff);
    color: var(--primary-700, #486cea);
    border-radius: 6px 6px 0 0;
}

.cal-body {
    position: relative;
}

.cal-hour-line {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px solid var(--border-color, rgba(209, 213, 219, 0.5));
    padding-left: 4px;
    font-size: 0.7rem;
    line-height: 1.4;
    color: var(--neutral-500, #6b7280);
    white-space: nowrap;
}

.cal-day-col--time .cal-hour-line {
    text-align: right;
    padding: 0 4px;
}

.cal-block {
    position: absolute;
    left: 3px;
    right: 3px;
    display: block;
    padding: 3px 6px;
    border-radius: 4px;
    border-left: 3px solid transparent;
    font-size: 0.75rem;
    line-height: 1.3;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
}

.cal-block__time,
.cal-block__patient,
.cal-block__doctor {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-block__time {
    font-weight: 600;
}

.cal-block__doctor {
    font-size: 0.68rem;
    color: var(--neutral-500, #6b7280);
}

.cal-block--scheduled {
    background: var(--primary-50, #e4f1ff);
    border-color: var(--primary-500, #458eff);
}

.cal-block--completed {
    background: var(--success-50, #f0fdf4);
    border-color: var(--success-500, #22c55e);
}

.cal-block--cancelled {
    background: var(--neutral-200, #ebecef);
    border-color: var(--neutral-400, #9ca3af);
    opacity: 0.55;
    text-decoration: line-through;
}

.cal-block--no-show {
    background: var(--warning-50, #fefce8);
    border-color: var(--warning-500, #eab308);
    opacity: 0.7;
}

.cal-block:hover,
.cal-block:focus-visible {
    border-color: var(--primary-700, #486cea);
    box-shadow: 0 4px 12px rgba(72, 127, 255, 0.18);
}

html[data-theme="dark"] .cal-block--scheduled {
    background: rgba(72, 127, 255, 0.18);
}

html[data-theme="dark"] .cal-block--completed {
    background: rgba(34, 197, 94, 0.16);
}

html[data-theme="dark"] .cal-block--cancelled {
    background: rgba(75, 85, 99, 0.3);
}

html[data-theme="dark"] .cal-block--no-show {
    background: rgba(234, 179, 8, 0.16);
}
