/* === CWH CARDS === */

/* Base card — branded border, rounded corners, and shadow transition */
.cwh-card {
    font-family: var(--cwh-font-family);
    border: 1px solid var(--cwh-border);
    border-radius: 12px;
    transition: box-shadow 0.2s ease;
}

/* Subtle depth lift on hover */
.cwh-card:hover {
    box-shadow: 0 4px 16px rgba(0, 51, 126, 0.10);
}

/* Reduce default Bootstrap card-body bottom padding */
.cwh-card .card-body {
    padding-bottom: 2px;
}

/* Restore breathing room at the base of collapsable card bodies — the tight
   2px above is fine for static cards but squashes table/empty-state content
   that sits inside an accordion panel. */
.cwh-card .collapse .card-body {
    padding-bottom: 24px;
}

/* === DASHBOARD SUMMARY PANELS ===
   The at-a-glance KPI summary. Each category (Pharmacy, Mobile Clinics) is its
   own panel, colour-coded by a brand-coloured top accent bar + label dot, so
   the two read as distinct at a glance. Numbers are the hero; no icons. Panels
   sit side by side on desktop and stack on tablet/phone. The accent colour for
   a panel is set with the --accent custom property on .cwh-summary-panel. */

/* Responsive 2-up wrapper for the category panels */
.cwh-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
@media (max-width: 991.98px) {
    .cwh-summary {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* One category panel */
.cwh-summary-panel {
    position: relative;
    background: var(--cwh-white);
    border: 1px solid var(--cwh-border);
    border-radius: 14px;
    overflow: hidden;
}
/* Brand-coloured accent bar across the top of each panel */
.cwh-summary-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent, var(--cwh-dark-blue));
}

/* Panel header: accent-coloured category icon + uppercase label */
.cwh-summary-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 22px 16px;
}
.cwh-summary-icon {
    font-size: 20px;
    line-height: 1;
    color: var(--accent, var(--cwh-dark-blue));
    flex-shrink: 0;
}
.cwh-summary-title {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-blue);
    font-size: 13px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

/* Grid of stat cells, divided by hairlines (grid-gap technique: the 1px gap
   reveals the --cwh-border background, drawing vertical dividers between cells
   and horizontal ones when they wrap). */
.cwh-summary-stats {
    display: grid;
    gap: 1px;
    background: var(--cwh-border);
    border-top: 1px solid var(--cwh-border);
}
.cwh-summary-stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cwh-summary-stats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Phone: two columns so numbers stay readable */
@media (max-width: 575.98px) {
    .cwh-summary-stats--3,
    .cwh-summary-stats--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* A single number + caption cell */
.cwh-summary-stat {
    background: var(--cwh-white);
    padding: 18px 20px 20px;
}

/* The large hero number */
.cwh-summary-num {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-blue);
    font-size: 34px;
    line-height: 1;
}

/* Muted caption beneath the number */
.cwh-summary-cap {
    font-size: 12.5px;
    color: var(--cwh-middle-blue);
    margin-top: 6px;
    line-height: 1.25;
}

/* === QUICK ACTION BUTTON ===
   Tile-style shortcut button used in dashboard "Quick Actions" rows: an icon
   beside a label that fills with the brand colour on hover. */
.cwh-quick-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 160px;
    gap: 8px;
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-medium);
    font-size: 14px;
    color: var(--cwh-dark-blue);
    background: var(--cwh-white);
    border: 1px solid var(--cwh-border);
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.cwh-quick-action:hover {
    background: var(--cwh-dark-blue);
    color: var(--cwh-white);
    border-color: var(--cwh-dark-blue);
    box-shadow: 0 4px 16px rgba(0, 51, 126, 0.10);
}

.cwh-quick-action i {
    font-size: 18px;
}

/* Square icon badge displayed alongside the card title */
.cwh-card-icon {
    background: var(--cwh-light-blue);
    border-radius: 10px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Icon glyph inside the badge */
.cwh-card-icon i {
    color: var(--cwh-dark-blue);
    font-size: 22px;
}

/* Card title text */
.cwh-card-name {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-blue);
}

/* Secondary description text beneath the card title */
.cwh-card-description {
    font-size: 13px;
    color: var(--cwh-middle-blue);
}

