/* ==========================================================================
   Dark Theme Overrides
   All rules scoped under [data-bs-theme="dark"].
   Light mode is completely unaffected.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Section 1 — CSS Variable Overrides (Primary Color Family)
   Replace Metronic green (#00A261) with coral (#fe5f60).
   -------------------------------------------------------------------------- */
[data-bs-theme="dark"] {
    --bs-primary:              #fe5f60;
    --bs-primary-active:       #e5484d;
    --bs-primary-light:        #2d1f20;
    --bs-primary-rgb:          254, 95, 96;
    --bs-primary-clarity:      rgba(254, 95, 96, 0.2);
    --bs-text-primary:         #fe5f60;
    --bs-component-active-bg:  #fe5f60;
    --bs-component-hover-color:#fe5f60;
    --bs-component-checked-bg: #fe5f60;
    --bs-link-color:           #fe5f60;
    --bs-link-hover-color:     #ff8a8b;

    /* Menu link state colors */
    --bs-menu-link-color-hover:  #fe5f60;
    --bs-menu-link-color-show:   #fe5f60;
    --bs-menu-link-color-here:   #fe5f60;
    --bs-menu-link-color-active: #fe5f60;

    /* Brighten success for dark surfaces (bundle darkens #1B84FF → #006AE6) */
    --bs-success: #1B84FF;
}

/* Menu link hover / active / show / here states */
[data-bs-theme="dark"] .menu-state-primary .menu-item .menu-link.active,
[data-bs-theme="dark"] .menu-state-primary .menu-item.show > .menu-link,
[data-bs-theme="dark"] .menu-state-primary .menu-item.here > .menu-link,
[data-bs-theme="dark"] .menu-state-primary .menu-item .menu-link:hover {
    color: #fe5f60;
}

[data-bs-theme="dark"] .menu-state-primary .menu-item .menu-link.active .menu-icon,
[data-bs-theme="dark"] .menu-state-primary .menu-item .menu-link.active .menu-icon i,
[data-bs-theme="dark"] .menu-state-primary .menu-item.show > .menu-link .menu-icon,
[data-bs-theme="dark"] .menu-state-primary .menu-item.show > .menu-link .menu-icon i,
[data-bs-theme="dark"] .menu-state-primary .menu-item.here > .menu-link .menu-icon,
[data-bs-theme="dark"] .menu-state-primary .menu-item.here > .menu-link .menu-icon i,
[data-bs-theme="dark"] .menu-state-primary .menu-item .menu-link:hover .menu-icon,
[data-bs-theme="dark"] .menu-state-primary .menu-item .menu-link:hover .menu-icon i {
    color: #fe5f60;
}

[data-bs-theme="dark"] .menu-state-primary .menu-item .menu-link.active .menu-bullet .bullet,
[data-bs-theme="dark"] .menu-state-primary .menu-item.show > .menu-link .menu-bullet .bullet,
[data-bs-theme="dark"] .menu-state-primary .menu-item.here > .menu-link .menu-bullet .bullet,
[data-bs-theme="dark"] .menu-state-primary .menu-item .menu-link:hover .menu-bullet .bullet {
    background-color: #fe5f60;
}

/* --------------------------------------------------------------------------
   Section 2 — Table / DataTable Dark Borders
   Replace hardcoded light-gray (#dee2e6) borders with dark-visible tones.
   -------------------------------------------------------------------------- */
[data-bs-theme="dark"] table.dataTable tbody td {
    border-top: 1px solid #2E303A !important;
    border-bottom: 1px solid #2E303A !important;
}

[data-bs-theme="dark"] table.dataTable tbody tr {
    border-bottom: 1px solid #26272F !important;
}

[data-bs-theme="dark"] table.dataTable tbody tr:first-child td {
    border-top: 1px solid #2E303A !important;
}

[data-bs-theme="dark"] table.dataTable tbody tr:last-child td {
    border-bottom: 1px solid #2E303A !important;
}

[data-bs-theme="dark"] table.dataTable {
    border-bottom: 1px solid #2E303A !important;
}

/* --------------------------------------------------------------------------
   Section 3 — Status Badge Dark Mode Variants
   Deep muted backgrounds; text/border colors unchanged.
   -------------------------------------------------------------------------- */
[data-bs-theme="dark"] .status-initiated {
    background-color: #162230 !important;
}

[data-bs-theme="dark"] .status-pending-payment {
    background-color: #2d2416 !important;
}

[data-bs-theme="dark"] .status-pending-confirmation {
    background-color: #2d2a16 !important;
}

[data-bs-theme="dark"] .status-succeeded {
    background-color: #162d1e !important;
}

[data-bs-theme="dark"] .status-failed {
    background-color: #2d1619 !important;
}

[data-bs-theme="dark"] .status-canceled {
    background-color: #2d1a1c !important;
}

[data-bs-theme="dark"] .status-refunded {
    background-color: #231a30 !important;
}

[data-bs-theme="dark"] .status-prebooked {
    background-color: #152430 !important;
}

[data-bs-theme="dark"] .status-prebooking-expired {
    background-color: #2d2416 !important;
}

[data-bs-theme="dark"] .status-default {
    background-color: #26272F !important;
}

/* --------------------------------------------------------------------------
   Section 4 — Tour Type Badge Dark Mode
   -------------------------------------------------------------------------- */
[data-bs-theme="dark"] .tour-type-outgoing {
    background-color: #162230 !important;
}

[data-bs-theme="dark"] .tour-type-incoming {
    background-color: #162d1e !important;
}

[data-bs-theme="dark"] .tour-type-domestic {
    background-color: #2d2416 !important;
}

/* --------------------------------------------------------------------------
   Section 5 — Manual Badge Dark Mode
   -------------------------------------------------------------------------- */
[data-bs-theme="dark"] .badge-manual {
    background-color: #231a30 !important;
}

/* --------------------------------------------------------------------------
   Section 6 — Card Header Gradient
   Reduce white overlay opacity for better dark contrast.
   -------------------------------------------------------------------------- */
[data-bs-theme="dark"] .bg-gradient {
    background-image: linear-gradient(270deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)) !important;
}

/* --------------------------------------------------------------------------
   Section 7 — Location Text Visibility
   -------------------------------------------------------------------------- */
[data-bs-theme="dark"] .location-path {
    color: #9A9CAE;
}

[data-bs-theme="dark"] .location-arrow {
    color: #636674;
}

/* --------------------------------------------------------------------------
   Section 8 — Miscellaneous
   -------------------------------------------------------------------------- */

/* Brighter green text readable on dark surfaces */
[data-bs-theme="dark"] .text-green {
    color: #2dd67e !important;
}

/* Stronger badge hover shadow for dark surfaces */
[data-bs-theme="dark"] .badge:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Notification item border — dark gray instead of light #f0f0f5 */
[data-bs-theme="dark"] .notification-item {
    border-color: #2E303A !important;
}
