/**
 * Enhanced UX CSS for Bot Integration
 * Provides beautiful, modern styling and improved user experience
 */

/* ===== SMOOTH ANIMATIONS ===== */
* {
    transition: all 0.2s ease-in-out;
}

/* ===== CARD ENHANCEMENTS ===== */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

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

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

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

/* ===== METRIC CARDS ===== */
.metric-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--bs-primary);
}

.metric-card .metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    margin: 0.5rem 0;
}

.metric-card .metric-label {
    font-size: 0.9rem;
    color: #212529;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-card .metric-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

/* ===== BADGES ENHANCEMENT ===== */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.badge-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ===== BUTTONS ENHANCEMENT ===== */
.btn {
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-group .btn:hover {
    transform: none;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* ===== TABLES ENHANCEMENT ===== */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: #212529;
}

.table tbody tr {
    transition: background-color 0.2s ease;
    color: #212529;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
    cursor: pointer;
}

.table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* ===== PROGRESS BARS ===== */
.progress {
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    transition: width 0.6s ease;
    font-weight: 600;
    font-size: 0.85rem;
}

.progress-enhanced {
    height: 30px;
    position: relative;
}

.progress-enhanced .progress-bar {
    background: linear-gradient(90deg, 
        var(--bs-primary) 0%, 
        var(--bs-info) 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ===== TOOLTIPS ENHANCEMENT ===== */
.tooltip {
    font-size: 0.9rem;
}

.tooltip-inner {
    max-width: 300px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== ALERT BOXES ENHANCEMENT ===== */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alert-dismissible .btn-close {
    padding: 1rem;
}

/* ===== FORM ENHANCEMENTS ===== */
.form-control,
.form-select {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    color: #212529;
    background-color: #ffffff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
    transform: scale(1.01);
    color: #212529;
}

.form-control.is-valid {
    border-color: var(--bs-success);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
}

.form-control.is-invalid {
    border-color: var(--bs-danger);
}

.form-label {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    background-color: transparent;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item a {
    color: var(--bs-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--bs-dark);
    text-decoration: underline;
}

/* ===== STAT CARDS ===== */
.stat-card {
    background: white;
    color: #212529;
    border: 1px solid #dee2e6;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-card-primary {
    border-left: 4px solid var(--bs-primary);
}

.stat-card-success {
    border-left: 4px solid var(--bs-success);
}

.stat-card-danger {
    border-left: 4px solid var(--bs-danger);
}

.stat-card-warning {
    border-left: 4px solid var(--bs-warning);
}

.stat-card-info {
    border-left: 4px solid var(--bs-info);
}

.stat-card .stat-value {
    font-size: 3rem;
    font-weight: 700;
    color: #212529;
}

.stat-card .stat-label {
    font-size: 1rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== COMPARISON TABLE ===== */
.comparison-table th {
    background: var(--bs-light);
    color: #212529;
    text-align: center;
    font-weight: 600;
}

.comparison-table .winner {
    background-color: rgba(25, 135, 84, 0.1);
    font-weight: 700;
    color: var(--bs-success);
}

/* ===== LOADING STATES ===== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.spinner-grow-sm {
    width: 0.75rem;
    height: 0.75rem;
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 768px) {
    .metric-card {
        margin-bottom: 1rem;
    }
    
    .stat-card .stat-value {
        font-size: 2rem;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ===== NAVBAR ENHANCEMENTS ===== */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem !important;
    color: #ffffff !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--bs-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Dropdown menu fixes */
.dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid rgba(0,0,0,.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    color: #212529 !important;
    padding: 0.5rem 1.5rem;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

.dropdown-header {
    color: #6c757d !important;
    font-weight: 600;
    font-size: 0.875rem;
}

.dropdown-divider {
    border-top-color: #dee2e6;
}

/* ===== FOOTER ===== */
footer {
    background: var(--bs-light);
    color: #212529;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid #dee2e6;
}

footer a {
    color: var(--bs-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

footer a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ===== CHART CONTAINERS ===== */
.chart-container {
    position: relative;
    height: 400px;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ===== EMPTY STATES ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 5rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: #adb5bd;
    margin-bottom: 1.5rem;
}

/* ===== PRINT STYLES ===== */
@media print {
    .no-print,
    .btn,
    .navbar,
    footer,
    .sidebar {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    body {
        font-size: 12pt;
    }
}

/* ===== DARK MODE SUPPORT - DISABLED ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #ffffff;
        --bg-secondary: #f9fafb;
        --text-primary: #1f2937;
        --text-secondary: #6b7280;
    }
}

/* ===== ACCESSIBILITY ===== */
.sr-only-focusable:focus {
    position: absolute;
    width: auto;
    height: auto;
    clip: auto;
    white-space: normal;
}

*:focus {
    outline: 3px solid var(--bs-primary);
    outline-offset: 2px;
}

button:focus,
a:focus {
    outline-width: 2px;
}

/* ===== HIGH CONTRAST FIXES ===== */
/* Ensure text-muted is still readable */
.text-muted {
    color: #6c757d !important;
    font-weight: 500;
}

/* Make badges more visible */
.badge {
    font-weight: 600;
    padding: 0.5em 0.75em;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
    color: #ffffff !important;
}

.badge.bg-light {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    border: 1px solid #dee2e6;
}

.badge.bg-info {
    background-color: #0dcaf0 !important;
    color: #000000 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000000 !important;
}

/* Card improvements */
.card {
    border: 1px solid #dee2e6;
}

.card-header {
    font-weight: 600;
    border-bottom: 2px solid rgba(0,0,0,0.125);
}

.card-header.bg-primary,
.card-header.bg-success,
.card-header.bg-danger,
.card-header.bg-warning,
.card-header.bg-info,
.card-header.bg-dark {
    color: #ffffff !important;
}

.card-header.bg-warning,
.card-header.bg-info {
    color: #000000 !important;
}

.card-header.bg-secondary {
    background-color: #6c757d !important;
    color: #ffffff !important;
}

/* Table improvements */
.table {
    color: #212529;
}

.table th {
    color: #212529;
    font-weight: 600;
}

.table td {
    color: #212529;
}

/* Small text improvements */
small.text-muted {
    color: #6c757d !important;
}

/* Link improvements */
a {
    color: #0d6efd;
    font-weight: 500;
}

a:hover {
    color: #0a58ca;
}

/* List group improvements */
.list-group-item {
    color: #212529;
}

/* Alert improvements */
.alert {
    border-width: 1px;
}

.alert-info {
    color: #055160;
    background-color: #cff4fc;
    border-color: #9eeaf9;
}

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

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #a3cfbb;
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f1aeb5;
}

/* ===== UTILITY CLASSES ===== */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.shadow-soft {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

.shadow-strong {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

.rounded-xl {
    border-radius: 1rem !important;
}

.rounded-2xl {
    border-radius: 1.5rem !important;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== CURSOR STYLES ===== */
.cursor-pointer {
    cursor: pointer;
}

.cursor-help {
    cursor: help;
}

.cursor-not-allowed {
    cursor: not-allowed;
    opacity: 0.6;
}
