.main-content-full {
    padding-left: 12px;
}

.app-header-logo-img {
    height: 32px;
    width: auto;
    padding-left: 10px;
}

.app-header-logo-img-compact {
    display: none;
}

@media (max-width: 1199.98px) {
    .app-header-logo-img {
        padding-left: 0;
    }
}

/* ApexCharts hides the pan and selection-zoom toolbar icons on touch devices by
   swapping their class to .apexcharts-element-hidden *instead of* their normal
   apexcharts-pan-icon/apexcharts-zoom-icon class (not in addition to it), so a
   selector requiring both classes together never matches. Scoping to
   .apexcharts-toolbar keeps this from touching the class's unrelated uses
   elsewhere (hidden data labels, hidden series points). Re-apply the sizing
   those icon classes would have given them, since that's lost along with the
   class swap. */
.apexcharts-toolbar .apexcharts-element-hidden {
    opacity: 1;
    cursor: pointer;
    width: 20px;
    height: 20px;
    line-height: 24px;
    text-align: center;
}

/* Without this, the browser's default touch handling treats a drag on the
   chart as a page scroll, so the library's own single-finger pan/select-zoom
   drag never receives the gesture. Restrict capture to horizontal so vertical
   page scrolling over the chart still works normally. */
.apexcharts-canvas {
    touch-action: pan-y;
}

/* Header bar is dark by default, independent of the site-wide light/dark toggle */
.app-header {
    background-color: #1b232d !important;
}

.app-header-offcanvas-header {
    background-color: #1b232d;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

/* custom.js toggles a .sticky class on scroll (id="header-area" is kept for
   pharmacy-profile.js's scroll-offset calc) — cancel the sticky positioning
   it would otherwise apply, since this header should stay in normal flow. */
.app-header.sticky {
    position: static !important;
    top: auto !important;
    box-shadow: none !important;
    animation: none !important;
}

.app-header-burger-bar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    height: 1px;
    width: 25px;
}

.app-header-nav-link {
    background: transparent;
    border: 0;
    padding: 8px 4px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
}

.app-header-nav-link .material-symbols-outlined {
    font-size: 20px;
}

.app-header-nav-link:hover,
.app-header-nav-link:focus {
    color: #ffffff;
}

.app-header .light-dark .material-symbols-outlined {
    color: #ffffff !important;
}

.app-header .notifications.dropdown .btn-secondary .material-symbols-outlined,
.app-header .notifications.dropdown .btn-secondary.dropdown-toggle::after {
    color: #ffffff !important;
}

.app-header .admin-profile .dropdown-toggle::after {
    color: #ffffff !important;
}

.app-header-search-icon {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
}

.app-header-search-input,
.app-header-mobile-search-input {
    height: 40px;
    border-radius: 6px;
    padding-left: 38px;
    font-size: 14px;
}

.app-header-search-input {
    width: 440px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1 !important;
}

@media (min-width: 1200px) and (max-width: 1290px) {
    .app-header-search-input {
        width: 400px;
    }
}

.app-header-search-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.app-header-search-input:focus {
    background-color: rgba(255, 255, 255, 0.12);
    color: #cbd5e1 !important;
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: none;
}

.app-header .app-header-search-icon {
    color: rgba(255, 255, 255, 0.6);
}

.app-header-mobile-search {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 12px 16px;
}

[data-theme="dark"] .app-header-mobile-search {
    background-color: #1b232d;
}

.app-header-mobile-search-input {
    width: 100%;
    background-color: #f4f6fc;
    border: 1px solid #f4f6fc;
    color: #1e293b;
}

.app-header-mobile-search .app-header-search-icon {
    color: #64748b;
}

.app-header-mobile-search .app-header-burger-bar {
    border-bottom-color: rgba(30, 41, 59, 0.6);
}

[data-theme="dark"] .app-header-mobile-search .app-header-burger-bar {
    border-bottom-color: rgba(255, 255, 255, 0.6);
}

.app-header-avatar {
    width: 40px;
    height: 40px;
    background-color: #0f79f3;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.app-header-login-btn {
    text-decoration: none;
}

.app-header-dropdown-menu {
    min-width: 200px;
    border-radius: 10px;
    border: 0;
    box-shadow: 0px 4px 45px 0px rgba(0, 0, 0, 0.10);
}

.app-header-watchlist-menu {
    max-height: 320px;
    overflow-y: auto;
}

.app-header-offcanvas-mypharmacy {
    padding: 16px 20px;
    border-bottom: 1px solid #eeeeee;
    font-size: 15px;
}

.app-header-offcanvas-link {
    padding: 12px 20px;
    font-size: 15px;
}

