/*
 * tool.css – Sdílený styl pro nástroje qeron.cz
 * Načítají ho všechny stránky pod /tools/
 */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --gray: #64748b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(15,23,42,.08);

    /* Stará proměnná ze starých tools – mapujeme na Qeron */
    --bg-color: var(--light);
    --card-bg: white;
    --text-color: var(--dark);
    --border-color: var(--border);
    --primary-color: var(--primary);
    --primary-hover: var(--primary-dark);
    --danger-color: #ef4444;
    --green: #16a34a;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--light);
    color: var(--dark);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── NAV (nav.js vygeneruje HTML, tool.css ho nastyluje) ── */
nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1140px; margin: 0 auto; padding: 0 24px; height: 64px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative;
}
.nav-logo { font-weight: 800; font-size: 1.3rem; color: var(--primary); text-decoration: none; letter-spacing: -.5px; flex-shrink: 0; }
.nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.nav-links > a { color: var(--gray); font-size: .9rem; font-weight: 600; text-decoration: none; transition: color .2s; white-space: nowrap; }
.nav-links > a:hover { color: var(--primary); }
.nav-cta {
    background: var(--primary); color: white !important; padding: 8px 20px;
    border-radius: 8px; font-weight: 600; font-size: .9rem; text-decoration: none;
    transition: background .2s; flex-shrink: 0; white-space: nowrap;
}
.nav-cta:hover { background: var(--primary-dark); }

/* Hamburger tlačítko */
.nav-hamburger {
    display: none; background: none; border: none; cursor: pointer;
    padding: 6px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; flex-shrink: 0;
}
.hamburger-line { display: block; width: 22px; height: 2px; background: var(--dark); border-radius: 2px; transition: all .25s; }
.nav-hamburger.open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media(max-width: 768px) {
    .nav-hamburger { display: flex; }
    .nav-links {
        display: none;
        position: absolute; top: 64px; left: 0; right: 0; z-index: 200;
        background: white; border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 24px rgba(0,0,0,.1);
        flex-direction: column; align-items: flex-start; gap: 0;
        margin: 0; padding: 6px 0;
    }
    .nav-links.open { display: flex; }
    .nav-links > a { padding: 11px 20px; width: 100%; }
    /* Dropdown v mobilu */
    .nav-dropdown { width: 100%; }
    .nav-dropdown-btn { padding: 11px 20px; width: 100%; justify-content: flex-start; }
    .nav-dropdown-menu { position: static !important; box-shadow: none !important; border: none !important; border-radius: 0 !important; margin: 0 !important; padding: 0 0 4px 0 !important; background: var(--light) !important; }
    .nav-dropdown-menu a { padding-left: 32px !important; }
    .nav-drop-section { padding-left: 32px !important; }
    .nav-drop-divider { margin: 4px 20px !important; }
    .nav-cta { padding: 7px 14px; font-size: .85rem; }
}

/* ── STRÁNKOVÝ LAYOUT ── */
.tool-wrapper {
    flex: 1;
    max-width: 900px; margin: 0 auto; padding: 40px 20px 48px; width: 100%;
}
@media(max-width: 480px) { .tool-wrapper { padding: 24px 12px 40px; } }

/* Záhlaví stránky */
.tool-page-header { margin-bottom: 28px; }
.tool-badge {
    display: inline-block; background: var(--primary-light); color: var(--primary);
    font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
}
.tool-page-header h1 {
    font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; letter-spacing: -.03em;
    color: var(--dark); line-height: 1.2; margin: 0 0 8px;
}
.tool-page-header p { font-size: .95rem; color: var(--gray); line-height: 1.65; margin: 0; }

/* ── HLAVNÍ KARTA NÁSTROJE ── */
/* Starý .container i nový .tool-card mají stejný styl */
.container,
.tool-card {
    background: white; border: 1px solid var(--border); border-radius: 16px;
    padding: 36px; box-shadow: var(--shadow); margin-bottom: 0 !important;
    width: 100%;
}
@media(max-width: 480px) {
    .container, .tool-card { padding: 22px 16px; border-radius: 12px; }
}

