/*
 * CSS Variables mặc định (fallback).
 * --rv-primary, --rv-secondary, --rv-bg-vip, --rv-border-vip
 * sẽ được ghi đè bởi Admin Settings qua functions.php (wp_add_inline_style).
 */
:root {
    --rv-primary: #198754;
    --rv-primary-hover: #0d6832;
    --rv-primary-light: #3eaf76;
    --rv-primary-rgb: 25, 135, 84;
    --rv-secondary: #ffc107;
    --rv-secondary-hover: #e8ac00;
    --rv-bg-vip: rgba(var(--rv-primary-rgb), 0.08);
    --rv-border-vip: rgba(var(--rv-primary-rgb), 0.25);
    
    /* Light Mode Variables */
    --rv-bg-body: #f8f9fa;
    --rv-bg-card: #ffffff;
    --rv-border-card: #e0e0e0;
    --rv-bg-header: #ffffff;
    --rv-border-header: #e8f5e9;
    --rv-bg-search: #f1f3f4;
    --rv-text-dark: #212529;
    --rv-text-muted: #6c757d;
    --rv-bg-dropdown: #ffffff;
    --rv-border-dropdown: #f1f5f9;
    --rv-text-dropdown: #212529;
    
    --rv-transition-theme: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] {
    /* Dark Mode Variables */
    --rv-bg-body: #0f172a; /* Slate 900 */
    --rv-bg-card: #1e293b; /* Slate 800 */
    --rv-border-card: #334155; /* Slate 700 */
    --rv-bg-header: #1e293b; /* Slate 800 */
    --rv-border-header: #334155; /* Slate 700 */
    --rv-bg-search: #334155; /* Slate 700 */
    --rv-text-dark: #f8fafc; /* Slate 50 */
    --rv-text-muted: #94a3b8; /* Slate 400 */
    --rv-bg-dropdown: #1e293b; /* Slate 800 */
    --rv-border-dropdown: #334155; /* Slate 700 */
    --rv-text-dropdown: #f8fafc; /* Slate 50 */
    
    --rv-bg-vip: rgba(var(--rv-primary-rgb), 0.15);
    --rv-border-vip: rgba(var(--rv-primary-rgb), 0.4);
}

body {
    background-color: var(--rv-bg-body);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--rv-text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: var(--rv-transition-theme);
}

footer {
    margin-top: auto !important;
}

/* Rounded and smooth styles */
.btn-primary-green {
    background-color: var(--rv-primary);
    color: #fff;
    border: none;
    transition: all 0.3s ease;
}
.btn-primary-green:hover {
    background-color: var(--rv-primary-hover);
    color: #fff;
    transform: translateY(-1px);
}

.card-listing {
    border: 1px solid var(--rv-border-card);
    background-color: var(--rv-bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--rv-transition-theme), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.card-listing:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: var(--rv-text-muted);
}

/* VIP Highlight */
.card-listing-vip {
    background-color: var(--rv-bg-vip);
    border: 1px solid var(--rv-border-vip);
}
.card-listing-vip:hover {
    border-color: var(--rv-primary);
}

/* Circle category items */
.cat-circle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--rv-text-dark);
    transition: transform 0.2s ease;
}
.cat-circle-item:hover {
    transform: scale(1.05);
    color: var(--rv-primary);
}
.cat-circle-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #e8f5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rv-primary);
    font-size: 28px;
    margin-bottom: 8px;
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.1);
    transition: all 0.2s ease;
}
.cat-circle-item:hover .cat-circle-icon {
    background: var(--rv-primary);
    color: #fff;
}
.cat-circle-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Micro animations */
.cursor-pointer {
    cursor: pointer;
}
.transition-3 {
    transition: all 0.3s ease;
}

/* ==========================================================================
   DYNAMIC STYLE OVERRIDES (Using CSS variables injected via functions.php)
   ========================================================================== */
.text-success {
    color: var(--rv-primary) !important;
}
.btn-success {
    background-color: var(--rv-primary) !important;
    border-color: var(--rv-primary) !important;
}
.btn-success:hover, .btn-success:focus, .btn-success:active {
    background-color: var(--rv-primary-hover) !important;
    border-color: var(--rv-primary-hover) !important;
}
.btn-outline-success {
    color: var(--rv-primary) !important;
    border-color: var(--rv-primary) !important;
}
.btn-outline-success:hover, .btn-outline-success:focus, .btn-outline-success:active,
.btn-check:checked + .btn-outline-success,
.btn-check:active + .btn-outline-success {
    background-color: var(--rv-primary) !important;
    border-color: var(--rv-primary) !important;
    color: #fff !important;
}

