/* TravelSum Application Styles */

/* Global Styles */
:root {
    --custom-bg-dark: #1a1a1a;
    --custom-bg-light: #f8f9fa;
    --custom-border-dark: #343a40;
    --custom-border-light: #dee2e6;
    --custom-link-dark: #8ab4f8;
    --custom-link-light: #0d6efd;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

footer {
    margin-top: auto;
}

/* Dark Theme Adjustments */
[data-bs-theme="dark"] {
    background-color: var(--custom-bg-dark);
    color: #f8f9fa;
}

[data-bs-theme="dark"] .card {
    background-color: #2b2b2b;
    border-color: var(--custom-border-dark);
}

[data-bs-theme="dark"] .border {
    border-color: var(--custom-border-dark) !important;
}

[data-bs-theme="dark"] .table {
    --bs-table-bg: #2b2b2b;
    --bs-table-border-color: var(--custom-border-dark);
}

[data-bs-theme="dark"] a {
    color: var(--custom-link-dark);
}

/* Application uses dark theme only */

/* Navigation Styles */
.navbar-brand svg {
    vertical-align: text-bottom;
}

/* Cards and Containers */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Status Indicators */
.status-badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.status-pending {
    color: #ffc107;
}

.status-completed {
    color: #28a745;
}

.status-failed {
    color: #dc3545;
}

.status-partial {
    color: #fd7e14;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Toast Container */
.toast-container {
    z-index: 9999;
}

/* Clickable Rows and Interactive Elements */
.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .clickable-row:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Import History Specific Styles */
.error-record {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 4px;
    background-color: rgba(248, 215, 218, 0.1);
    border-left: 3px solid #dc3545;
}

.resolved-record {
    background-color: rgba(40, 167, 69, 0.1);
    border-left: 3px solid #28a745;
}

.error-record pre {
    margin-top: 10px;
    max-height: 150px;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 10px;
    border-radius: 4px;
}

[data-bs-theme="dark"] .error-record pre {
    background-color: rgba(0, 0, 0, 0.3);
}

.filter-section {
    margin-bottom: 20px;
}

/* Detail Rows in Tables */
.detail-row {
    display: none;
}

/* Custom Form Styles */
.form-select:focus,
.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

[data-bs-theme="dark"] .form-select:focus,
[data-bs-theme="dark"] .form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(138, 180, 248, 0.25);
}

/* Modal Styles */
.modal-header {
    border-bottom: 1px solid var(--custom-border-light);
}

.modal-footer {
    border-top: 1px solid var(--custom-border-light);
}

[data-bs-theme="dark"] .modal-header {
    border-bottom: 1px solid var(--custom-border-dark);
}

[data-bs-theme="dark"] .modal-footer {
    border-top: 1px solid var(--custom-border-dark);
}

/* Utility Classes */
.cursor-pointer {
    cursor: pointer;
}

.border-hover:hover {
    border-color: var(--bs-primary) !important;
}

/* Calendar View Styles */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    border: 1px solid var(--custom-border-light);
    padding: 10px;
    min-height: 120px;
    border-radius: 4px;
}

[data-bs-theme="dark"] .calendar-day {
    border-color: var(--custom-border-dark);
}

.calendar-day-header {
    font-weight: bold;
    text-align: center;
    margin-bottom: 5px;
}