/* Nadpisy uvnitř karty */
.container h1,
.container h2,
.tool-card h1,
.tool-card h2 {
    font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em;
    margin: 0 0 22px; color: var(--dark); text-align: left;
}

/* ── BOXY ── */
.help-box,
.info-box,
.instructions {
    background: var(--primary-light); border-left: 3px solid var(--primary);
    border-radius: 8px; padding: 14px 16px; font-size: .88rem; line-height: 1.65;
    color: var(--dark-2); margin-bottom: 20px;
}
.help-box ol, .info-box ol, .instructions ol,
.help-box ul, .info-box ul, .instructions ul {
    margin: 0; padding-left: 18px;
}
.help-box li, .instructions li { margin-bottom: 5px; }

.warning-box,
.warn-box {
    background: #fffbeb; border-left: 3px solid #f59e0b;
    border-radius: 8px; padding: 14px 16px; font-size: .88rem; line-height: 1.65;
    color: #78350f; margin-bottom: 20px;
}

.alert-error {
    background: #fef2f2; border-left: 3px solid #ef4444;
    border-radius: 8px; padding: 12px 16px; font-size: .88rem; color: #991b1b;
    margin-bottom: 18px;
}

.alert-success {
    background: #f0fdf4; border-left: 3px solid #22c55e;
    border-radius: 8px; padding: 12px 16px; font-size: .88rem; color: #166534;
    margin-bottom: 18px;
}

/* Step indicator (příjemky) */
.step-indicator {
    display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600;
    color: var(--gray); margin-bottom: 22px; flex-wrap: wrap;
}
.step-indicator span {
    width: 26px; height: 26px; border-radius: 50%; background: var(--border);
    color: var(--gray); display: inline-flex; align-items: center; justify-content: center;
    font-size: .8rem; font-weight: 700;
}
.step-indicator span.active { background: var(--primary); color: white; }

/* Tag (inventura) */
.tag {
    background: var(--primary-light); color: var(--primary);
    padding: 2px 8px; border-radius: 4px; font-size: .82rem; font-weight: 600;
}

/* ── FORMULÁŘOVÉ PRVKY ── */
.form-group, .upload-box { margin-bottom: 16px; }
.upload-box { margin-bottom: 0; }

label {
    display: block; font-size: .875rem; font-weight: 600; color: var(--dark); margin-bottom: 6px;
}
.hint, small.hint {
    display: block; font-size: .78rem; color: var(--gray); margin-top: 5px; line-height: 1.45;
}

input[type="text"],
input[type="date"],
input[type="number"],
input[type="email"],
input[type="url"],
select,
textarea {
    width: 100%; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: 8px;
    font-size: .95rem; font-family: inherit; color: var(--dark); background: white;
    transition: border-color .2s, box-shadow .2s; outline: none; -webkit-appearance: none;
}
input[type="text"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

input[type="file"] {
    width: 100%; padding: 10px 12px;
    border: 1.5px dashed var(--border); border-radius: 8px;
    font-size: .88rem; color: var(--gray); background: var(--light); cursor: pointer;
    transition: border-color .2s; outline: none; font-family: inherit;
}
input[type="file"]:hover,
input[type="file"]:focus { border-color: var(--primary); }

/* Checkboxy – starý styl .checkbox-group i nový .check-group */
.checkbox-group,
.check-group,
.checkbox-container {
    background: var(--light); border: 1px solid var(--border); border-radius: 8px;
    padding: 13px 15px; margin-bottom: 12px;
}
.checkbox-group.danger,
.check-group.danger { border-left: 3px solid var(--danger-color); }
.checkbox-group label,
.check-group label,
.checkbox-container label {
    display: inline; font-weight: 600; cursor: pointer; margin-bottom: 0;
}
.checkbox-group input[type="checkbox"],
.check-group input[type="checkbox"],
.checkbox-container input[type="checkbox"] {
    width: auto; margin-right: 8px; accent-color: var(--primary); vertical-align: middle;
    transform: scale(1.15);
}

/* ── TLAČÍTKA ── */

/* Primární: submit */
button[type="submit"],
.btn-primary {
    display: block; width: 100%; padding: 13px;
    background: var(--primary); color: white;
    border: none; border-radius: 8px;
    font-size: 1rem; font-weight: 700; font-family: inherit; line-height: 1;
    cursor: pointer; text-align: center; text-decoration: none;
    transition: background .2s, transform .1s; margin-top: 12px;
}
button[type="submit"]:hover,
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); color: white; }

