/**
 * Theme Base Styles - Design Tokens & Reset
 * 
 * @package Checkout_Peak
 */

/* Design Tokens - CSS Variables */
:root {
    /* Colors (HSL Format) */
    --background: 0 0% 98%;
    --foreground: 0 0% 10%;
    --muted: 0 0% 95.3%;
    --muted-foreground: 0 0% 40%;
    --popover: 0 0% 100%;
    --popover-foreground: 0 0% 10%;
    --card: 0 0% 100%;
    --card-foreground: 0 0% 10%;
    --border: 0 0% 89.8%;
    --input: 0 0% 89.8%;
    --primary: 210 100% 40%;
    --primary-foreground: 0 0% 100%;
    --secondary: 0 0% 95.3%;
    --secondary-foreground: 0 0% 10%;
    --accent: 0 0% 95.3%;
    --accent-foreground: 0 0% 10%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 100%;
    --ring: 210 100% 40%;
    --radius: 0.75rem;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --background: 0 0% 10%;
        --foreground: 0 0% 98%;
        --muted: 0 0% 15%;
        --muted-foreground: 0 0% 60%;
        --popover: 0 0% 10%;
        --popover-foreground: 0 0% 98%;
        --card: 0 0% 10%;
        --card-foreground: 0 0% 98%;
        --border: 0 0% 20%;
   --input: 0 0% 20%;
        --primary: 210 100% 50%;
        --primary-foreground: 0 0% 10%;
        --secondary: 0 0% 15%;
        --secondary-foreground: 0 0% 98%;
        --accent: 0 0% 15%;
        --accent-foreground: 0 0% 98%;
        --ring: 210 100% 50%;
    }
}

/* Box Sizing Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Remove default margin & padding */
* {
    margin: 0;
    padding: 0;
}

/* Body Defaults */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: hsl(var(--foreground));
    background-color: hsl(var(--background));
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 600;
    color: hsl(var(--foreground));
}

/* Links */
a {
    color: hsl(var(--primary));
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: hsl(var(--primary) / 0.8);
}

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

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

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 768px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* 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-width: 0;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}