/* Listings AJAX loading overlay */
.rv-listings-loading {
    position: relative;
    pointer-events: none;
}
.rv-listings-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 50;
    transition: all 0.3s ease;
    border-radius: 12px;
}
.rv-listings-loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    margin-left: -20px;
    border: 3px solid rgba(var(--rv-primary-rgb), 0.2);
    border-top-color: var(--rv-primary);
    border-radius: 50%;
    animation: rv-spin 0.8s linear infinite;
    z-index: 51;
}

@keyframes rv-spin {
    to {
        transform: rotate(360deg);
    }
}
.border-success {
    border-color: var(--rv-primary) !important;
}
.bg-success {
    background-color: var(--rv-primary) !important;
}
.link-success {
    color: var(--rv-primary) !important;
}
.link-success:hover {
    color: var(--rv-primary-hover) !important;
}

.btn-warning {
    background-color: var(--rv-secondary) !important;
    border-color: var(--rv-secondary) !important;
    color: #ffffff !important;
}
.btn-warning:hover, .btn-warning:focus, .btn-warning:active {
    background-color: var(--rv-secondary-hover) !important;
    border-color: var(--rv-secondary-hover) !important;
    color: #ffffff !important;
}

.rv-auth-page-container .form-control:focus {
    border-color: var(--rv-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--rv-primary-rgb), 0.12) !important;
}
.rv-wallet-pkg:hover {
    border-color: var(--rv-primary) !important;
}
.rv-wallet-pkg.active {
    border-color: var(--rv-primary) !important;
    background-color: var(--rv-bg-vip) !important;
}
.rv-wallet-pkg .rv-pkg-points {
    color: var(--rv-primary) !important;
}
.rv-wallet-pkg .check-icon {
    color: var(--rv-primary) !important;
}
.rv-pagination a, .rv-pagination span {
    color: var(--rv-primary) !important;
}
.rv-pagination a:hover {
    background-color: var(--rv-bg-vip) !important;
    border-color: var(--rv-primary) !important;
    color: var(--rv-primary) !important;
}
.rv-pagination span.current {
    background-color: var(--rv-primary) !important;
    border-color: var(--rv-primary) !important;
    color: #fff !important;
}
.rv-avatar.bg-success {
    background-color: var(--rv-primary) !important;
}

/* ===== Bootstrap Pagination Override (Category page) ===== */
.pagination .page-item.active .page-link {
    background-color: var(--rv-primary) !important;
    border-color: var(--rv-primary) !important;
    color: #fff !important;
}
.pagination .page-link {
    color: var(--rv-primary);
}
.pagination .page-link:hover {
    color: var(--rv-primary-hover);
    background-color: var(--rv-bg-vip);
    border-color: var(--rv-primary);
}

/* ===== Dashicon Alignment Fix ===== */
.rv-dashboard-wrapper .dashicons,
.table .dashicons,
.small-icon {
    vertical-align: middle !important;
    line-height: 1;
}

/* ===== LIGHTBOX FOR SLIDESHOW ===== */
.rv-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s linear 0.3s, opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Show Lightbox state */
.rv-lightbox.active {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.rv-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.rv-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 44px;
    line-height: 1;
    cursor: pointer;
    z-index: 1052;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 10px;
}
.rv-lightbox-close:hover {
    color: #ffffff;
    transform: scale(1.1);
}
.rv-lightbox-close:focus {
    outline: none;
}

.rv-lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1100px;
    height: 80%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1051;
}

.rv-lightbox-image-container {
    position: relative;
    flex: 1;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 20px;
}

.rv-lightbox-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Zoom/Fade-in image animation when loaded and active */
.rv-lightbox-image-container img.loaded {
    opacity: 1;
    transform: scale(1);
}

.rv-lightbox-nav {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
}
.rv-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}
.rv-lightbox-nav:active {
    transform: scale(0.95);
}
.rv-lightbox-nav .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rv-lightbox-counter {
    position: absolute;
    bottom: 30px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
    z-index: 1051;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 16px;
    border-radius: 20px;
    letter-spacing: 1px;
}

/* Spinner Loading */
.rv-lightbox-spinner {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--rv-primary);
    border-radius: 50%;
    animation: rv-spin 0.8s linear infinite;
    display: none;
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .rv-lightbox-content {
        height: 70%;
        width: 95%;
    }
    .rv-lightbox-image-container {
        margin: 0;
    }
    .rv-lightbox-nav {
        width: 46px;
        height: 46px;
        position: absolute;
        bottom: -70px;
    }
    .rv-lightbox-prev {
        left: calc(50% - 60px);
    }
    .rv-lightbox-next {
        right: calc(50% - 60px);
    }
    .rv-lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 36px;
    }
}

