/* Hourly Precipitation Accumulator Custom Styles */

/* Enhanced form styling */
.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Card enhancements */
.card-header {
    font-weight: 600;
}

/* Table styling improvements */
#precipitation-table {
    border-radius: 0.375rem;
    overflow: hidden;
}

/* Tabulator theme overrides */
.tabulator .tabulator-header {
    background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid var(--bs-border-color);
}

.tabulator .tabulator-header .tabulator-col {
    border-right: 1px solid var(--bs-border-color);
}

/* Enhanced column header styling for dynamic headers */
.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {
    line-height: 1.2;
    white-space: normal;
}

/* Adjust header height for multi-line content */
.tabulator .tabulator-header .tabulator-col {
    min-height: 60px;
}

.tabulator .tabulator-header .tabulator-col .tabulator-col-content {
    padding: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Improve multi-line header readability */
.tabulator .tabulator-header .tabulator-col .tabulator-col-title br {
    line-height: 1.4;
}

.tabulator .tabulator-header .tabulator-col .tabulator-col-content {
    padding: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tabulator .tabulator-row:nth-child(even) {
    background-color: rgba(var(--bs-light-rgb), 0.5);
}

.tabulator .tabulator-row:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
}

.tabulator .tabulator-cell {
    border-right: 1px solid var(--bs-border-color-translucent);
    padding: 0.5rem;
    text-align: center;
}

/* Frozen column styling */
.tabulator .tabulator-frozen {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.tabulator .tabulator-frozen.tabulator-frozen-left {
    border-right: 2px solid var(--bs-primary);
}

/* Precipitation value formatting */
.tabulator .tabulator-cell[tabulator-field^="p"] {
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

/* Status alert improvements */
.alert {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-left: 4px solid #0dcaf0;
}

.alert-success {
    background: linear-gradient(135deg, #d1e7dd 0%, #a3cfbb 100%);
    border-left: 4px solid #198754;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #ffc107;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f1aeb5 100%);
    border-left: 4px solid #dc3545;
}

/* Button group styling */
.btn-group .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Loading state styling */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Breadcrumb styling */
.breadcrumb {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}

/* Container improvements */
.container-fluid {
    max-width: 1400px;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
    
    #precipitation-table {
        font-size: 0.875rem;
    }
    
    .tabulator .tabulator-cell {
        padding: 0.375rem;
    }
}

/* Print styles */
@media print {
    .btn, .alert, nav, .card-header {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        break-inside: avoid;
    }
    
    #precipitation-table {
        height: auto !important;
    }
}

/* Focus styles for accessibility */
.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}