/* Clark Clinical Scribe - Shared Styles
   Common CSS for consistent styling across all pages */

@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --clark-mustard: rgb(255, 204, 0);
    --clark-mustard-light: rgba(255, 204, 0, 0.1);
    --clark-mustard-dark: rgb(230, 184, 0);
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --background: #ffffff;
    --background-light: #f8f9fa;
    --border: #e1e8ed;
    --shadow: rgba(0, 0, 0, 0.1);

    /* Typography System */
    --font-primary: "Schibsted Grotesk", -apple-system, "system-ui", "Segoe UI", Roboto, sans-serif;

    /* Type Scale */
    --type-scale-xs: 0.75rem;    /* 12px */
    --type-scale-sm: 0.875rem;   /* 14px */
    --type-scale-base: 1rem;     /* 16px */
    --type-scale-lg: 1.125rem;   /* 18px */
    --type-scale-xl: 1.25rem;    /* 20px */
    --type-scale-2xl: 1.75rem;   /* 28px */
    --type-scale-3xl: 2.5rem;    /* 40px */

    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-base: 1.5;
    --line-height-relaxed: 1.6;
    --line-height-loose: 1.8;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--background);
    color: var(--text-primary);
    line-height: var(--line-height-relaxed);
    font-size: var(--type-scale-base);
    padding-top: 140px; /* Space for fixed header with larger logo */
    padding-bottom: 80px; /* Space for fixed footer */
    min-height: 100vh;
}

/* Header Styles - Clare-inspired minimal design */
.header {
    background: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 120px;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    width: 100% !important;
}

.logo-container {
    display: flex;
    align-items: center;
}

.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-logo img,
.logo-container img,
.logo-light,
.logo-dark,
.header .logo-light,
.header .logo-dark,
.header img {
    height: 87.5px !important;
    width: auto !important;
}

/* Header Actions - Clare-inspired button styling */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-btn,
.logout-btn,
.login-btn,
button.logout-btn,
button.login-btn,
button.header-btn {
    background: transparent !important;
    color: #000000 !important;
    border: 2px solid var(--clark-mustard) !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: 25px !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 80px !important;
    font-family: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.header-btn:hover,
.logout-btn:hover,
.login-btn:hover,
button.logout-btn:hover,
button.login-btn:hover,
button.header-btn:hover {
    background: var(--clark-mustard) !important;
    color: white !important;
    transform: translateY(-1px) !important;
}

.header-btn:active,
.logout-btn:active,
.login-btn:active,
button.logout-btn:active,
button.login-btn:active,
button.header-btn:active {
    transform: translateY(0) !important;
}

/* Force black text color for header buttons */
.header .header-btn,
.header .logout-btn,
.header .login-btn,
.header button.logout-btn,
.header button.login-btn,
.header button.header-btn {
    color: #000000 !important;
}

/* Logo display rules */
.logo-light {
    display: block !important;
    height: 87.5px !important;
    width: auto !important;
}

.logo-dark {
    display: none !important;
    height: 87.5px !important;
    width: auto !important;
}

@media (prefers-color-scheme: dark) {
    .logo-light {
        display: block !important;
        height: 87.5px !important;
        width: auto !important;
    }

    .logo-dark {
        display: none !important;
        height: 87.5px !important;
        width: auto !important;
    }
}

/* Footer Styles - Fixed at bottom */
.footer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: var(--background) !important;
    padding: 12px 24px !important;
    border-top: 1px solid var(--border) !important;
    margin-top: 0 !important;
    z-index: 900 !important; /* Below header but above content */
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05) !important;
    width: 100% !important;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 12px;
    margin: 0;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none !important;
    font-size: 12px;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--clark-mustard);
    text-decoration: none !important;
}

/* Button Styles */
.btn,
.button,
.clark-button {
    background: var(--clark-mustard);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 25px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover,
.button:hover,
.clark-button:hover {
    background: var(--clark-mustard-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 204, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--clark-mustard);
    border: 2px solid var(--clark-mustard);
}

.btn-secondary:hover {
    background: var(--clark-mustard);
    color: white;
}

/* Container Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.content-section {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

a {
    color: var(--clark-mustard);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

/* Form Elements */
.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--clark-mustard);
    box-shadow: 0 0 0 3px var(--clark-mustard-light);
}

/* Card Styles */
.card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 204, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--clark-mustard);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 0.75rem 1rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .footer-links {
        justify-content: center;
    }

    .container {
        padding: 1rem;
    }

    .content-section {
        padding: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .btn,
    .button,
    .clark-button {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.25rem;
    }
}

/* CRITICAL: Force header logo size - must be at end of file for highest specificity */
header.header img,
header.header .logo-light,
header.header .logo-dark,
.header img.logo-light,
.header img.logo-dark {
    height: 87.5px !important;
    width: auto !important;
    max-height: 87.5px !important;
    min-height: 87.5px !important;
}