/* Custom Overrides for Unified White Text and Professional Scaling */

:root {
    --accent-blue: #3b82f6;
    --accent-hover: #2563eb;
    --bg-dark: #000000;
}

/* Global Reset for Consistency */
html {
    font-size: 62.5% !important; /* 1rem = 10px */
}

body, html, .page-wrapper, #page-top {
    background-color: var(--bg-dark) !important;
    color: #ffffff !important;
    font-size: 15px !important; /* Standard 15px body */
    font-family: 'Poppins', sans-serif !important;
}

/* Tiling Style: Optional Utility for Minimal Spacing */
.row.no-gutters-custom {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.row.no-gutters-custom > [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Color & Case Overrides */
h1, h2, h3, h4, h5, h6, p, li, a, span, label, input, textarea, div, blockquote, .btn, .badge {
    color: #ffffff !important;
    text-transform: none !important;
    font-variant: normal !important;
}

/* Font Size Scaling (Professional) */
p, li, a, span, label, input, textarea {
    font-size: 15px; /* 15px - Removed !important to allow specific overrides */
    line-height: 1.6;
}

/* Ensure spans inside headings inherit font size */
h1 span, h2 span, h3 span, h4 span, h5 span, h6 span {
    font-size: inherit !important;
}

/* Brand Logo Styling */
.brand, .navbar-brand {
    font-weight: 700 !important;
}

.navbar-brand h3 {
    font-size: 40px !important;
}

.brand span, .navbar-brand span {
    color: var(--accent-blue) !important;
    font-size: inherit !important;
}

h1 { font-size: 32px !important; font-weight: 800 !important; }
h2 { font-size: 26px !important; font-weight: 700 !important; }
h3 { font-size: 20px !important; font-weight: 700 !important; }
h4 { font-size: 18px !important; font-weight: 600 !important; }
h5 { font-size: 16px !important; font-weight: 600 !important; }
h6 { font-size: 15px !important; font-weight: 600 !important; }

/* Dashboard Sidebar - Professional Minimal Scaling */
#sidebar-wrapper {
    width: 242px !important; /* Shaved 30% from 480px, then 15% from 336px, then another 15% from 285px */
    border-right: none !important; /* Minimal: remove border */
    background-color: #000000 !important;
}

#wrapper {
    padding-top: 0px !important;
}

.navbar-dashboard {
    position: static !important;
    padding: 0 !important;
}

.sidebar-nav {
    margin-top: 0 !important;
}

.sidebar-nav li a {
    font-size: 15px !important;
    padding: 4px 20px 4px 40px !important;
    color: #ffffff !important;
    border-bottom: none !important; /* Minimal: remove dividers */
    display: block !important;
}

.sidebar-nav li.project-item a {
    padding-left: 60px !important;
}

.sidebar-nav li a:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    color: var(--accent-blue) !important;
}

.sidebar-nav li a.active-link {
    color: var(--accent-blue) !important;
    background: rgba(59, 130, 246, 0.15) !important;
    border-left: 5px solid var(--accent-blue) !important;
    padding-left: 35px !important;
}

/* Universal Button Standardization (All Blue) */
.btn, .btn-primary, .btn-default, .btn-light, .btn-info, .btn-success, .btn-warning, .btn-danger, .btn-outline-light, .btn-outline-info {
    background-color: var(--accent-blue) !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: 4px !important;
    padding: 10px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.btn:hover {
    background-color: var(--accent-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4) !important;
}

/* Card & Modal Styling - Minimal (No Borders) */
.card, .box__content {
    background-color: #0a0a0a !important;
    border: none !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
}

.box__wrapper {
    background-color: #0a0a0a !important;
    border: none !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
    padding: 50px !important; /* Unified padding */
}

.box__header, .box__content {
    padding-left: 0 !important; /* Content padding should come from wrapper */
    padding-right: 0 !important;
    background-color: transparent !important;
}

.box__content {
    padding-top: 20px !important;
}

/* Block Padding Fix */
.block {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
}

.block .block__wrapper {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
}

.block .block__title {
    margin-bottom: 1.5rem !important;
}

.block .block__title h2 {
    margin-bottom: 0.5rem !important;
}

.block p {
    margin-bottom: 1rem !important;
}

.block .row {
    margin-bottom: 0 !important;
}

#hero {
    min-height: 100vh !important;
    display: flex;
    align-items: center;
}

/* Preview Specific Fixes */
body.is-preview {
    padding-top: 80px !important; /* Space for fixed navbar */
}

body.is-preview .navbar-brand h3 {
    font-size: 28px !important; /* Scale down logo in editor preview */
}

body.is-preview .navbar-nav .nav-link {
    font-size: 13px !important;
    margin: 0 8px;
}

.card-body, .modal-body {
    padding: 25px !important;
}

.card-header, .modal-header {
    padding: 15px 25px !important;
    background-color: rgba(255,255,255,0.02) !important;
    height: auto !important; /* Global fix for giant theme headers */
    min-height: auto !important;
}

.modal-content {
    background-color: #0a0a0a !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    padding: 0 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8) !important;
}

/* Remove Lines/Dividers (Minimalism) */
hr, .border-top, .border-bottom, .border-left, .border-right, 
.table td, .table th, .card-header, .modal-header, .modal-footer {
    border: none !important;
}

/* Table Specific Cleanup */
.table thead th {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    font-weight: 700;
}

.table tbody tr:nth-of-type(odd) {
    background-color: rgba(255,255,255,0.02);
}

/* Navbar Tuning */
.navbar-dashboard {
    border-bottom: none !important; /* Minimal: remove navbar border */
    background-color: #000 !important;
}

