/* ============================================================================
   CSS RESET - Alnaql
   ============================================================================
   
   Foundational reset rules for consistent cross-browser rendering.
   This file normalizes browser defaults and sets up the base box model.
   
   ============================================================================ */

/* ========================================================================
   Universal Box Sizing
   ======================================================================== */

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


/* ========================================================================
   HTML & Body Base
   ======================================================================== */

html {
    height: 100%;
    /* Prevent font size adjustments on orientation change (iOS) */
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    height: 100%;
    overflow: hidden;  /* App controls its own scrolling */
    font-family: var(--font-primary);
    background: var(--color-surface-primary);
    color: var(--color-text-primary);
    /* Improve font rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ========================================================================
   Remove Default Styles
   ======================================================================== */

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

/* Remove default button styles */
button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    color: inherit;
}

/* Remove default link underlines */
a {
    text-decoration: none;
    color: inherit;
}

/* Remove default focus outline (we'll add custom ones in components) */
:focus {
    outline: none;
}

/* Accessible focus styles for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}


/* ========================================================================
   Typography Defaults
   ======================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-semibold);
}

p {
    margin: 0;
}


/* ========================================================================
   Form Elements
   ======================================================================== */

input,
textarea,
select {
    font: inherit;
    color: inherit;
}

/* Remove default appearance for form controls */
input[type="text"],
input[type="search"],
input[type="number"],
textarea,
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Remove spinner buttons from number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}


/* ========================================================================
   Images & Media
   ======================================================================== */

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}


/* ========================================================================
   Accessibility
   ======================================================================== */

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