/* BiomAPI Base Styles - Foundation & CSS Variables */

/* ===== CSS CUSTOM PROPERTIES (VARIABLES) ===== */
:root {
    /* Color Palette */
    --color-primary: #667eea;
    --color-primary-dark: #4f46e5;
    --color-secondary: #764ba2;
    --color-success: #10b981;
    --color-success-dark: #059669;
    --color-warning: #ffc107;
    --color-danger: #dc3545;
    --color-info: #17a2b8;

    /* Text Colors */
    --color-text-dark: #374151;
    --color-text-muted: #6b7280;
    --color-text-light: #9ca3af;

    /* Background Colors */
    --color-bg-light: #f8f9fa;
    --color-bg-muted: #e5e7eb;
    --color-bg-white: #ffffff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-purple-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* Border Radius */
    --border-radius-sm: 0.5rem;
    --border-radius-md: 0.75rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.25rem;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(31, 38, 135, 0.37);
    --shadow-primary: 0 4px 15px rgba(102, 126, 234, 0.4);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
}

/* ===== BASE ELEMENT RESETS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    min-height: 100vh;
    /* Lighter muted grayish purple-blue for better contrast with black status bar */
    background: #8b85d1;
}

body {
    position: relative;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--color-text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    padding: var(--spacing-xl) 0;
    /* Lighter muted grayish purple-blue for better contrast with black status bar */
    background: #8b85d1;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--color-text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

/* ===== TEXT UTILITY CLASSES ===== */
.text-purple {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-muted {
    color: var(--color-text-muted) !important;
}

.text-light {
    color: var(--color-text-light) !important;
}

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

::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* ===== SELECTION ===== */
::selection {
    background-color: rgba(102, 126, 234, 0.3);
    color: var(--color-text-dark);
}

::-moz-selection {
    background-color: rgba(102, 126, 234, 0.3);
    color: var(--color-text-dark);
}

/* ===== FOCUS OUTLINE ===== */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */
/* Breakpoints defined via media queries:
   - Mobile: < 576px
   - Tablet: 576px - 991px
   - Desktop: > 992px
*/

/* ===== UTILITY CLASSES ===== */
.container-fluid {
    width: 100%;
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

/* Flexbox utilities */
.d-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }

/* Spacing utilities */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }

.p-0 { padding: 0 !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

/* Display utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }

/* Text alignment */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

/* Visibility */
.invisible { visibility: hidden !important; }
.visible { visibility: visible !important; }

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: var(--spacing-sm);
        padding-right: var(--spacing-sm);
    }

    /* Prevent Safari auto-zoom on focus by ensuring 16px minimum font size */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}
