/* GymTracker - Main CSS Import File */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@100;200;300;400;500;600;700;800&display=swap');

/* Import CSS Files */
@import 'style.css';
@import 'fitness-components.css';
@import 'fitness-animations.css';
@import 'fitness-utilities.css';

/* Additional Global Styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--gray-800);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Selection Styles */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-200);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--radius-full);
    transition: var(--transition-normal);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

::-webkit-scrollbar-corner {
    background: var(--gray-200);
}

/* Print Styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a, a:visited {
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    abbr[title]:after {
        content: " (" attr(title) ")";
    }
    
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
    
    .print-break-after {
        page-break-after: always;
    }
    
    .print-break-inside {
        page-break-inside: avoid;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --secondary-color: #000000;
        --accent-color: #000000;
        --success-color: #000000;
        --danger-color: #000000;
        --warning-color: #000000;
        --info-color: #000000;
        --gray-100: #ffffff;
        --gray-200: #ffffff;
        --gray-300: #ffffff;
        --gray-400: #ffffff;
        --gray-500: #000000;
        --gray-600: #000000;
        --gray-700: #000000;
        --gray-800: #000000;
        --gray-900: #000000;
    }
    
    .card {
        border: 2px solid #000000;
    }
    
    .btn {
        border: 2px solid #000000;
    }
    
    .form-control {
        border: 2px solid #000000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #1a1a1a;
        --dark-color: #ffffff;
        --gray-100: #2d2d2d;
        --gray-200: #3d3d3d;
        --gray-300: #4d4d4d;
        --gray-400: #5d5d5d;
        --gray-500: #6d6d6d;
        --gray-600: #7d7d7d;
        --gray-700: #8d8d8d;
        --gray-800: #9d9d9d;
        --gray-900: #adadad;
    }
    
    body {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
        color: var(--dark-color);
    }
    
    .card {
        background: rgba(45, 45, 45, 0.95);
        color: var(--dark-color);
        border: 1px solid var(--gray-300);
    }
    
    .sidebar {
        background: rgba(45, 45, 45, 0.95);
        border-right: 1px solid var(--gray-300);
    }
    
    .navbar {
        background: rgba(45, 45, 45, 0.95);
        border-bottom: 1px solid var(--gray-300);
    }
    
    .form-control {
        background: rgba(45, 45, 45, 0.9);
        color: var(--dark-color);
        border: 2px solid var(--gray-400);
    }
    
    .form-control:focus {
        background: rgba(45, 45, 45, 1);
        border-color: var(--primary-color);
    }
    
    .table {
        background: rgba(45, 45, 45, 0.95);
        color: var(--dark-color);
    }
    
    .table thead th {
        background: var(--gradient-primary);
        color: white;
    }
    
    .table tbody td {
        color: var(--dark-color);
        border-color: var(--gray-300);
    }
    
    .table tbody tr:hover {
        background: rgba(46, 139, 87, 0.1);
    }
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only-focusable:active,
.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Skip Links */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Focus Indicators */
.focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--gray-300);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.error {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.error-message {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success States */
.success {
    border-color: var(--success-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.success-message {
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Warning States */
.warning {
    border-color: var(--warning-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25) !important;
}

.warning-message {
    color: var(--warning-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Info States */
.info {
    border-color: var(--info-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.25) !important;
}

.info-message {
    color: var(--info-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Utility Classes */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.text-justify { text-align: justify !important; }

.float-left { float: left !important; }
.float-right { float: right !important; }
.float-none { float: none !important; }

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive Images */
.img-responsive {
    max-width: 100%;
    height: auto;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

/* Text Utilities */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-break {
    word-wrap: break-word;
    word-break: break-word;
}

.text-nowrap {
    white-space: nowrap;
}

.text-wrap {
    white-space: normal;
}

/* Display Utilities */
.d-none { display: none !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block { display: block !important; }
.d-table { display: table !important; }
.d-table-row { display: table-row !important; }
.d-table-cell { display: table-cell !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }

/* Visibility Utilities */
.visible { visibility: visible !important; }
.invisible { visibility: hidden !important; }

/* Position Utilities */
.position-static { position: static !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

/* Z-Index Utilities */
.z-0 { z-index: 0 !important; }
.z-1 { z-index: 1 !important; }
.z-2 { z-index: 2 !important; }
.z-3 { z-index: 3 !important; }
.z-4 { z-index: 4 !important; }
.z-5 { z-index: 5 !important; }
.z-auto { z-index: auto !important; }

/* Overflow Utilities */
.overflow-auto { overflow: auto !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-visible { overflow: visible !important; }
.overflow-scroll { overflow: scroll !important; }

.overflow-x-auto { overflow-x: auto !important; }
.overflow-x-hidden { overflow-x: hidden !important; }
.overflow-x-visible { overflow-x: visible !important; }
.overflow-x-scroll { overflow-x: scroll !important; }

.overflow-y-auto { overflow-y: auto !important; }
.overflow-y-hidden { overflow-y: hidden !important; }
.overflow-y-visible { overflow-y: visible !important; }
.overflow-y-scroll { overflow-y: scroll !important; }

/* Cursor Utilities */
.cursor-auto { cursor: auto !important; }
.cursor-default { cursor: default !important; }
.cursor-pointer { cursor: pointer !important; }
.cursor-wait { cursor: wait !important; }
.cursor-text { cursor: text !important; }
.cursor-move { cursor: move !important; }
.cursor-help { cursor: help !important; }
.cursor-not-allowed { cursor: not-allowed !important; }

/* User Select Utilities */
.user-select-none { user-select: none !important; }
.user-select-text { user-select: text !important; }
.user-select-all { user-select: all !important; }
.user-select-auto { user-select: auto !important; }

/* Pointer Events Utilities */
.pointer-events-none { pointer-events: none !important; }
.pointer-events-auto { pointer-events: auto !important; }

/* Opacity Utilities */
.opacity-0 { opacity: 0 !important; }
.opacity-25 { opacity: 0.25 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-100 { opacity: 1 !important; }

/* Transform Utilities */
.transform { transform: translateZ(0) !important; }
.transform-gpu { transform: translate3d(0, 0, 0) !important; }
.transform-none { transform: none !important; }

/* Transition Utilities */
.transition-none { transition: none !important; }
.transition-all { transition: all var(--transition-normal) !important; }
.transition-fast { transition: all var(--transition-fast) !important; }
.transition-slow { transition: all var(--transition-slow) !important; }

/* Animation Utilities */
.animate-none { animation: none !important; }
.animate-spin { animation: spin 1s linear infinite !important; }
.animate-ping { animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite !important; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite !important; }
.animate-bounce { animation: bounce 1s infinite !important; }

/* Responsive Utilities */
@media (max-width: 768px) {
    .md\:hidden { display: none !important; }
    .md\:block { display: block !important; }
    .md\:flex { display: flex !important; }
    .md\:grid { display: grid !important; }
    
    .md\:flex-col { flex-direction: column !important; }
    .md\:flex-row { flex-direction: row !important; }
    
    .md\:text-sm { font-size: 0.875rem !important; }
    .md\:text-base { font-size: 1rem !important; }
    .md\:text-lg { font-size: 1.125rem !important; }
    
    .md\:p-sm { padding: var(--spacing-sm) !important; }
    .md\:p-md { padding: var(--spacing-md) !important; }
    .md\:p-lg { padding: var(--spacing-lg) !important; }
    
    .md\:m-sm { margin: var(--spacing-sm) !important; }
    .md\:m-md { margin: var(--spacing-md) !important; }
    .md\:m-lg { margin: var(--spacing-lg) !important; }
}

@media (max-width: 576px) {
    .sm\:hidden { display: none !important; }
    .sm\:block { display: block !important; }
    .sm\:flex { display: flex !important; }
    .sm\:grid { display: grid !important; }
    
    .sm\:flex-col { flex-direction: column !important; }
    .sm\:flex-row { flex-direction: row !important; }
    
    .sm\:text-xs { font-size: 0.75rem !important; }
    .sm\:text-sm { font-size: 0.875rem !important; }
    .sm\:text-base { font-size: 1rem !important; }
    
    .sm\:p-xs { padding: var(--spacing-xs) !important; }
    .sm\:p-sm { padding: var(--spacing-sm) !important; }
    .sm\:p-md { padding: var(--spacing-md) !important; }
    
    .sm\:m-xs { margin: var(--spacing-xs) !important; }
    .sm\:m-sm { margin: var(--spacing-sm) !important; }
    .sm\:m-md { margin: var(--spacing-md) !important; }
}
