/* ══════════════════════════════════════════════════════════════════════════
   AVA - Base Styles & CSS Reset
   ══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Prompt:wght@400;500;600;700&family=Sarabun:wght@400;500;600;700&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--neutral-700);
    background-color: var(--neutral-50);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--neutral-800);
    margin-bottom: var(--space-4);
}

h1 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

p {
    margin-bottom: var(--space-4);
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-700);
}

ul,
ol {
    list-style: none;
}

img,
video,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Form Elements */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

input,
textarea,
select {
    width: 100%;
    padding: var(--space-1) var(--space-2);
    /* Ultra-compact padding ~4px 8px */
    color: var(--neutral-700);
    background-color: white;
    font-size: var(--font-size-sm);
    /* 14px font for readability */
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.15);
}

input::placeholder {
    color: var(--neutral-400);
}

input:disabled,
textarea:disabled {
    background-color: var(--neutral-100);
    cursor: not-allowed;
    opacity: 0.7;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath fill='%234A5568' d='M5 7L1 2h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    padding-right: var(--space-8);
}

input[type="checkbox"],
input[type="radio"] {
    width: 1rem;
    height: 1rem;
    padding: 0;
    cursor: pointer;
    accent-color: var(--primary-600);
}

label {
    display: block;
    margin-bottom: var(--space-1);
    /* Reduced margin */
    font-size: var(--font-size-xs);
    /* Reduced font size */
    font-weight: var(--font-weight-medium);
}

button {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: var(--space-3) var(--space-4);
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: var(--radius-full);
}

::selection {
    background-color: var(--primary-200);
    color: var(--primary-900);
}

:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}