/* Custom Carousel Controls for Single Listing Details Slider */
#listingImagesCarousel .carousel-control-prev,
#listingImagesCarousel .carousel-control-next {
    width: 44px;
    height: 44px;
    top: calc(50% - 22px);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.5); /* Slate 900 semi-transparent */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    opacity: 0.85;
    transition: background 0.25s ease, transform 0.25s ease, opacity 0.25s ease, border-color 0.25s ease;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#listingImagesCarousel .carousel-control-prev {
    left: 20px;
}

#listingImagesCarousel .carousel-control-next {
    right: 20px;
}

#listingImagesCarousel .carousel-control-prev:hover,
#listingImagesCarousel .carousel-control-next:hover {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(255, 255, 255, 0.4);
    opacity: 1;
    color: #ffffff;
    transform: scale(1.08);
}

#listingImagesCarousel .carousel-control-prev:active,
#listingImagesCarousel .carousel-control-next:active {
    transform: scale(0.95);
}

#listingImagesCarousel .carousel-control-prev .dashicons,
#listingImagesCarousel .carousel-control-next .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   SUPPORT TICKET SYSTEM & CHAT BUBBLES
   ========================================================================== */
.rv-support-wrapper .nav-pills .nav-link {
    background-color: #f1f5f9;
    color: #475569;
    transition: all 0.3s ease;
}
.rv-support-wrapper .nav-pills .nav-link.active {
    background-color: var(--rv-primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(var(--rv-primary-rgb), 0.2);
}
.rv-support-wrapper .table th {
    font-weight: 600;
    font-size: 14px;
    color: #475569;
}
.rv-support-wrapper .table td {
    padding: 1rem 0.75rem;
    font-size: 14.5px;
}
.hover-text-success:hover {
    color: var(--rv-primary) !important;
}

/* Chat bubble styling */
.rv-ticket-chat-thread {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background-color: #f8fafc;
    border-radius: 1rem;
    border: 1px dashed #cbd5e1;
    max-height: 600px;
    overflow-y: auto;
}
.rv-chat-bubble-container {
    display: flex;
    flex-direction: column;
}
.shadow-sm-hover {
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.shadow-sm-hover:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    transform: translateY(-1px);
}
.rounded-start-4 {
    border-top-left-radius: 1rem !important;
    border-bottom-left-radius: 1rem !important;
}
.rounded-end-4 {
    border-top-right-radius: 1rem !important;
    border-bottom-right-radius: 1rem !important;
}
.rounded-bottom-4 {
    border-bottom-left-radius: 1rem !important;
    border-bottom-right-radius: 1rem !important;
}

/* Scrollbar styling for chat container */
.rv-ticket-chat-thread::-webkit-scrollbar {
    width: 6px;
}
.rv-ticket-chat-thread::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.rv-ticket-chat-thread::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.rv-ticket-chat-thread::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Style for wp_editor on frontend */
.rv-wp-editor-wrapper .wp-editor-container {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
}
.rv-wp-editor-wrapper .wp-editor-tools {
    border-bottom: 1px solid #cbd5e1;
    background-color: #f8fafc;
}
.rv-wp-editor-wrapper .quicktags-toolbar {
    border-bottom: 1px solid #cbd5e1;
    background: #f1f5f9;
}
.rv-wp-editor-wrapper .wp-textarea-wrap textarea {
    border: none !important;
    padding: 10px !important;
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.navbar-custom {
    background-color: var(--rv-bg-header);
    border-bottom: 2px solid var(--rv-border-header);
    transition: var(--rv-transition-theme);
}
.search-container {
    background-color: var(--rv-bg-search);
    border-radius: 30px;
    padding: 2px 10px;
    display: flex;
    align-items: center;
    transition: var(--rv-transition-theme);
}
.search-container input {
    background: transparent;
    border: none;
    box-shadow: none !important;
    font-size: 14px;
    color: var(--rv-text-dark);
}
.search-container button {
    background: transparent;
    border: none;
    color: var(--rv-primary);
}
.header-btn-post {
    border-radius: 20px;
    font-weight: 600;
    padding: 8px 20px;
    font-size: 14px;
    background-color: var(--rv-secondary);
    border: 1px solid var(--rv-secondary);
    color: #ffffff !important;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.header-btn-post span {
    white-space: nowrap;
}
.header-btn-post:hover {
    background-color: var(--rv-secondary-hover);
    transform: translateY(-1px);
}
.wallet-badge {
    background-color: var(--rv-bg-search);
    color: var(--rv-primary);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--rv-transition-theme);
    white-space: nowrap;
    flex-shrink: 0;
}
.wallet-badge span {
    white-space: nowrap;
}
.wallet-badge:hover {
    background-color: var(--rv-primary);
    color: #fff;
}

/* ===== Search Autocomplete Suggestions ===== */
.search-wrapper {
    position: relative;
}
.rv-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--rv-bg-dropdown);
    border: 1px solid var(--rv-border-dropdown);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
    padding: 8px 0;
    z-index: 1050;
    display: none;
    max-height: 400px;
    overflow-y: auto;
    transition: var(--rv-transition-theme);
}
.rv-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--rv-text-dark) !important;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--rv-border-dropdown);
}
.rv-suggestion-item:last-child {
    border-bottom: none;
}
.rv-suggestion-item:hover {
    background-color: rgba(16, 185, 129, 0.05);
}
.rv-suggestion-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}
.rv-suggestion-no-image {
    width: 48px;
    height: 48px;
    background-color: #f1f5f9;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}
.rv-suggestion-info {
    flex-grow: 1;
    min-width: 0;
}
.rv-suggestion-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--rv-text-dark);
}
.rv-suggestion-price {
    font-size: 13px;
    font-weight: 700;
    color: #dc3545;
    margin: 0;
}
.rv-suggestion-empty {
    padding: 16px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

/* ===== Notifications Dropdown ===== */
.rv-notifications-dropdown .dropdown-menu {
    width: 340px;
    max-height: 450px;
    overflow: hidden;
    border: 1px solid var(--rv-border-dropdown);
    background-color: var(--rv-bg-dropdown);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    border-radius: 12px;
}
.rv-notification-list {
    max-height: 320px;
    overflow-y: auto;
}
.rv-notification-item {
    border-bottom: 1px solid var(--rv-border-dropdown);
    padding: 12px 16px;
    display: block;
    text-decoration: none;
    color: var(--rv-text-muted);
    transition: all 0.2s ease;
}
.rv-notification-item:last-child {
    border-bottom: none;
}
.rv-notification-item:hover {
    background-color: var(--rv-bg-search);
    color: var(--rv-text-dark);
}
.rv-notification-item-unread {
    background-color: rgba(25, 135, 84, 0.04);
    font-weight: 600;
}
.rv-notification-item-unread:hover {
    background-color: rgba(25, 135, 84, 0.08) !important;
}
.rv-notification-bell {
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--rv-bg-search);
    color: var(--rv-text-muted);
    transition: var(--rv-transition-theme);
    position: relative;
    flex-shrink: 0;
}
.rv-notification-bell:hover {
    background-color: var(--rv-border-card);
    color: var(--rv-primary);
}

