/* Custom styles for Notion Notification Dashboard */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --secondary-color: #6c757d;
}

body {
    background-color: #f8f9fa;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-y: scroll; /* Force scrollbar to always be present */
}

/* Header Styles */
header h1 {
    color: #2c3e50;
    font-weight: 600;
}

/* Tab Styling */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 2rem;
}

/* Accordion Styling */
.accordion-item {
    border: none;
    margin-bottom: 0.5rem;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.accordion-button {
    background-color: #f8f9fa;
    border: none;
    padding: 1rem 1.25rem;
    font-weight: 500;
    border-radius: 8px !important;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
    box-shadow: none;
}

.accordion-button:not(.collapsed)::after {
    filter: brightness(0) invert(1);
}

.accordion-button:focus {
    box-shadow: none;
    border: none;
}

.accordion-body {
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 0 0 8px 8px;
}

/* Prevent layout shift during accordion transitions */
.accordion-collapse {
    overflow: hidden;
}

/* Smooth accordion transitions */
.accordion-collapse.collapsing {
    overflow: hidden;
}

.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 500;
    padding: 1rem 1.5rem;
    margin-right: 0.5rem;
    border-radius: 8px 8px 0 0;
}

.nav-tabs .nav-link:hover {
    border: none;
    color: var(--primary-color);
    background-color: #f8f9fa;
}

.nav-tabs .nav-link.active {
    background-color: #fff;
    border: none;
    border-bottom: 3px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    position: relative;
    top: 2px;
}

/* Card Enhancements */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #f1f3f4;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    border-radius: 12px 12px 0 0;
}

.card-body {
    padding: 1.5rem;
}

/* Button Enhancements */
.btn {
    border-radius: 6px;
    font-weight: 500;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.1);
}

/* Range Input Styling */
.form-range {
    height: 6px;
}

.form-range::-webkit-slider-thumb {
    background: var(--primary-color);
    border: none;
    width: 18px;
    height: 18px;
}

.form-range::-moz-range-thumb {
    background: var(--primary-color);
    border: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

/* Switch Styling */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Table Enhancements */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border: none;
    font-weight: 600;
    color: #495057;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Alert Enhancements */
.alert {
    border: none;
    border-radius: 8px;
}

.alert-info {
    background-color: #e7f3ff;
    color: #0c5460;
}

.alert-success {
    background-color: #d1f7d6;
    color: #0f5132;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.alert-secondary {
    background-color: #f8f9fa;
    color: #495057;
}

/* Pre/Code Styling */
pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    font-size: 0.875rem;
    max-height: 300px;
    overflow-y: auto;
}

/* Toast Enhancements */
.toast {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Loading States removed - no animations */

/* Layout Improvements */
.tab-content {
    min-height: 500px;
    max-width: 1400px;
    margin: 0 auto;
}

.tab-pane {
    padding-top: 0.5rem;
}

/* Container Improvements */
.container-fluid {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    min-height: 100vh;
}

/* Prevent horizontal scrollbar */
html, body {
    overflow-x: hidden;
}

/* Section Spacing */
.section-spacing {
    margin-bottom: 2rem;
}

.row {
    margin-bottom: 1rem;
}

.row + .row {
    margin-top: 1.5rem;
}

/* Card Grid Improvements */
.col-lg-6 > .card,
.col-md-6 > .card {
    height: 100%;
}

/* Header Improvements */
header {
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    margin-bottom: 2rem !important;
}

/* Form Spacing */
.form-group + .form-group {
    margin-top: 1rem;
}

.input-group {
    margin-bottom: 0.75rem;
}

/* Table Improvements */
.table th {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .nav-tabs .nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .btn-sm {
        padding: 0.2rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .row .col-md-3,
    .row .col-md-4,
    .row .col-md-6 {
        margin-bottom: 0.75rem;
    }
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-container canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* Status Badge */
.badge {
    font-weight: 500;
    padding: 0.5rem 1rem;
}

/* Custom Utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.border-dashed {
    border-style: dashed !important;
}

/* Icon Enhancements */
.bi {
    vertical-align: -0.125em;
}

/* Hover Effects - removed animations */

/* Connection Status Indicator */
.connection-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.connection-indicator.connected {
    background-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.2);
}

.connection-indicator.disconnected {
    background-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

/* QR Code Styling */
.qr-container img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Statistics Cards */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.stats-card .card-body {
    padding: 1.5rem;
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0;
}

.stats-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Smooth Transitions removed */

/* Focus States */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}
