/* *****************************************************

    ** Custom Stylesheet **

    Any custom styling you want to apply should be
    defined here.

***************************************************** */

/* Custom CSS for Nexus Cart
 *
 * This block allows you to customize theme colors and styles for the entire Nexus Cart template.
 *
 * To customize colors:
 * - Replace the var() references with your own hex colors or other CSS values.
 * - For example, instead of --primary: #4b5563; use --primary: #your-color;
 * - You can also override any CSS properties here.
 */

html {
    font-size: 14px;
}

:root {
    --white: #fff;

    /* Neutral shades */
    --neutral-50: #fbf9fa;
    --neutral-100: #f4f5f7;
    --neutral-200: #e4e4e7;
    --neutral-300: #d0d5dd;
    --neutral-400: #9ca3af;
    --neutral-500: #6b7280;
    --neutral-600: #4b5563;
    --neutral-700: #374151;
    --neutral-800: #1f2937;
    --neutral-900: #111827;
    --neutral-950: #030712;

    /* Neutral shades */
    /* define own pallet with brand colors */
    --primary-50: var(--neutral-50);
    --primary-100: var(--neutral-100);
    --primary-200: var(--neutral-200);
    --primary-300: var(--neutral-300);
    --primary-400: var(--neutral-400);
    --primary-500: var(--neutral-500);
    --primary-600: var(--neutral-600);
    --primary-700: var(--neutral-700);
    --primary-800: var(--neutral-800);
    --primary-900: var(--neutral-900);
    --primary-950: var(--neutral-900);

    /* Primary colors */
    /* Use shades from comments if `primary` colors use other colors, then neutral */
    --primary: var(--neutral-900);          /* var(--primary-600) */
    --primary-lifted: var(--neutral-800);   /* var(--primary-700) */
    --primary-accented: var(--neutral-700); /* var(--primary-800) */

    /* Secondary colors */
    --secondary: var(--neutral-500);
    --secondary-lifted: var(--neutral-600);
    --secondary-accented: var(--neutral-700);

    /* Success colors */
    --success: #00a63e;
    --success-lifted: #008236;
    --success-accented: #016630;

    /* Info colors */
    --info: #155dfc;
    --info-lifted: #1447e6;
    --info-accented: #193cb8;

    /* Notice colors */
    --notice: #7f22fe;
    --notice-lifted: #7008e7;
    --notice-accented: #5d0ec0;

    /* Warning colors */
    --warning: #f54a00;
    --warning-lifted: #ca3500;
    --warning-accented: #9f2d00;

    /* Error colors */
    --error: #e7000b;
    --error-lifted: #c10007;
    --error-accented: #9f0712;

    /* Grayscale colors */
    --grayscale: var(--neutral-900);
    --grayscale-lifted: var(--neutral-800);
    --grayscale-accented: var(--neutral-700);

    /* Neutral colors */
    --neutral: var(--neutral-500);
    --neutral-lifted: var(--neutral-600);
    --neutral-accented: var(--neutral-700);

    /* Text neutral colors */
    --text-inverted: var(--white);
    --text-muted: var(--neutral-400);
    --text-lifted: var(--neutral-500);
    --text-accented: var(--neutral-600);
    --text: var(--neutral-900);

    /* Border neutral colors */
    --border-muted: var(--neutral-200);
    --border: var(--neutral-300);
    --border-lifted: var(--neutral-400);
    --border-accented: var(--neutral-600);

    /* Background neutral colors */
    --bg: var(--white);
    --bg-muted: var(--neutral-50);
    --bg-lifted: var(--neutral-100);
    --bg-accented: var(--neutral-200);
    --bg-inverted: var(--neutral-900);

    /* Additional colors */
    --yellow-200: #fff085;
    --yellow-300: #ffdf20;
    --teal-300: #46edd5;
    --teal-400: #00d5be;
    --emerald-300: #5ee9b5;
    --pink-400: #fb64b6;

    /* Additional custom properties */
    /* Font sizes */
    --text-xs: 0.625rem;
    --text-sm: 0.75rem;
    --text-md: 0.875rem;
    --text-lg: 1rem;

    /* Spacing */
    --outline-sm: 1px;
    --outline-md: 2px;
    --outline-lg: 3px;

    /* Rounding */
    --rounding-sm: 0.25rem;
    --rounding-md: 0.5rem;
    --rounding-lg: 0.75rem;

    /* Other */
    --letter-spacing: 0em;
    --disabled-opacity: 25%;
}