.app-header-offcanvas-admin-info {
    padding: 16px 20px;
}

.app-header-offcanvas-link:hover {
    background-color: #f2f1f9;
    color: #0f79f3 !important;
}

[data-theme="dark"] .app-header-offcanvas-mypharmacy {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.pharmacy-search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1050;
    max-height: 320px;
    overflow-y: auto;
    display: none;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
}

.pharmacy-search-results.show {
    display: block;
}

.pharmacy-search-results .pharmacy-search-result {
    cursor: pointer;
}

/* .active (JS-driven arrow-key selection) and :active (a press literally in
   progress) apply on every device. :active clears the instant the press
   ends, so — unlike :hover on touch — it's never at risk of getting stuck. */
.pharmacy-search-results .pharmacy-search-result.active,
.pharmacy-search-results .pharmacy-search-result:active {
    background-color: #f8fbff;
    color: #1e293b;
}

[data-theme="dark"] .pharmacy-search-results {
    background-color: #1e293b;
}

[data-theme="dark"] .pharmacy-search-results .list-group-item {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #2b3648;
}

[data-theme="dark"] .pharmacy-search-results .pharmacy-search-result.active,
[data-theme="dark"] .pharmacy-search-results .pharmacy-search-result:active {
    background-color: #263449;
    color: #e2e8f0;
}

/* :hover is only reliable on devices with a real pointer. Touch browsers
   apply it inconsistently — sometimes on touchstart, sometimes only after
   release — and can leave it "stuck" until the user taps elsewhere, so it's
   scoped out of touch devices entirely rather than patched after the fact. */
@media (hover: hover) {
    .pharmacy-search-results .pharmacy-search-result:hover {
        background-color: #f8fbff;
        color: #1e293b;
    }

    [data-theme="dark"] .pharmacy-search-results .pharmacy-search-result:hover {
        background-color: #263449;
        color: #e2e8f0;
    }
}

.pharmacy-search-result-row {
    cursor: pointer;
}

.pharmacy-search-group-label {
    cursor: default;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 8px;
    padding-bottom: 4px;
}

[data-theme="dark"] .pharmacy-search-group-label {
    background-color: #1e293b;
}

/* Below md, the pharmacy results tables (pharmacy-search-results.php and
   pharmacy-search-area.php) collapse from a wide multi-column table into a
   single-column stack of cards, so mobile users don't have to scroll
   sideways to see the rest of a row's info. */
@media (max-width: 767.98px) {
    .pharmacy-results-table thead {
        display: none;
    }

    .pharmacy-results-table,
    .pharmacy-results-table tbody,
    .pharmacy-results-table tr,
    .pharmacy-results-table td {
        display: block;
        width: 100%;
    }

    .pharmacy-results-table tr {
        margin-bottom: 12px;
        padding: 14px;
        border: 1px solid #e5e9f2;
        border-radius: 10px;
    }

    .pharmacy-results-table tr:last-child {
        margin-bottom: 0;
    }

    .pharmacy-results-table td {
        border: none !important;
        padding: 3px 0 !important;
    }

    .pharmacy-results-table .pharmacy-cell-name {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .pharmacy-results-table .pharmacy-cell-address,
    .pharmacy-results-table .pharmacy-cell-postcode {
        display: inline;
        color: #64748b;
        font-size: 14px;
    }

    .pharmacy-results-table .pharmacy-cell-postcode::before {
        content: ' ';
    }

    .pharmacy-results-table td[data-label]::before {
        content: attr(data-label) ': ';
        font-weight: 500;
        color: #64748b;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .pharmacy-results-table .pharmacy-cell-nacs,
    .pharmacy-results-table .pharmacy-cell-distance {
        margin-top: 6px;
    }

    .pharmacy-results-table .pharmacy-cell-status {
        margin-top: 8px;
    }
}

/* Bootstrap's table-hover only ever expresses itself through :hover, so on
   touch devices (unreliable, can stick after a tap) it's turned off the same
   way as the dropdown above — real hover-capable devices keep it. */
@media (hover: none) {
    .pharmacy-results-table {
        --bs-table-hover-bg: transparent;
        --bs-table-hover-color: inherit;
    }
}

/* :active gives every device correct, non-sticky press feedback for a row,
   reusing table-hover's own bg/color variables so it looks identical to the
   pointer-hover state above. */
.pharmacy-results-table > tbody > tr:active > * {
    --bs-table-bg-state: #f8fbff;
}

[data-theme="dark"] .pharmacy-results-table > tbody > tr:active > * {
    --bs-table-bg-state: #263449;
}

[data-theme="dark"] .pharmacy-results-table tr {
    border-color: #2b3648;
}
