/* allow svg icons to spin like FontAwesome's fa-spin */
@keyframes fa-spin {
  100% { transform: rotate(360deg); }
}
.icon.fa-spin {
  display: inline-block;
  animation: fa-spin 1s linear infinite;
}

/* Dark-mode: make hover text black for cPanel quick-actions (user) */
.theme-dark #cpanel-actions-card .btn:hover,
.theme-dark #cpanel-actions-card .list-group-item:hover,
.theme-dark #cpanel-actions-card .list-group-item-action:hover,
.theme-dark #cpanel-actions-card .dropdown-item:hover,
.theme-dark #cpanel-actions-card a.list-group-item:hover,
.theme-dark .cpanel-actions-card .btn:hover,
.theme-dark .cpanel-actions-card .list-group-item:hover,
.theme-dark .cpanel-actions-card .list-group-item-action:hover,
.theme-dark .cpanel-actions-card .dropdown-item:hover,
.theme-dark .cpanel-actions-card a.list-group-item:hover {
  /* No visual hover: keep inherited color and transparent background */
  color: inherit !important;
  background: transparent !important;
}

/* Ensure icons also don't change color on hover */
.theme-dark #cpanel-actions-card .btn:hover .icon,
.theme-dark #cpanel-actions-card .list-group-item:hover .icon,
.theme-dark #cpanel-actions-card .dropdown-item:hover .icon,
.theme-dark .cpanel-actions-card .btn:hover .icon,
.theme-dark .cpanel-actions-card .list-group-item:hover .icon,
.theme-dark .cpanel-actions-card .dropdown-item:hover .icon {
  color: inherit !important;
}

/* cPanel actions card: make it match other cards and support light/dark themes */
.cpanel-actions-card, #cpanel-actions-card {
  border-radius: .5rem;
  overflow: hidden;
}

.cpanel-actions-card .card, #cpanel-actions-card .card {
  /* Light theme card appearance */
  background: #ffffff;
  border: 1px solid rgba(16,24,40,0.06);
  box-shadow: 0 1px 2px rgba(16,24,40,0.04);
  color: inherit;
}

.cpanel-actions-card .card-header, #cpanel-actions-card .card-header {
  background: transparent;
  border-bottom: none;
}

.cpanel-actions-card .list-group, #cpanel-actions-card .list-group,
.cpanel-actions-card .list-group-item, #cpanel-actions-card .list-group-item,
.cpanel-actions-card a.list-group-item, #cpanel-actions-card a.list-group-item,
.cpanel-actions-card .list-group-item-action, #cpanel-actions-card .list-group-item-action {
  background: transparent;
  color: inherit;
  padding: .5rem 1rem;
  border-bottom: 1px solid rgba(16,24,40,0.04);
}

.cpanel-actions-card .list-group-item:last-child,
#cpanel-actions-card .list-group-item:last-child {
  border-bottom: none;
}

.cpanel-actions-card .list-group-item:hover,
.cpanel-actions-card .list-group-item-action:hover,
#cpanel-actions-card .list-group-item:hover,
#cpanel-actions-card .list-group-item-action:hover {
  background: rgba(16,24,40,0.02);
  color: inherit;
}

/* Mobile dropdown items should match list styles */
.cpanel-actions-card .dropdown-menu, #cpanel-actions-card .dropdown-menu {
  background: #ffffff;
  border: 1px solid rgba(16,24,40,0.06);
}

/* Dark theme overrides */
.theme-dark .cpanel-actions-card .card,
.theme-dark #cpanel-actions-card .card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: none;
}

.theme-dark .cpanel-actions-card .list-group-item,
.theme-dark #cpanel-actions-card .list-group-item,
.theme-dark .cpanel-actions-card a.list-group-item,
.theme-dark #cpanel-actions-card a.list-group-item {
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.theme-dark .cpanel-actions-card .list-group-item:hover,
.theme-dark #cpanel-actions-card .list-group-item:hover {
  background: rgba(255,255,255,0.02);
}

