/* ═══════════════════════════════════════════════════════════
   MyPeptideApp — Base Styles
   Reset, typography, and global element styles.
   ═══════════════════════════════════════════════════════════ */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text-primary);
    background-color: var(--color-bg-secondary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── Typography ───────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--weight-semibold);
    line-height: var(--leading-tight);
    color: var(--color-text-primary);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-md); }
h6 { font-size: var(--text-base); }

p {
    margin-bottom: var(--space-4);
    color: var(--color-text-secondary);
}

a {
    color: var(--color-text-link);
    text-decoration: none;
    transition: var(--transition-colors);
}

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

strong, b {
    font-weight: var(--weight-semibold);
}

small {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}

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

/* ─── Images ───────────────────────────────────────────── */
img, svg {
    display: block;
    max-width: 100%;
}

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

/* ─── Form Elements ────────────────────────────────────── */
input,
textarea,
select,
button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

/* Prevent mobile browser auto-zoom on input focus (requires >= 16px) */
@media (max-width: 768px) {
    input,
    textarea,
    select {
        font-size: 16px !important;
    }
}

input:focus,
textarea:focus,
select:focus,
button:focus {
    outline: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

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

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* ─── Selection ────────────────────────────────────────── */
::selection {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
}

/* ─── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-border-strong);
}

/* Scrollbar for dark mode */
[data-theme="dark"] {
    scrollbar-color: var(--color-border-strong) transparent;
}

/* ─── Utility: Visually Hidden ─────────────────────────── */
.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;
}

/* ─── Google Font Import ───────────────────────────────── */
/* Loaded via <link> in layout for performance */