/* Booking link URL shown beneath the description */
.cwh-card-booking-link {
    font-size: 11px;
    color: var(--cwh-mid-grey);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Thin horizontal rule used to separate card sections */
.cwh-card-divider {
    border-top: 1px solid var(--cwh-border);
    width: 100%;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Increase breathing room between badge background and text */
.badge {
    padding: 8px 12px !important;
}

/* Ensure card column dropdowns render above other stacked elements */
.cwh-card-col .dropdown-menu {
    z-index: 200000;
}

/* Clickable zone within a card — pointer cursor and name underline on hover */
.cwh-card--clickable {
    cursor: pointer;
    display: block;
}

.cwh-card--clickable:hover .cwh-card-name {
    text-decoration: underline;
}

/* === CHOICE TILE ===
   A whole-tile button for picking one of several things — the vaccinator's store chooser. A real
   <button>, so it is reachable by keyboard and touch and submits its form with no script. Laid
   out as a column: name, detail line, then the arrow pinned to the bottom-right. */
.cwh-choice-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    min-height: 110px;
    text-align: left;
    font-family: var(--cwh-font-family);
    background: var(--cwh-white);
    border: 1px solid var(--cwh-border);
    border-left: 4px solid var(--cwh-dark-blue);
    border-radius: 10px;
    padding: 16px 18px;
    cursor: pointer;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.cwh-choice-tile:hover,
.cwh-choice-tile:focus-visible {
    box-shadow: 0 4px 16px rgba(0, 51, 126, 0.10);
    border-color: var(--cwh-middle-blue);
    border-left-color: var(--cwh-dark-blue);
    outline: none;
}

/* The thing being chosen */
.cwh-choice-tile-name {
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-blue);
    font-size: 16px;
    line-height: 1.3;
}

/* One supporting line beneath it, e.g. an address */
.cwh-choice-tile-detail {
    font-size: 13px;
    color: var(--cwh-middle-blue);
    line-height: 1.4;
}

/* The arrow, pinned to the tile's bottom-right whatever the tile's height */
.cwh-choice-tile-go {
    margin-top: auto;
    align-self: flex-end;
    font-size: 20px;
    color: var(--cwh-dark-blue);
}

/* Wrapper for the card footer action buttons */
.cwh-card-actions {
    display: flex;
    gap: 6px;
}

/* Small rounded pill buttons used in the card footer */
.cwh-card-action-btn {
    font-family: var(--cwh-font-family);
    font-size: 12px;
    font-weight: var(--cwh-font-medium);
    padding: 4px 10px;
    border-radius: 20px;
    background: transparent;
    line-height: 1.4;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cwh-card-action-btn--edit {
    border: 1px solid var(--cwh-dark-blue);
    color: var(--cwh-dark-blue);
}

.cwh-card-action-btn--edit:hover {
    background: var(--cwh-dark-blue);
    color: var(--cwh-white);
}

.cwh-card-action-btn--links {
    border: 1px solid var(--cwh-open-blue);
    color: var(--cwh-open-blue);
}

.cwh-card-action-btn--links:hover {
    background: var(--cwh-open-blue);
    color: var(--cwh-white);
}

/* Wrapper for rich HTML content rendered from a WYSIWYG editor */
.cwh-rich-content {
    font-family: var(--cwh-font-family);
    font-size: 14px;
line-height: 1.4;
    color: var(--cwh-black);
}

.cwh-rich-content p {
    margin-bottom: 0.5rem;
}

.cwh-rich-content p:last-child {
    margin-bottom: 0;
}

.cwh-rich-content li {
    margin-bottom: 0.15rem;
}

.cwh-rich-content strong,
.cwh-rich-content b {
    font-weight: var(--cwh-font-bold);
}

.cwh-rich-content h1, .cwh-rich-content h2, .cwh-rich-content h3,
.cwh-rich-content h4, .cwh-rich-content h5, .cwh-rich-content h6 {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    margin-bottom: 0.4rem;
}

/* MS Word list paragraphs — override hanging-indent inline styles so bullets
   sit indented within the card rather than overflowing the left edge */
.cwh-rich-content .MsoListParagraph,
.cwh-rich-content .MsoListParagraphCxSpFirst,
.cwh-rich-content .MsoListParagraphCxSpMiddle,
.cwh-rich-content .MsoListParagraphCxSpLast {
    margin-left: 1.5em;
    text-indent: 0 !important;
    margin-bottom: 0.2rem;
}

/* Informational notice strip — surfaces status messages inside a card body.
   Use for non-blocking alerts: inactive states, read-only warnings, etc. */
.cwh-notice {
    font-family: var(--cwh-font-family);
    font-size: 13px;
    color: var(--cwh-dark-blue);
    background: var(--cwh-border);
    border-left: 3px solid var(--cwh-open-blue);
    border-radius: 6px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.cwh-notice i {
    font-size: 1.1rem;
    flex-shrink: 0;
    color: var(--cwh-dark-blue);
}

/* Inactive/disabled section — text and icons shift to --cwh-mid-grey.
   Applied by JS to the header content and section body when the toggle is off.
   The toggle switch itself is never targeted, so it remains interactive. */
.cwh-section-inactive,
.cwh-section-inactive * {
    color: var(--cwh-mid-grey) !important;
    border-color: var(--cwh-border) !important;
}

/* Icon badge: light-grey background, dark-grey icon */
.cwh-section-inactive .cwh-card-icon {
    background: var(--cwh-light-grey) !important;
}

.cwh-section-inactive .cwh-card-icon i {
    color: var(--cwh-mid-grey) !important;
}

/* Add Question button: dark-grey background, white text */
.cwh-section-inactive .cwh-ps-add-btn,
.cwh-section-inactive .cwh-ps-add-btn i {
    background: var(--cwh-mid-grey) !important;
    color: var(--cwh-white) !important;
}