/* Sekundární: Začít znovu */
.btn-reset,
a.btn-reset {
    display: block; width: 100%; padding: 11px;
    background: transparent; color: var(--gray);
    border: 1px solid var(--border); border-radius: 8px;
    font-size: .9rem; font-weight: 600; font-family: inherit;
    cursor: pointer; text-align: center; text-decoration: none;
    transition: border-color .2s, color .2s; margin-top: 8px;
}
.btn-reset:hover,
a.btn-reset:hover { border-color: var(--primary); color: var(--primary); }

/* Link pro reload (inventura) */
a.reload-link {
    display: inline-block; margin-top: 14px; font-size: .9rem; color: var(--primary);
    text-decoration: none; font-weight: 600;
}
a.reload-link:hover { text-decoration: underline; }

/* ── SEO SEKCE ── */
.seo-text,
.seo-section {
    max-width: 720px; margin: 36px auto 0; padding: 0;
    color: var(--gray); font-size: .92rem; line-height: 1.7;
}
.seo-text h2,
.seo-section h2 { font-size: 1.05rem; font-weight: 700; color: var(--dark); margin-bottom: 8px; margin-top: 20px; }
.seo-text h2:first-child,
.seo-section h2:first-child { margin-top: 0; }
.seo-text p,
.seo-section p { margin-bottom: 10px; }

/* ── FOOTER ── */
footer.qeron-footer {
    background: var(--dark); color: #94a3b8; padding: 48px 24px 32px; margin-top: auto;
}
.footer-inner { max-width: 1140px; margin: 0 auto; }
.footer-top {
    display: flex; justify-content: space-between; align-items: flex-start;
    flex-wrap: wrap; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid #1e293b; margin-bottom: 24px;
}
.footer-brand { font-weight: 800; font-size: 1.2rem; color: white; letter-spacing: -.5px; }
.footer-brand p { font-size: .88rem; color: #64748b; margin-top: 8px; max-width: 260px; font-weight: 400; }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col h5 { color: white; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.footer-col a { display: block; color: #64748b; font-size: .88rem; text-decoration: none; margin-bottom: 8px; transition: color .2s; }
.footer-col a:hover { color: #60a5fa; }
.footer-col span { display: block; color: #64748b; font-size: .88rem; margin-bottom: 6px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: .82rem; color: #475569; margin: 0; }
@media(max-width: 768px) { .footer-top { flex-direction: column; } .footer-links { gap: 24px; } }

/* ── COOKIE BANNER ── */
#cookie-banner {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: white; border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0,0,0,.08);
    padding: 14px 24px; z-index: 9999; display: none;
}
.cookie-inner,
.cookie-container {
    max-width: 1140px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.cookie-inner p,
.cookie-container p { font-size: .9rem; color: var(--gray); margin: 0; }
.cookie-btns,
.cookie-buttons { display: flex; gap: 8px; flex-shrink: 0; }
.btn-cookie-decline,
.btn-cookie.btn-decline,
.btn-outline {
    padding: 8px 16px; border: 1px solid var(--border); background: white;
    color: var(--gray); border-radius: 6px; cursor: pointer; font-size: .88rem; font-family: inherit;
}
.btn-cookie-accept,
.btn-cookie.btn-accept,
.btn-accept {
    padding: 8px 16px; background: var(--primary); color: white; border: none;
    border-radius: 6px; cursor: pointer; font-size: .88rem; font-weight: 600; font-family: inherit;
}
.btn-cookie-accept:hover,
.btn-cookie.btn-accept:hover { background: var(--primary-dark); }

/* Reset link nahoře v containeru */
.btn-reset-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: #eff6ff;
    color: var(--primary);
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.btn-reset-sm:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.container-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.container-top h2 { margin: 0; }
