/* AIYA - AI Fitness Assistant - Main CSS File */

/* Custom Variables */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;

    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);

    --font-family-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

/* Global Styles */
body {
    font-family: var(--font-family-sans-serif);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f5f5;
}

/* Header Styles */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.15s ease-in-out;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Sticky Header for Trainee Dashboard */
.sticky-header {
    position: sticky;
    top: 56px; /* Height of navbar */
    z-index: 1020;
    background: white;
    border-bottom: 1px solid #dee2e6;
    box-shadow: var(--box-shadow);
}

.date-nav {
    gap: 1rem;
}

.btn-date-nav {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    transition: all 0.15s ease-in-out;
}

.btn-date-nav:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.current-date {
    font-weight: 600;
    font-size: 1.1rem;
}

.weekday {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* Badge Styles */
.streak-badge {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.points-badge {
    background: linear-gradient(45deg, #0d6efd, #6610f2);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

/* Card Styles */
.metric-card {
    margin-bottom: 1.5rem;
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

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

/* Form Styles */
.metric-input {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.metric-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Avatar Styles */
.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-md {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

/* Todo Styles */
.todo-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.15s ease-in-out;
}

.todo-item:last-child {
    border-bottom: none;
}

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

.todo-item.completed {
    background-color: #f8f9fa;
    opacity: 0.7;
}

.todo-item.completed span {
    text-decoration: line-through;
}

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

/* Notification Styles */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Sidebar Styles */
.sidebar {
    min-height: calc(100vh - 56px);
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
}

.sidebar .nav-link {
    color: var(--dark-color);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 0.25rem;
    transition: all 0.15s ease-in-out;
}

.sidebar .nav-link:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* Table Styles */
.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.table-warning {
    --bs-table-bg: #fff3cd;
    border-color: #ffecb5;
}

/* Progress Bar Styles */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 4px;
}

/* Button Styles */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
}

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

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

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

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

/* Responsive Styles */
@media (max-width: 768px) {
    .sticky-header {
        position: relative;
        top: 0;
    }

    .date-nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-date-nav {
        width: 36px;
        height: 36px;
    }

    .metric-card {
        margin-bottom: 1rem;
    }

    .chart-container {
        height: 100px;
    }

    .avatar-lg {
        width: 64px;
        height: 64px;
    }

    .avatar-md {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn-toolbar .btn-group {
        margin-bottom: 0.5rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .sticky-header,
    .btn,
    .modal,
    .alert {
        display: none !important;
    }

    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }

    body {
        background-color: white !important;
    }
}

/* Dark Mode Support (for future implementation) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

.slide-in {
    animation: slideIn 0.3s ease-in-out;
}

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

/* Utility Classes */
.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-sm {
    box-shadow: var(--box-shadow) !important;
}

.shadow-lg {
    box-shadow: var(--box-shadow-lg) !important;
}

.border-radius {
    border-radius: var(--border-radius) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

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

