/* Custom styles for Support Dashboard */

body {
    background-color: #f8f9fa;
}

.navbar-brand {
    font-weight: bold;
}

.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

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

.message-preview {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.badge {
    font-size: 0.75em;
}

.btn-group-sm > .btn, .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.alert {
    border: none;
    border-radius: 0.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

.text-muted {
    color: #6c757d !important;
}

/* Status badges */
.badge.bg-warning {
    color: #000;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom button styles */
.btn-outline-primary:hover {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group-sm > .btn, .btn-sm {
        padding: 0.125rem 0.25rem;
        font-size: 0.75rem;
    }
}

/* Dashboard specific styles */
.dashboard-stats .card {
    transition: transform 0.2s;
}

.dashboard-stats .card:hover {
    transform: translateY(-2px);
}

/* Message status colors */
.status-open {
    border-left: 4px solid #ffc107;
}

.status-in-progress {
    border-left: 4px solid #0dcaf0;
}

.status-resolved {
    border-left: 4px solid #198754;
}

.status-escalated {
    border-left: 4px solid #dc3545;
}

/* Schedule calendar styles */
.schedule-slot {
    border-radius: 0.375rem;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
}

.schedule-primary {
    background-color: #e7f3ff;
    border: 1px solid #0d6efd;
}

.schedule-backup {
    background-color: #f8f9fa;
    border: 1px solid #6c757d;
}

.conversation-item {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.conversation-item:hover {
    background-color: #f8f9fa;
}

.conversation-item.active {
    background-color: #e7f3ff;
}

.conversation-checkbox {
    display: flex;
    align-items: center;
    padding-right: 8px;
}

.conversation-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.bulk-actions-toolbar {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.bulk-actions-toolbar .btn-sm {
    padding: 4px 8px;
    margin-left: 4px;
}

.selected-count {
    text-align: center;
}

/* User avatar styles */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Form improvements */
.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Animation for new messages */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.new-message {
    animation: slideIn 0.3s ease-out;
}

/* Priority indicators */
.priority-urgent {
    border-left: 4px solid #dc3545;
}

.priority-high {
    border-left: 4px solid #fd7e14;
}

.priority-normal {
    border-left: 4px solid #0dcaf0;
}

.priority-low {
    border-left: 4px solid #6c757d;
}

/* Navbar enhancements */
.navbar-dark.bg-primary {
    /* Fallback background color already provided by .bg-primary */
    background-image: linear-gradient(90deg, var(--bs-primary), color-mix(in srgb, var(--bs-primary), #000 12%));
}

.navbar.sticky-top {
    backdrop-filter: saturate(160%) blur(6px);
}

.navbar .navbar-brand {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.navbar-brand img {
    height: 30px;
    max-height: 30px;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.12);
    text-decoration: none;
}

.navbar-dark .navbar-nav .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 -2px 0 0 var(--bs-success);
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .navbar-dark .navbar-collapse {
        background-color: var(--bs-primary);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0.5rem 0;
    }
    .navbar-dark .navbar-nav .nav-link {
        border-radius: 0.375rem;
    }
}

/* Navbar dropdown styling */
.navbar .dropdown-menu {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
    margin-top: 0.5rem;
}

.navbar .dropdown-item {
    padding: 0.5rem 0.75rem;
}

.navbar .dropdown-item:active {
    background-color: var(--bs-primary);
    color: #fff;
}