/* Ensure icons keep the inherited color in both themes */
.cpanel-actions-card .icon, #cpanel-actions-card .icon,
.cpanel-actions-card .fa, #cpanel-actions-card .fa {
  color: inherit !important;
}

/* Admin color palette overrides (loads after Tabler)
   Feel free to tweak these hex values to your preferred colors.
*/

/* Primary accent used to replace bg-orange */
.bg-orange {
  background-color: #4F46E5 !important; /* indigo */
  border-color: #4F46E5 !important;
  color: #ffffff !important;
}
.bg-orange-lt { background-color: rgba(79,70,229,0.08) !important; }
.text-orange { color: #4F46E5 !important; }

/* Replace bg-yellow with teal accent */
.bg-yellow {
  background-color: #14B8A6 !important; /* teal */
  border-color: #14B8A6 !important;
  color: #ffffff !important;
}
.bg-yellow-lt { background-color: rgba(20,184,166,0.08) !important; }
.text-yellow { color: #14B8A6 !important; }

/* Info color */
.bg-info {
  background-color: #0EA5E9 !important; /* sky */
  border-color: #0EA5E9 !important;
  color: #ffffff !important;
}
.bg-info-lt { background-color: rgba(14,165,233,0.08) !important; }
.text-info { color: #0EA5E9 !important; }

/* Success */
.bg-green {
  background-color: #10B981 !important; /* emerald */
  border-color: #10B981 !important;
  color: #ffffff !important;
}
.bg-green-lt { background-color: rgba(16,185,129,0.08) !important; }
.text-green { color: #10B981 !important; }

/* Purple, Pink, Cyan, Teal */
.bg-purple { background-color: #8B5CF6 !important; border-color:#8B5CF6 !important; color:#fff !important; }
.bg-purple-lt { background-color: rgba(139,92,246,0.08) !important; }
.text-purple { color: #8B5CF6 !important; }

.bg-pink { background-color: #EC4899 !important; border-color:#EC4899 !important; color:#fff !important; }
.bg-pink-lt { background-color: rgba(236,72,153,0.08) !important; }
.text-pink { color: #EC4899 !important; }

.bg-cyan { background-color: #06B6D4 !important; border-color:#06B6D4 !important; color:#fff !important; }
.bg-cyan-lt { background-color: rgba(6,182,212,0.08) !important; }
.text-cyan { color: #06B6D4 !important; }

.bg-teal { background-color: #0EA5A4 !important; border-color:#0EA5A4 !important; color:#fff !important; }
.bg-teal-lt { background-color: rgba(14,165,164,0.08) !important; }
.text-teal { color: #0EA5A4 !important; }

/* Utility: avatar backgrounds should remain white text on colored bg */
.avatar.text-white { color: #fff !important; }

/* Small tweak: badges and ribbons (ensure contrast) */
.badge, .ribbon { color: #ffffff !important; }

/* Optionally change page header background (uncomment to enable)
.page-header { background: #f8fafc; }
*/

/* Hover behavior for links inside the cPanel actions card
   - Higher specificity and few !important rules are used to override
     earlier dark-mode transparent hover rules so the user sees a clear
     hover state in both light and dark themes. */
.cpanel-actions-card a.list-group-item,
.cpanel-actions-card .list-group-item a,
#cpanel-actions-card a.list-group-item,
#cpanel-actions-card .list-group-item a {
  display: block;
  transition: background .15s ease, color .15s ease;
}

.cpanel-actions-card a.list-group-item:hover,
.cpanel-actions-card .list-group-item a:hover,
#cpanel-actions-card a.list-group-item:hover,
#cpanel-actions-card .list-group-item a:hover {
  background: rgba(16,24,40,0.04) !important; /* light subtle hover */
  color: inherit !important;
}

/* Dark theme: slightly lighter hover so it shows up on dark backgrounds */
.theme-dark .cpanel-actions-card a.list-group-item:hover,
.theme-dark .cpanel-actions-card .list-group-item a:hover,
.theme-dark #cpanel-actions-card a.list-group-item:hover,
.theme-dark #cpanel-actions-card .list-group-item a:hover {
  background: rgba(255,255,255,0.03) !important;
  color: inherit !important;
}

/* Smooth icon color transition so fa icons don't jump */
.cpanel-actions-card .fa,
#cpanel-actions-card .fa {
  transition: color .15s ease;
}


/* Force dark blue background in dark mode */
body.theme-dark, 
.theme-dark .page, 
.theme-dark .page-wrapper,
.theme-dark .page-body {
    background-color: #0f172a !important; /* Slate 900 */
    color: #e2e8f0;
}

/* Ensure cards stand out slightly against the dark blue background */
.theme-dark .card {
    background-color: #1e293b !important; /* Slate 800 */
    border-color: #334155 !important; /* Slate 700 */
}


/* Dark mode dropdowns and inputs */
.theme-dark .dropdown-menu {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
.theme-dark .dropdown-item {
    color: #e2e8f0 !important;
}
.theme-dark .dropdown-item:hover {
    background-color: #334155 !important;
}
.theme-dark .form-control, 
.theme-dark .form-select {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
.theme-dark .form-control:focus, 
.theme-dark .form-select:focus {
    background-color: #1e293b !important;
    color: #fff !important;
    border-color: #3b82f6 !important; /* Blue 500 */
}

/* --- Expanded Dark Mode Fixes --- */

/* Global Text Colors */
.theme-dark h1, .theme-dark h2, .theme-dark h3, 
.theme-dark h4, .theme-dark h5, .theme-dark h6,
.theme-dark .h1, .theme-dark .h2, .theme-dark .h3, 
.theme-dark .h4, .theme-dark .h5, .theme-dark .h6 {
    color: #f8fafc !important; /* Slate 50 */
}
.theme-dark .text-muted {
    color: #94a3b8 !important; /* Slate 400 */
}
.theme-dark a {
    color: #60a5fa; /* Blue 400 */
}
.theme-dark a:hover {
    color: #93c5fd; /* Blue 300 */
}

/* Tables */
.theme-dark .table {
    color: #e2e8f0;
    background-color: transparent;
}
.theme-dark .table thead th {
    background-color: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}
.theme-dark .table td, .theme-dark .table th {
    border-color: #334155;
}
.theme-dark .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.03);
}
.theme-dark .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Modals */
.theme-dark .modal-content {
    background-color: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}
.theme-dark .modal-header, 
.theme-dark .modal-footer {
    border-color: #334155;
}
.theme-dark .close, .theme-dark .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Borders */
.theme-dark .border, 
.theme-dark .border-top, 
.theme-dark .border-bottom, 
.theme-dark .border-start, 
.theme-dark .border-end {
    border-color: #334155 !important;
}

/* Navbar/Sidebar specific tweaks */
.theme-dark .navbar {
    background-color: #0f172a;
    border-bottom-color: #334155;
}
.theme-dark .navbar-nav .nav-link {
    color: #cbd5e1; /* Slate 300 */
}
.theme-dark .navbar-nav .nav-link:hover,
.theme-dark .navbar-nav .nav-link.active {
    color: #fff;
}

/* Buttons */
.theme-dark .btn-secondary {
    background-color: #334155;
    border-color: #475569;
    color: #fff;
}
.theme-dark .btn-secondary:hover {
    background-color: #475569;
}
.theme-dark .btn-outline-secondary {
    color: #cbd5e1;
    border-color: #475569;
}
.theme-dark .btn-outline-secondary:hover {
    background-color: #334155;
    color: #fff;
}

/* Form Labels & Inputs */
.theme-dark .form-label {
    color: #e2e8f0;
}
.theme-dark .input-group-text {
    background-color: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

/* Alerts: improve visibility and contrast in dark mode */
.theme-dark .alert {
  background-color: #1e293b !important; /* Slate 800 */
  border-color: #334155 !important;     /* Slate 700 */
  color: #e2e8f0 !important;            /* Slate 200 */
}
.theme-dark .alert-success {
  border-color: #22c55e !important;     /* Green 500 */
}
.theme-dark .alert-danger {
  border-color: #ef4444 !important;     /* Red 500 */
}
.theme-dark .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

