/* CSS Variables and Base Styles */

:root {
    /* Colors */
    --primary-blue: #006AA7;
    --primary-blue-dark: #005580;
    --primary-blue-light: #E6F2F8;
    --success-green: #2E8B57;
    --success-green-light: #E8F5E9;
    --error-red: #DC3545;
    --error-red-light: #FFEBEE;
    --warning-yellow: #FFC107;
    --warning-yellow-light: #FFF9E6;

    /* Neutrals */
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-gray: #E9ECEF;
    --text-primary: #212529;
    --text-secondary: #6C757D;
    --border-color: #DEE2E6;

    /* Swedish accent colors */
    --swedish-blue: #006AA7;
    --swedish-yellow: #FECC00;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Border radius */
    --border-radius: 4px;
    --border-radius-lg: 8px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
}

/* CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    line-height: 1.5;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }

p {
    margin: 0;
}

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

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

/* Lists */
ul, ol {
    list-style: none;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
}

/* Buttons reset */
button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Input reset */
input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

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

.text-muted { color: var(--text-secondary); }
.text-success { color: var(--success-green); }
.text-error { color: var(--error-red); }
.text-warning { color: var(--warning-yellow); }

.bg-success { background-color: var(--success-green-light); }
.bg-error { background-color: var(--error-red-light); }
.bg-warning { background-color: var(--warning-yellow-light); }

.font-bold { font-weight: 600; }
.font-normal { font-weight: 400; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* Screen reader only */
.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;
}
