/* ==========================================
   Unified Custom Premium Styling Engine
   Handles: Dark mode, Glassmorphic Cards,
            Glow Blobs, Buttons, Form Inputs
   ========================================== */

/* 1. Base Styles & Variables Override */
body {
    background-color: var(--theme-bg) !important;
    color: var(--text-main) !important;
    font-family: 'Inter', sans-serif !important;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #04060f;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--theme-color);
}

/* Background Glowing Blobs */
.glow-blob-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
    top: 0;
    left: 0;
}
.glow-blob {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
}
.glow-blob-1 {
    top: 10%;
    right: -100px;
    background: var(--theme-color);
}
.glow-blob-2 {
    bottom: 20%;
    left: -100px;
    background: #8b5cf6; /* default secondary violet glow */
}

/* 2. Sleek Typography & Headers */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}
.section-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--theme-color);
    background: var(--theme-glow);
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.brand-text-gradient {
    background: var(--theme-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* 3. Glassmorphism Design System */
.glass-card-custom {
    background: var(--theme-card) !important;
    backdrop-filter: blur(25px) saturate(120%);
    -webkit-backdrop-filter: blur(25px) saturate(120%);
    border: 1px solid var(--theme-border) !important;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    padding: 30px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.3s;
}
.glass-card-custom:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5), 0 0 20px var(--theme-glow);
}

/* 4. Premium Buttons */
.btn-custom-primary, .btn-primary, .btn-warning {
    background: var(--theme-grad) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 0.8rem !important;
    letter-spacing: 0.1em;
    padding: 14px 28px !important;
    border: none !important;
    border-radius: 50px !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px var(--theme-glow);
}
.btn-custom-primary:hover, .btn-primary:hover, .btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--theme-glow), 0 0 15px var(--theme-color);
    color: #ffffff !important;
}
.btn-custom-outline, .btn-outline-primary, .btn-outline-warning, .btn-outline-success, .btn-outline-light {
    background: rgba(255, 255, 255, 0.02) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 0.8rem !important;
    letter-spacing: 0.1em;
    padding: 14px 28px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 50px !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-custom-outline:hover, .btn-outline-primary:hover, .btn-outline-warning:hover, .btn-outline-success:hover, .btn-outline-light:hover {
    background: #ffffff !important;
    color: #04060f !important;
    border-color: #ffffff !important;
    transform: translateY(-2px);
}

/* 5. Inputs & Forms */
.form-control-custom, .form-select-custom, .form-control, .form-select {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    padding: 12px 18px !important;
    font-size: 0.95rem !important;
    transition: all 0.3s !important;
}
.form-control-custom:focus, .form-select-custom:focus, .form-control:focus, .form-select:focus {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: var(--theme-color) !important;
    box-shadow: 0 0 0 3px var(--theme-glow) !important;
    outline: none !important;
    color: #ffffff !important;
}
.form-control-custom::placeholder, .form-control::placeholder {
    color: rgba(255, 255, 255, 0.25) !important;
}
.label-custom {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Checkboxes */
.form-check-input-custom, .form-check-input {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 4px !important;
    width: 18px !important;
    height: 18px !important;
    cursor: pointer;
    transition: all 0.2s;
}
.form-check-input-custom:checked, .form-check-input:checked {
    background-color: var(--theme-color) !important;
    border-color: var(--theme-color) !important;
}

/* 6. Navigation Bar */
.navbar-custom {
    background: rgba(4, 6, 15, 0.8) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--theme-border);
    padding: 15px 0;
    transition: all 0.3s;
}
.navbar-custom .nav-link {
    color: var(--text-muted) !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 16px !important;
    transition: color 0.3s;
}
.navbar-custom .nav-link:hover, .navbar-custom .nav-link.active {
    color: var(--theme-color) !important;
}

/* 7. Footer */
.footer-custom, .footer, .footer.style4 {
    background: #04060e !important;
    border-top: 1px solid var(--theme-border) !important;
    padding: 60px 0 30px 0 !important;
}
.footer-custom .footer-link, .footer a {
    color: var(--text-muted) !important;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.9rem;
}
.footer-custom .footer-link:hover, .footer a:hover {
    color: var(--theme-color) !important;
    padding-left: 4px;
}

/* 8. Accordions (FAQ) */
.accordion-item-custom {
    background: rgba(255, 255, 255, 0.015) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 12px !important;
    overflow: hidden;
    margin-bottom: 12px;
}
.accordion-button-custom {
    background: transparent !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 20px 24px !important;
    border: none !important;
    box-shadow: none !important;
}
.accordion-button-custom:not(.collapsed) {
    color: var(--theme-color) !important;
}
.accordion-body-custom {
    padding: 0 24px 24px 24px !important;
    color: var(--text-muted) !important;
    line-height: 1.6;
}

/* 9. Support Tickets reply bubbles */
.ticket-bubble {
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--theme-border);
}
.ticket-bubble-user {
    background: var(--theme-glow);
    border-left: 4px solid var(--theme-color);
}
.ticket-bubble-agent {
    background: rgba(255, 255, 255, 0.02);
    border-left: 4px solid rgba(255, 255, 255, 0.3);
}

/* Tabs & Playlist manager */
.nav-pills-custom .nav-link, .nav-pills .nav-link {
    color: var(--text-muted) !important;
    background: rgba(255, 255, 255, 0.015) !important;
    border: 1px solid var(--theme-border) !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.3s !important;
    text-align: left !important;
    margin-bottom: 8px !important;
}
.nav-pills-custom .nav-link.active, .nav-pills .nav-link.active {
    background: var(--theme-grad) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 15px var(--theme-glow) !important;
}
.compliance-box-custom, .compliance-box {
    background: rgba(255, 255, 255, 0.015) !important;
    border: 1px solid var(--theme-border) !important;
    padding: 20px !important;
    border-radius: 12px !important;
    margin-bottom: 20px !important;
    color: var(--text-main) !important;
}
.compliance-box-custom.warning, .compliance-warning { border-left: 4px solid var(--theme-color) !important; }
.compliance-box-custom.danger, .compliance-danger { border-left: 4px solid #ef4444 !important; }
.compliance-box-custom.info, .compliance-info { border-left: 4px solid var(--theme-color) !important; }

/* Playlist card styles */
.playlist-card.bg-white, .playlist-card {
    background: var(--theme-card) !important;
    border: 1px solid var(--theme-border) !important;
}
.playlist-card h4, .playlist-card h5, .playlist-card h6, .playlist-card label, .playlist-card .text-dark, .compliance-box h5, .compliance-box .text-dark {
    color: #ffffff !important;
}
.playlist-card .bg-light {
    background-color: rgba(255, 255, 255, 0.01) !important;
    border-color: var(--theme-border) !important;
}
.playlist-card .border-end {
    border-color: var(--theme-border) !important;
}
.playlist-card hr {
    border-color: var(--theme-border) !important;
}

/* Custom utility helpers to replace bootstrap colors with theme colors */
.text-theme {
    color: var(--theme-color) !important;
}
.bg-theme-glow {
    background: var(--theme-glow) !important;
    border: 1px solid var(--theme-border) !important;
}
.border-theme {
    border-color: var(--theme-border) !important;
}
.border-theme-color {
    border-color: var(--theme-color) !important;
}
.badge-theme {
    background: var(--theme-glow) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--theme-color) !important;
}
.badge-theme-solid {
    background: var(--theme-grad) !important;
    color: #ffffff !important;
}