/* ================================================
   AFRICLOUD Dark Mode Styles
   ================================================ */

/* Dark mode color variables */
html.dark {
    --bg: #111827;
    --bg-muted: #1f2937;
    --bg-lifted: #374151;
    --bg-accented: #4b5563;
    --bg-inverted: #f9fafb;
    --text: #f9fafb;
    --text-muted: #9ca3af;
    --text-lifted: #d1d5db;
    --text-accented: #e5e7eb;
    --text-inverted: #111827;
    --border: #4b5563;
    --border-muted: #374151;
    --border-lifted: #6b7280;
    --border-accented: #9ca3af;
}

/* Base elements in dark mode */
html.dark body {
    background-color: #111827;
    color: #f9fafb;
}

/* Cards and panels */
html.dark .card,
html.dark .panel,
html.dark .card-sidebar {
    background-color: #1f2937;
    border-color: #374151;
}

html.dark .card-header,
html.dark .panel-heading {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

html.dark .card-body,
html.dark .panel-body {
    color: #d1d5db;
}

html.dark .card-footer,
html.dark .panel-footer {
    background-color: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

/* List groups */
html.dark .list-group-item {
    background-color: #1f2937;
    border-color: #374151;
    color: #d1d5db;
}

html.dark .list-group-item:hover,
html.dark .list-group-item-action:hover {
    background-color: #374151;
    color: #f9fafb;
}

html.dark .list-group-item.active {
    background-color: #1e40af;
    border-color: #1e40af;
    color: #ffffff;
}

/* Tables */
html.dark .table,
html.dark table {
    color: #d1d5db;
}

html.dark .table thead th,
html.dark table thead th {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

html.dark .table tbody td,
html.dark table tbody td {
    border-color: #374151;
}

html.dark .table-striped tbody tr:nth-of-type(odd),
html.dark .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #1f2937;
}

html.dark .table-striped tbody tr:nth-of-type(even),
html.dark .table-striped > tbody > tr:nth-of-type(even) {
    background-color: #111827;
}

html.dark .table-hover tbody tr:hover,
html.dark .table-hover > tbody > tr:hover {
    background-color: #374151;
}

/* DataTables specific */
html.dark .dataTables_wrapper {
    color: #d1d5db;
}

html.dark .dataTables_info,
html.dark .dataTables_length,
html.dark .dataTables_filter {
    color: #9ca3af;
}

html.dark .dataTables_paginate .paginate_button {
    color: #d1d5db !important;
    background-color: #374151;
    border-color: #4b5563;
}

html.dark .dataTables_paginate .paginate_button:hover {
    background-color: #4b5563 !important;
    color: #f9fafb !important;
}

html.dark .dataTables_paginate .paginate_button.current {
    background-color: #1e40af !important;
    color: #ffffff !important;
    border-color: #1e40af;
}

/* Forms */
html.dark .form-control,
html.dark input[type="text"],
html.dark input[type="email"],
html.dark input[type="password"],
html.dark input[type="number"],
html.dark textarea,
html.dark select {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

html.dark .form-control:focus,
html.dark input:focus,
html.dark textarea:focus,
html.dark select:focus {
    background-color: #374151;
    border-color: #1e40af;
    color: #f9fafb;
}

html.dark .form-control::placeholder {
    color: #6b7280;
}

/* Alerts */
html.dark .alert {
    border-color: transparent;
}

html.dark .alert-info {
    background-color: rgba(30, 64, 175, 0.2);
    color: #93c5fd;
}

html.dark .alert-success {
    background-color: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

html.dark .alert-warning {
    background-color: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

html.dark .alert-danger {
    background-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Badges */
html.dark .badge {
    color: #f9fafb;
}

html.dark .badge-secondary,
html.dark .badge.bg-secondary {
    background-color: #4b5563;
}

html.dark .badge-primary,
html.dark .badge.bg-primary {
    background-color: #1e40af;
}

/* Buttons */
html.dark .btn-secondary {
    background-color: #4b5563;
    border-color: #4b5563;
    color: #f9fafb;
}

html.dark .btn-secondary:hover {
    background-color: #6b7280;
    border-color: #6b7280;
}

html.dark .btn-outline-secondary {
    border-color: #4b5563;
    color: #d1d5db;
}

html.dark .btn-outline-secondary:hover {
    background-color: #4b5563;
    color: #f9fafb;
}

html.dark .btn-light {
    background-color: #374151;
    border-color: #374151;
    color: #f9fafb;
}

/* Modals */
html.dark .modal-content {
    background-color: #1f2937;
    border-color: #374151;
}

html.dark .modal-header {
    border-color: #374151;
}

html.dark .modal-footer {
    border-color: #374151;
}

html.dark .modal-title {
    color: #f9fafb;
}

/* Dropdowns */
html.dark .dropdown-menu {
    background-color: #1f2937;
    border-color: #374151;
}

html.dark .dropdown-item {
    color: #d1d5db;
}

html.dark .dropdown-item:hover,
html.dark .dropdown-item:focus {
    background-color: #374151;
    color: #f9fafb;
}

html.dark .dropdown-divider {
    border-color: #374151;
}

/* Breadcrumbs */
html.dark .breadcrumb {
    background-color: #1f2937;
}

html.dark .breadcrumb-item a {
    color: #60a5fa;
}

html.dark .breadcrumb-item.active {
    color: #9ca3af;
}

/* Progress bars */
html.dark .progress {
    background-color: #374151;
}

/* Nav tabs */
html.dark .nav-tabs {
    border-color: #374151;
}

html.dark .nav-tabs .nav-link {
    color: #9ca3af;
}

html.dark .nav-tabs .nav-link:hover {
    border-color: #4b5563;
    color: #f9fafb;
}

html.dark .nav-tabs .nav-link.active {
    background-color: #1f2937;
    border-color: #374151 #374151 #1f2937;
    color: #f9fafb;
}

/* Tab content */
html.dark .tab-content {
    background-color: #1f2937;
    border-color: #374151;
}

/* Help text */
html.dark .help-block,
html.dark .form-text {
    color: #9ca3af;
}

/* Links */
html.dark a {
    color: #60a5fa;
}

html.dark a:hover {
    color: #93c5fd;
}

/* Selection */
html.dark ::selection {
    background-color: #1e40af;
    color: #ffffff;
}

/* Scrollbars (WebKit) */
html.dark ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

html.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

html.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

html.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Status badges - AFRICLOUD specific */
html.dark .status-active,
html.dark .label-success {
    background-color: #059669;
    color: #ffffff;
}

html.dark .status-pending,
html.dark .label-warning {
    background-color: #d97706;
    color: #ffffff;
}

html.dark .status-suspended,
html.dark .status-cancelled,
html.dark .label-danger {
    background-color: #dc2626;
    color: #ffffff;
}

html.dark .status-terminated,
html.dark .label-default {
    background-color: #4b5563;
    color: #ffffff;
}

/* WHMCS specific panel headers */
html.dark .panel-default > .panel-heading {
    background-color: #374151;
    color: #f9fafb;
}

/* Input groups */
html.dark .input-group-text {
    background-color: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

/* Well elements */
html.dark .well {
    background-color: #1f2937;
    border-color: #374151;
}

/* Horizontal rules */
html.dark hr {
    border-color: #374151;
}

/* Code blocks */
html.dark code,
html.dark pre {
    background-color: #1f2937;
    color: #f9fafb;
}

/* Tooltips */
html.dark .tooltip-inner {
    background-color: #374151;
    color: #f9fafb;
}

/* Popovers */
html.dark .popover {
    background-color: #1f2937;
    border-color: #374151;
}

html.dark .popover-header {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

html.dark .popover-body {
    color: #d1d5db;
}

/* ================================================
   AFRICLOUD Knowledgebase Dark Mode Fixes
   ================================================ */

/* KB Hero Search Section */
html.dark .bg-gradient-to-r {
    background: linear-gradient(to right, #1f2937, #111827) !important;
}

/* KB Category Cards */
html.dark .bg-white.rounded-xl,
html.dark a.group.block.bg-white {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
}

html.dark a.group.block.bg-white:hover {
    background-color: #374151 !important;
    border-color: #1e40af !important;
}

/* KB Category Card Icon Backgrounds */
html.dark .bg-blue-100 {
    background-color: rgba(30, 64, 175, 0.3) !important;
}

html.dark .text-blue-600 {
    color: #60a5fa !important;
}

html.dark .text-blue-700 {
    color: #93c5fd !important;
}

/* KB Article Count Badge */
html.dark span.bg-blue-100 {
    background-color: rgba(30, 64, 175, 0.3) !important;
    color: #93c5fd !important;
}

/* KB Category Text */
html.dark .text-gray-900 {
    color: #f9fafb !important;
}

html.dark .text-gray-500 {
    color: #9ca3af !important;
}

html.dark .text-gray-400 {
    color: #9ca3af !important;
}

/* KB Popular Articles Section */
html.dark .bg-gray-50 {
    background-color: #374151 !important;
}

html.dark .bg-gray-100 {
    background-color: #374151 !important;
}

html.dark .divide-gray-100 > * + * {
    border-color: #374151 !important;
}

/* KB Article Icon */
html.dark .text-gray-400.fas,
html.dark i.text-gray-400 {
    color: #6b7280 !important;
}

/* KB Article hover state */
html.dark a.group:hover .text-gray-300,
html.dark .group-hover\:text-africloud-blue {
    color: #60a5fa !important;
}

/* KB Search Input */
html.dark input.bg-white {
    background-color: #374151 !important;
    color: #f9fafb !important;
}

html.dark input.bg-white::placeholder {
    color: #9ca3af !important;
}

/* KB Info/Empty State Box */
html.dark .bg-blue-50 {
    background-color: rgba(30, 64, 175, 0.2) !important;
}

html.dark .border-blue-200 {
    border-color: rgba(30, 64, 175, 0.4) !important;
}

/* KB Sidebar Categories */
html.dark .card-sidebar .list-group-item,
html.dark .sidebar .list-group-item {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
    color: #d1d5db !important;
}

html.dark .card-sidebar .list-group-item:hover,
html.dark .sidebar .list-group-item:hover {
    background-color: #374151 !important;
    color: #f9fafb !important;
}

/* KB Tag Cloud */
html.dark .tag-cloud a,
html.dark a[href*="tag"] {
    color: #60a5fa !important;
}

html.dark .tag-cloud a:hover {
    color: #93c5fd !important;
}

/* General rounded-xl dark fix */
html.dark div.rounded-xl,
html.dark .rounded-xl.shadow-sm {
    background-color: #1f2937;
    border-color: #374151;
}

html.dark .border-gray-200 {
    border-color: #374151 !important;
}

html.dark .border-gray-700 {
    border-color: #374151 !important;
}

/* Fix text in hero section */
html.dark .text-blue-100 {
    color: #d1d5db !important;
}

/* ================================================
   Sidebar Dark Mode Override (Fallback)
   ================================================ */
html.dark .bg-white {
    background-color: #1f2937 !important;
}
html.dark div[menuItemName] {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
}
html.dark .bg-gray-50 {
    background-color: #374151 !important;
}
html.dark .sidebar-card-body {
    background-color: #1f2937 !important;
}