/* ==========================================================================
   DARK MODE OVERRIDES & PREMIUM DESIGN SCHEME
   ========================================================================== */
[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="dark"] .bg-white {
    background-color: var(--rv-bg-card) !important;
}

[data-theme="dark"] .bg-light {
    background-color: var(--rv-bg-search) !important;
}

[data-theme="dark"] .text-dark {
    color: var(--rv-text-dark) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--rv-text-muted) !important;
}

/* Bootstrap Card styling */
[data-theme="dark"] .card {
    background-color: var(--rv-bg-card) !important;
    border-color: var(--rv-border-card) !important;
    color: var(--rv-text-dark);
}

/* Form Controls styling */
[data-theme="dark"] .form-control,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background-color: var(--rv-bg-search) !important;
    border-color: var(--rv-border-card) !important;
    color: var(--rv-text-dark) !important;
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
    background-color: var(--rv-bg-search) !important;
    border-color: var(--rv-primary) !important;
    color: var(--rv-text-dark) !important;
}
[data-theme="dark"] .form-control::placeholder {
    color: var(--rv-text-muted) !important;
    opacity: 0.65;
}

/* Modals */
[data-theme="dark"] .modal-content {
    background-color: var(--rv-bg-card) !important;
    border-color: var(--rv-border-card) !important;
    color: var(--rv-text-dark);
}
[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: var(--rv-border-card) !important;
}
[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(1) brightness(2);
}

/* Dropdown Menu overrides */
[data-theme="dark"] .dropdown-menu {
    background-color: var(--rv-bg-dropdown) !important;
    border-color: var(--rv-border-dropdown) !important;
    color: var(--rv-text-dropdown) !important;
}
[data-theme="dark"] .dropdown-item {
    color: var(--rv-text-dropdown) !important;
}
[data-theme="dark"] .dropdown-item:hover {
    background-color: var(--rv-border-card) !important;
    color: var(--rv-text-dark) !important;
}
[data-theme="dark"] .dropdown-divider {
    border-color: var(--rv-border-card) !important;
}