.navbar-nav .nav-link {
    font-size: 15px !important;
    color: #ffffff !important;
    margin: 0 15px;
}

/* Dropdown Menu - Dark Mode */
.dropdown-menu {
    background-color: #111111 !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8) !important;
    padding: 8px 0 !important;
    margin-top: 5px !important;
}

.dropdown-item {
    color: #ffffff !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
}

.dropdown-item:hover {
    background-color: rgba(59, 130, 246, 0.1) !important;
    color: var(--accent-blue) !important;
}

.dropdown-item.text-danger {
    color: #ff4444 !important;
}

.dropdown-item.text-danger:hover {
    background-color: rgba(255, 68, 68, 0.1) !important;
    color: #ff4444 !important;
}

.dropdown-divider {
    border-top: 1px solid rgba(255,255,255,0.05) !important;
    margin: 8px 0 !important;
}

/* Modal Close Button Fix */
.close, .modal-header .close {
    color: #ffffff !important;
    text-shadow: none !important;
    opacity: 0.8 !important;
    outline: none !important;
    background: transparent !important;
    border: none !important;
    font-size: 24px !important;
    padding: 10px 15px !important;
    margin: -10px -15px -10px auto !important;
}

.close:hover, .modal-header .close:hover {
    opacity: 1 !important;
    color: var(--accent-blue) !important;
    background: transparent !important;
}

/* Badge fix (Blue accent) */
.badge {
    border: none !important;
    background: rgba(59, 130, 246, 0.2) !important;
    color: var(--accent-blue) !important;
    font-size: 11px !important;
    padding: 5px 10px !important;
}

/* Ensure images in img-into-bg are hidden and container has height */
.img-into-bg {
    min-height: 250px !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.img-into-bg img, .box__image img {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.box.box--image .box__image, .box--image .box__image {
    min-height: 250px !important;
    height: 250px !important;
    background-color: #111 !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    display: block !important;
}

.box.box--image .box__header {
    height: 250px !important;
}

.box.box--image .box__wrapper {
    background-color: #0a0a0a !important;
}

.box.box--image .box__content {
    background-color: #0a0a0a !important;
    position: relative !important;
    padding: 20px !important;
}

.box.box--image {
    height: auto !important;
    min-height: 450px !important;
}

/* Editor Specific Overrides */
#editor-wrapper, .editor-wrapper {
    display: flex !important;
    height: calc(100vh - 100px) !important;
    margin: 0 !important;
    border: none !important;
    background-color: #000 !important;
}

#editor-sidebar, .editor-sidebar {
    width: 400px !important;
    background-color: #111111 !important;
    border-right: 1px solid rgba(255,255,255,0.05) !important;
    overflow-y: auto !important;
    padding: 20px !important;
    flex-shrink: 0 !important;
}

#editor-preview, .editor-preview {
    flex-grow: 1 !important;
    background-color: #000 !important;
    position: relative !important;
}

#editor-preview iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

/* Form Control Standardization (Dark Mode) */
.form-control, 
select.form-control, 
.modal-content .form-control,
.modal-content select,
.modal-content input {
    background-color: #1a1a1a !important; /* Dark Gray */
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 4px !important;
    padding: 10px 15px !important;
    font-size: 15px !important;
    height: 50px !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
}

textarea.form-control,
.modal-content textarea {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 4px !important;
    padding: 10px 15px !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 100px !important;
}

select.form-control {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 50px !important; /* Force vertical centering for selects */
}

.form-control:focus,
.modal-content .form-control:focus {
    background-color: #222222 !important;
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25) !important;
    color: #ffffff !important;
}

/* Placeholder visibility */
::placeholder {
    color: rgba(255,255,255,0.4) !important;
}

:-ms-input-placeholder {
    color: rgba(255,255,255,0.4) !important;
}

::-ms-input-placeholder {
    color: rgba(255,255,255,0.4) !important;
}

/* Specific Sidebar Overrides (Keep existing for layout) */
#editor-sidebar .form-control, 
#editor-sidebar select, 
#editor-sidebar textarea,
.editor-sidebar .form-control,
.editor-sidebar select,
.editor-sidebar textarea {
    background-color: #1a1a1a !important;
    padding: 15px !important;
    border: none !important; /* Sidebar prefers no borders */
}

/* Increase Dropdown Size and Style Arrow */
#editor-sidebar select,
.editor-sidebar select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 24px !important; /* Bigger arrow */
    padding-right: 50px !important;
    height: auto !important;
    min-height: 50px !important; /* Bigger dropdown */
}

#editor-sidebar .card,
.editor-sidebar .card {
    background-color: rgba(255,255,255,0.02) !important;
    border: none !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
}

#editor-sidebar .editor-section-title,
.editor-sidebar .editor-section-title {
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    margin-top: 30px !important;
    margin-bottom: 20px !important;
    padding-bottom: 10px !important;
    color: var(--accent-blue) !important;
    font-weight: 700 !important;
    font-size: 16px !important;
}

#editor-sidebar label,
.editor-sidebar label {
    color: rgba(255,255,255,0.6) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    display: block !important;
}

.sticky-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    background-color: #111 !important;
    padding-bottom: 15px !important;
    margin-bottom: 20px !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}

/* Stylized Image Upload */
.custom-file-upload {
    display: inline-block;
    padding: 10px 20px;
    cursor: pointer;
    background-color: var(--accent-blue) !important;
    color: white !important;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    text-align: center;
}

.custom-file-upload:hover {
    background-color: var(--accent-hover) !important;
    transform: translateY(-1px);
}

.custom-file-upload i {
    margin-right: 8px;
}

input[type="file"].hidden-file-input {
    display: none;
}

