/**
 * style.css — змінні, reset, типографіка
 * clubmarket
 */

/* ══════════════════════════════════════════════
   КОЛЬОРОВІ ЗМІННІ
   ══════════════════════════════════════════════ */
:root {

    /* ── Основний синій ── */
    --c-primary:          #4b8ac9;
    --c-primary-dark:     #2d5f8a;   /* hover, active */
    --c-primary-darker:   #1a3a56;   /* card header bg */
    --c-primary-deep:     #0f2236;   /* card header gradient end */
    --c-primary-mid:      #3a7ab9;   /* card border gradient */
    --c-primary-light:    #d6e8f7;   /* light bg */
    --c-primary-soft:     #eaf3fb;   /* very light bg */
    --c-primary-text:     #2d6ca0;   /* text on light */

    /* ── Акцентний жовтий ── */
    --c-accent:           #ffc107;
    --c-accent-dark:      #e6a800;   /* hover */
    --c-accent-darker:    #cc8800;   /* active */
    --c-accent-light:     #fff3cd;   /* light bg */
    --c-accent-text:      #7a5200;   /* text on light */

    /* ── Виділення pills фільтром ── */
    --c-pill-filtered-bg:     #fff3cd;
    --c-pill-filtered-border: #ffc107;
    --c-pill-filtered-text:   #7a5200;

    /* ── Виділення рядка розкладу фільтром ── */
    --c-sched-match-bg:     #fff8e1;
    --c-sched-match-border: #ffc107;
    --c-sched-match-bar:    #ffc107;

    /* ── Нейтральні ── */
    --c-bg:           #f0f4f8;
    --c-surface:      #ffffff;
    --c-surface-2:    #f8fafc;
    --c-border:       #dde3ea;
    --c-border-dark:  #c5cfd8;
    --c-text:         #1a2637;
    --c-text-muted:   #5a6e82;
    --c-text-light:   #8fa4b8;

    /* ── Кнопки фільтрів (desktop) ── */
    --c-btn-filter-bg:         #f4f8fc;
    --c-btn-filter-border:     #c8daea;
    --c-btn-filter-text:       #2d6ca0;
    --c-btn-filter-hover-bg:   #e2eef8;
    --c-btn-filter-active-bg:  #4b8ac9;
    --c-btn-filter-active-text:#ffffff;

    /* ── Статус ── */
    --c-success:      #16a34a;
    --c-danger:       #dc2626;

    /* ── Шрифти ── */
    --font-sans:  'Mulish', 'Helvetica Neue', Arial, sans-serif;
    --font-mono:  'SF Mono', 'Fira Code', 'JetBrains Mono', ui-monospace, monospace;

    /* ── Розміри тексту ── */
    --text-xs:    0.7rem;
    --text-sm:    0.8rem;
    --text-base:  0.95rem;
    --text-md:    1.05rem;
    --text-lg:    1.2rem;
    --text-xl:    1.5rem;
    --text-2xl:   1.9rem;

    /* ── Відступи ── */
    --sp-1:  0.25rem;
    --sp-2:  0.5rem;
    --sp-3:  0.75rem;
    --sp-4:  1rem;
    --sp-5:  1.25rem;
    --sp-6:  1.5rem;
    --sp-8:  2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;

    /* ── Радіуси ── */
    --r-sm:   4px;
    --r-md:   8px;
    --r-lg:   12px;
    --r-xl:   16px;
    --r-2xl:  20px;
    --r-full: 9999px;

    /* ── Тіні ── */
    --shadow-sm:   0 1px 3px rgba(0,0,0,.07);
    --shadow-md:   0 4px 12px rgba(0,0,0,.10);
    --shadow-lg:   0 8px 24px rgba(0,0,0,.13);
    --shadow-card: 0 2px 8px rgba(75,138,201,.12), 0 0 0 1px rgba(75,138,201,.08);

    /* ── Transitions ── */
    --tr:      0.2s ease;
    --tr-slow: 0.35s ease;

    /* ── Header ── */
    --header-h: 64px;

    /* ── Sidebar фільтрів ── */
    --sidebar-w: 300px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.65;
    color: var(--c-text);
    background: var(--c-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--c-primary);
    text-decoration: none;
    transition: color var(--tr);
}
a:hover { color: var(--c-primary-dark); }

button { font-family: var(--font-sans); cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* ══════════════════════════════════════════════
   ТИПОГРАФІКА
   ══════════════════════════════════════════════ */
h1, h2, h3, h4 {
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.01em;
}
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); }

p { margin-bottom: var(--sp-3); }
p:last-child { margin-bottom: 0; }

/* ══════════════════════════════════════════════
   КНОПКИ (базові)
   ══════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-5);
    border-radius: var(--r-lg);
    font-size: var(--text-sm);
    font-weight: 700;
    line-height: 1;
    transition: background var(--tr), transform var(--tr), box-shadow var(--tr);
    white-space: nowrap;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--c-primary);
    color: #fff;
    border-color: var(--c-primary);
}
.btn-primary:hover {
    background: var(--c-primary-dark);
    border-color: var(--c-primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background: var(--c-accent);
    color: var(--c-accent-text);
    border-color: var(--c-accent);
    font-weight: 700;
}
.btn-accent:hover {
    background: var(--c-accent-dark);
    border-color: var(--c-accent-dark);
    transform: scale(1.04);
}

.btn-ghost {
    background: var(--c-surface-2);
    color: var(--c-text);
    border-color: var(--c-border);
}
.btn-ghost:hover {
    background: var(--c-primary-light);
    border-color: var(--c-primary);
    color: var(--c-primary);
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* ══════════════════════════════════════════════
   ІКОНКИ
   ══════════════════════════════════════════════ */
.icon-wrap { display: inline-flex; align-items: center; flex-shrink: 0; }
.icon {
    width: 16px; height: 16px;
    stroke: currentColor; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
    fill: none; vertical-align: middle;
}

/* ══════════════════════════════════════════════
   СКЕЛЕТОН
   ══════════════════════════════════════════════ */
@keyframes shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}
.skeleton {
    background: linear-gradient(90deg, var(--c-border) 25%, var(--c-surface-2) 50%, var(--c-border) 75%);
    background-size: 1200px 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: var(--r-md);
}

/* ══════════════════════════════════════════════
   УТИЛІТИ
   ══════════════════════════════════════════════ */
.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.text-muted  { color: var(--c-text-muted); }
.text-mono   { font-family: var(--font-mono); }
.text-sm     { font-size: var(--text-sm); }
.text-xs     { font-size: var(--text-xs); }

/* ══════════════════════════════════════════════
   DEV Badge
   ══════════════════════════════════════════════ */
.dev-badge {
    background: var(--c-accent);
    color: var(--c-text);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--r-sm);
    letter-spacing: 0.06em;
}