/* Tables */
[data-theme="dark"] .table {
    color: var(--rv-text-dark) !important;
}
[data-theme="dark"] .table th,
[data-theme="dark"] .table td {
    border-color: var(--rv-border-card) !important;
    color: var(--rv-text-dark) !important;
}
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.02) !important;
    color: var(--rv-text-dark) !important;
}

/* List Groups */
[data-theme="dark"] .list-group-item {
    background-color: var(--rv-bg-card) !important;
    border-color: var(--rv-border-card) !important;
    color: var(--rv-text-dark) !important;
}
[data-theme="dark"] .list-group-item-action:hover {
    background-color: var(--rv-border-card) !important;
    color: var(--rv-text-dark) !important;
}

/* Category Icons */
[data-theme="dark"] .cat-circle-icon {
    background: rgba(25, 135, 84, 0.2);
}

/* Custom alerts */
[data-theme="dark"] .alert-warning {
    background-color: #2c1e05 !important;
    border-color: #ffc107 !important;
    color: #ffe082 !important;
}
[data-theme="dark"] .alert-success {
    background-color: #0b2d18 !important;
    border-color: var(--rv-primary) !important;
    color: #a3cfbb !important;
}

/* Support system chat */
[data-theme="dark"] .rv-ticket-chat-thread {
    background-color: #1e293b !important;
    border-color: var(--rv-border-card) !important;
}
[data-theme="dark"] .rv-wp-editor-wrapper .wp-editor-container {
    border-color: var(--rv-border-card) !important;
}
[data-theme="dark"] .rv-wp-editor-wrapper .wp-editor-tools,
[data-theme="dark"] .rv-wp-editor-wrapper .quicktags-toolbar {
    background-color: #334155 !important;
    border-color: var(--rv-border-card) !important;
}

/* Spinners */
[data-theme="dark"] .rv-listings-loading::after {
    background: rgba(15, 23, 42, 0.7) !important;
}

/* SVG Theme Toggle hover transitions */
.theme-toggle-btn:hover {
    background-color: var(--rv-border-card) !important;
    color: var(--rv-primary) !important;
    transform: scale(1.05);
}
.theme-toggle-btn svg {
    transition: transform 0.3s ease;
}
.theme-toggle-btn:active svg {
    transform: rotate(45deg) scale(0.95);
}

/* Dark Mode Hero & VIP Card overrides */
[data-theme="dark"] #homeBannerCarousel .carousel-item.hero-default-bg {
    background: linear-gradient(135deg, #1e293b, #0f172a) !important;
}

[data-theme="dark"] .card-listing-vip {
    background-color: rgba(239, 68, 68, 0.12) !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
}

/* ==========================================================================
   MOBILE MENU PANEL
   ========================================================================== */
.mobile-menu-panel {
    background-color: var(--rv-bg-card);
    border: 1px solid var(--rv-border-card);
    color: var(--rv-text-dark);
    transition: var(--rv-transition-theme);
}

.mobile-menu-panel .list-group-item {
    background-color: transparent !important;
    border-color: var(--rv-border-card) !important;
    color: var(--rv-text-dark) !important;
}

.mobile-menu-panel .list-group-item-action:hover,
.mobile-menu-panel .list-group-item-action:focus {
    background-color: var(--rv-bg-search) !important;
    color: var(--rv-text-dark) !important;
}

.mobile-menu-panel .border-bottom {
    border-color: var(--rv-border-card) !important;
}

/* Mobile notification panel inside menu */
.mobile-menu-panel .rv-notification-list-mobile {
    background-color: var(--rv-bg-card) !important;
    border-color: var(--rv-border-card) !important;
}

/* ===== Global border override for dark mode ===== */
[data-theme="dark"] .border {
    border-color: var(--rv-border-card) !important;
}
[data-theme="dark"] .border-bottom {
    border-bottom-color: var(--rv-border-card) !important;
}
[data-theme="dark"] .border-top {
    border-top-color: var(--rv-border-card) !important;
}

/* Badge inside listing cards */
[data-theme="dark"] .badge.bg-light {
    background-color: var(--rv-bg-search) !important;
    color: var(--rv-text-muted) !important;
}

/* Dashboard listing item hover */
[data-theme="dark"] .rv-listing-item:hover {
    background-color: var(--rv-bg-search) !important;
}

/* Wallet package hover */
[data-theme="dark"] .rv-wallet-pkg:hover {
    background-color: var(--rv-bg-search) !important;
}

