﻿
/* --- STREAK WIDGET --- */
.streak-widget {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 6px 14px;
    cursor: default;
    white-space: nowrap;
}

@media (max-width: 860px) {
    .streak-widget {
        padding: 5px 10px;
        font-size: 0.85em;
    }
}

:root {
    --bg: #f4f6fb;
    --card: #fff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 10px 30px rgba(0,0,0,.08);
    --brand: #2563eb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 18px;
}

.header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
}

/* brand (logo + title) */
.brand {
    display: flex;
    gap: 12px;
    align-items: center;
}

.logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.title {
    font-weight: 700;
}

.subtitle {
    color: var(--muted);
    font-size: 13px;
}

/* brand clickable, but NOT looking like link */
.brand-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

    .brand-link:visited {
        color: inherit;
    }

    .brand-link:hover .logo {
        filter: brightness(1.03);
    }

    .brand-link:focus-visible {
        outline: 3px solid rgba(37,99,235,.25);
        outline-offset: 6px;
        border-radius: 14px;
    }

/* nav base */
.nav {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

    .nav a {
        text-decoration: none;
        color: var(--brand);
        font-weight: 700;
    }

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
}

@media (max-width:720px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    box-shadow: var(--shadow);
}

    .card h2 {
        margin: 0 0 8px;
        font-size: 18px;
    }

    .card p {
        margin: 0;
        color: var(--muted);
    }

.list {
    display: grid;
    gap: 10px;
}

.row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.badge {
    background: #eef2ff;
    color: #3730a3;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
}

button {
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(0,0,0,.08);
}

    button.primary {
        background: var(--brand);
        color: #fff;
    }

    button.secondary {
        background: #e5e7eb;
        color: #111827;
    }

input, select {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
}

small {
    color: var(--muted);
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 14px 0;
}

/* ===== SETTINGS LAYOUT ===== */
.settings-card {
    max-width: 800px;
    margin: 20px auto;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .field label {
        font-weight: 600;
        font-size: 14px;
    }

.checkbox-field {
    justify-content: center;
}

.buttons-row {
    margin-top: 24px;
    gap: 12px;
}

/* Mobil */
@media (max-width: 720px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* --- NAV: dropdown groups --- */
.nav-dd {
    position: relative;
    display: inline-block;
}

    .nav-dd > summary {
        list-style: none;
        cursor: pointer;
        user-select: none;
        padding: 8px 10px;
        border-radius: 10px;
    }

        .nav-dd > summary::-webkit-details-marker {
            display: none;
        }

/* dropdown menu */
.nav-dd-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    z-index: 50;
}

    .nav-dd-menu a {
        display: block;
        padding: 10px 10px;
        border-radius: 10px;
        text-decoration: none;
    }

        .nav-dd-menu a:hover {
            background: rgba(0,0,0,0.06);
        }

/* --- NAV: hamburger on small screens --- */
.nav-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid rgba(0,0,0,0.15);
    background: #fff;
    border-radius: 12px;
    padding: 8px 10px;
    cursor: pointer;
}

@media (max-width: 860px) {
    .nav-toggle {
        display: inline-block;
    }

    .nav {
        display: none;
        width: 100%;
        margin-top: 10px;
        flex-direction: column;
        gap: 6px;
    }

        .nav.nav-open {
            display: flex;
        }

    .nav-dd {
        width: 100%;
    }

    .nav-dd-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0;
        margin-top: 6px;
    }

        .nav-dd-menu a {
            padding-left: 14px;
        }
}

/* --- NAV: primary action button (Studijní plán) --- */
.nav .nav-link.primary-nav {
    background: var(--brand);
    color: #fff;
    padding: 8px 16px;
    border-radius: 10px;
}

    .nav .nav-link.primary-nav:hover {
        background: #1d4ed8;
        color: #fff;
    }

    .nav .nav-link.primary-nav.active {
        background: #1e40af;
        color: #fff;
    }

/* --- NAV unified blue links --- */
.nav .nav-link,
.nav-dd > summary.nav-link {
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .nav .nav-link:hover,
    .nav-dd > summary.nav-link:hover {
        background: rgba(37, 99, 235, 0.10);
    }

/* caret (dropdown indicator) */
.nav-caret {
    font-size: 0.9em;
    transform: translateY(1px);
    opacity: 0.9;
}
/* when dropdown open: highlight + caret flips */
.nav-dd[open] > summary.nav-link {
    background: rgba(37, 99, 235, 0.12);
}

.nav-dd[open] .nav-caret {
    transform: translateY(1px) rotate(180deg);
}

/* --- NAV active state --- */
.nav .nav-link.active,
.nav-dd > summary.nav-link.active {
    background: rgba(37, 99, 235, 0.18);
    color: #1e40af;
}

    .nav .nav-link.active:hover,
    .nav-dd > summary.nav-link.active:hover {
        background: rgba(37, 99, 235, 0.22);
    }

/* header layout */
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* user dropdown */
.user-dd {
    position: relative;
    display: inline-block;
}

.user-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 600;
    color: var(--text);
}

    .user-summary::-webkit-details-marker {
        display: none;
    }

    .user-summary:hover {
        background: rgba(0,0,0,0.05);
    }

.user-dd-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    min-width: 160px;
    padding: 8px;
    z-index: 100;
}

    .user-dd-menu a {
        display: block;
        padding: 8px 10px;
        border-radius: 8px;
        text-decoration: none;
        color: var(--text);
    }

        .user-dd-menu a:hover {
            background: rgba(0,0,0,0.06);
        }

/* --- Training dropdown (only for Present/Past Simple) --- */
.train-dd-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 160px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 8px;
    z-index: 200;
}

    .train-dd-menu a {
        display: block;
        padding: 10px 10px;
        border-radius: 10px;
        text-decoration: none;
        color: var(--text);
        font-weight: 600;
    }

        .train-dd-menu a:hover {
            background: rgba(0,0,0,0.06);
        }

/* --- Header spacing: tighter gap between brand row and nav --- */
.header .container {
    padding-top: 10px;
    padding-bottom: 10px;
}

.header .nav {
    margin-top: 4px;
}

/* --- Vocab pack layout --- */
.vocab-grid {
    display: grid;
    gap: 10px;
}

.vocab-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
    border: 1px solid rgba(0,0,0,.06);
}

.vocab-cz {
    font-size: 16px;
}

.vocab-en {
    font-size: 16px;
    font-weight: 700;
    text-align: right;
}

/* mobil: EN pod CZ */
@media (max-width: 640px) {
    .vocab-row {
        grid-template-columns: 1fr;
    }

    .vocab-en {
        text-align: left;
    }
    .brand .title,
    .brand .subtitle {
        display: none;
    }
}

.linklike {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: inherit;
    text-align: left;
}

#brandToggle {
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
    cursor: pointer;
    text-align: left;
}
