/* ── Prova på-knapp ─────────────────────────────── */
.try-demo-btn {
    margin-top: 16px;
    padding: 10px 24px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
}
.try-demo-btn:hover {
    background: #217dbb;
}
/* ════════════════════════════════════════════════════
   capy-stilen.css  –  Delade stilar för Matte-Capyn
   v1.1 · 20260308
   ════════════════════════════════════════════════════ */

/* ── Variabler ─────────────────────────────────────── */
:root {
    --blue:    #2196f3;
    --blue-dk: #1565c0;
    --blue-lt: #e3f2fd;
    --green:   #4caf50;
    --red:     #f44336;
    --grey:    #90a4ae;
    --pink:    #e91e63;
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Body-bas ───────────────────────────────────────── */
body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    min-height: 100vh;
    padding: 15px;
    background: #f0f4f8;
    color: #333;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Site header shared styles */
.site-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    position: relative;
    padding: 10px;
}
.site-header .header-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 1200px;
    position: relative;
}
.site-header .header-banner-image {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: block;
    width: clamp(150px, 34vw, 320px);
    max-width: min(320px, 34vw);
    height: 60px;
    flex: 0 1 auto;
    object-fit: cover;
    object-position: center top;
    pointer-events: none;
}
.header-controls { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.register-btn {
    background: #fef3d0;
    color: #222;
    font-weight: 600;
    font-size: clamp(13px,2.2vw,15px);
    border: 2px solid #222;
    border-radius: 18px;
    padding: 6px 12px;
    margin-left: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s;
    height: 36px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 0 auto;
}
.menu-btn { background: #222; border: none; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.13); }
.user-menu { display: none; position: absolute; top: 54px; right: 0; background: white; box-shadow: 0 4px 16px rgba(0,0,0,0.13); border-radius: 12px; min-width: 200px; z-index: 100; text-align: left; }
.user-menu .menu-action { display: block; width: calc(100% - 24px); margin: 6px 12px; text-align: left; background: #fff; border: none; padding: 10px 16px; color: #222; font-weight: 700; font-size: 15px; cursor: pointer; border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,0.06); transition: background 0.15s; text-decoration: none; }
.user-menu a.menu-link { display: block; padding: 10px 16px; color: #222; text-decoration: none; font-weight: 700; font-size: 15px; border-radius: 8px; margin: 4px 12px; }

/* Active menu item styling */
.user-menu a.menu-link.active,
.user-menu .menu-action.active {
    background: var(--blue);
    color: white;
    box-shadow: none;
}

/* Make menu-link look flatter (no boxed button) */
.user-menu a.menu-link { background: transparent; box-shadow: none; }

/* Install modal fallback styles */
.install-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 10000;
}
.install-box {
    background: white; border-radius: 14px; padding: 18px; max-width: 420px; width: calc(100% - 48px); box-shadow: 0 12px 40px rgba(0,0,0,0.25); text-align: center;
}
.install-box h2 { margin: 6px 0 6px; color: #1f3a93; }
.install-box p { margin: 0 0 12px; color: #555; }
.install-close { position: absolute; right: 14px; top: 10px; background: transparent; border: none; font-size: 22px; cursor: pointer; }

/* Kontakt page-specific spacing to align header with index */
.kontakt-page .site-header { margin-top: 20px; }

/* Profile page: align header spacing with index/contact */
.profile-page .site-header { margin-top: 20px; }


/* ── NAV ────────────────────────────────────────────── */
.nav-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.btn-back {
    text-decoration: none;
    color: var(--blue);
    font-weight: bold;
    font-size: clamp(12px, 3.5vw, 14px);
    background: white;
    padding: 7px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    white-space: nowrap;
}
.nav-header h1 {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    color: #1a237e;
}

/* ── Låst skärm ─────────────────────────────────────── */
#locked-screen {
    display: none;
    max-width: 420px;
    margin: 40px auto;
    background: white;
    border-radius: 20px;
    padding: 35px 28px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
#locked-screen .lock-icon { font-size: 60px; margin-bottom: 10px; }
#locked-screen h2 { color: #c2185b; margin: 0 0 10px; }
#locked-screen p  { color: #666; line-height: 1.5; margin: 0; }
.pts-badge {
    display: inline-block;
    background: #fce4ec;
    color: #c2185b;
    font-weight: bold;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: clamp(15px, 4vw, 18px);
    margin: 14px 0;
}
.btn-go-home {
    display: inline-block;
    margin-top: 18px;
    background: var(--blue);
    color: white;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: bold;
    font-size: clamp(14px, 4vw, 15px);
}

/* ── Capy-bubbla ────────────────────────────────────── */
.capy-bubble,
.capy-helper {
    background: #efebe9;
    border-radius: 15px;
    padding: 11px 15px;
    margin-bottom: 14px;
    border: 2px solid #d7ccc8;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    transition: background 0.4s;
}
.capy-avatar { font-size: clamp(28px, 8vw, 40px); flex-shrink: 0; }
#capy-text {
    font-size: clamp(12px, 3.2vw, 15px);
    color: #5d4037;
    font-style: italic;
    font-weight: 500;
    margin: 0;
}

/* ── Tipsknapp (?) ──────────────────────────────────── */
.hint-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 14px;
    color: #7f8c8d;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    flex-shrink: 0;
    line-height: 1;
    font-family: inherit;
}
.hint-btn:hover { background: var(--blue); color: white; border-color: var(--blue); }

/* ── Poänglist ──────────────────────────────────────── */
.score-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 8px 14px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex-wrap: wrap;
    gap: 6px;
}
.score-bar .lbl  { font-size: clamp(10px, 2.5vw, 12px); color: #777; }
.score-bar .val  { font-size: clamp(15px, 4vw, 20px); font-weight: bold; color: var(--blue); }
.score-bar .val-red  { color: var(--red); }
.score-bar .val-time { color: #7c3aed; }
/* ── Skicka-in-raden ────────────────────────────────
 * REGEL: .action-row ska ALDRIG ha position:sticky.
 * Knappen ska stå längst ner på sidan i normalt flöde.
 * ──────────────────────────────────────────────────── */
.action-row {
    display: flex;
    margin-top: 16px;
}
.btn-check {
    flex: 1;
    padding: 14px;
    background: var(--green);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: clamp(14px, 4vw, 16px);
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: 0.15s;
    font-family: inherit;
}
.btn-check:active { transform: scale(0.98); }
/* ── Vinstoverlay ───────────────────────────────────── */
#win-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
#win-overlay.show { display: flex; }
.win-box {
    background: white;
    border-radius: 20px;
    padding: clamp(20px, 5vw, 30px) clamp(16px, 5vw, 24px);
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: capyPopIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes capyPopIn {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
.win-box h2  { color: var(--blue); font-size: clamp(1.2rem, 5vw, 1.6rem); margin: 0 0 6px; }
.win-stars   { font-size: clamp(28px, 8vw, 36px); letter-spacing: 4px; margin: 8px 0 16px; }
.win-stat    { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: clamp(13px, 3.5vw, 15px); }
.win-stat:last-of-type { border-bottom: none; }
.win-stat .k { color: #777; }
.win-stat .v { font-weight: bold; color: #333; }
.win-actions { display: flex; gap: 10px; margin-top: 18px; }
.win-actions button {
    flex: 1;
    padding: clamp(10px, 3vw, 13px);
    border: none;
    border-radius: 10px;
    font-size: clamp(13px, 3.8vw, 15px);
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}
.btn-replay { background: var(--blue); color: white; }
.btn-home   { background: #eee; color: #333; }
.btn-replay:active,
.btn-home:active { transform: scale(0.97); }

/* ── Kakor / samtyckesbanner ────────────────────────── */
#cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 400;
    display: flex;
    justify-content: center;
    padding: 0 12px 0;
    pointer-events: none;
}
#cookie-banner.cookie-hidden { display: none; }
.cookie-box {
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.13);
    padding: 16px 20px 18px;
    max-width: 520px;
    width: 100%;
    pointer-events: all;
    animation: cookieSlideUp 0.35s cubic-bezier(0.34,1.26,0.64,1);
}
@keyframes cookieSlideUp {
    from { transform: translateY(110%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.cookie-box h3 {
    font-size: 14px;
    color: #5d4037;
    font-weight: bold;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cookie-box p {
    font-size: 12.5px;
    color: #666;
    line-height: 1.55;
    margin: 0 0 12px;
}
.cookie-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}
.btn-cookie-more {
    flex: 1;
    background: none;
    border: none;
    font-size: 12px;
    color: var(--blue);
    cursor: pointer;
    text-align: left;
    padding: 0;
    font-family: inherit;
    text-decoration: underline;
}
.btn-cookie-decline {
    padding: 8px 16px;
    border: 1.5px solid #ddd;
    background: white;
    border-radius: 20px;
    font-size: 12.5px;
    cursor: pointer;
    color: #666;
    font-family: inherit;
    transition: 0.15s;
    white-space: nowrap;
}
.btn-cookie-decline:hover { border-color: #aaa; color: #333; }
.btn-cookie-accept {
    padding: 8px 20px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    transition: 0.15s;
    white-space: nowrap;
}
.btn-cookie-accept:active { transform: scale(0.97); }
.cookie-detail {
    font-size: 11.5px;
    color: #888;
    line-height: 1.5;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 10px;
    display: none;
}
.cookie-detail.open { display: block; }

/* Liten inställningsknapp som syns efter val gjorts */
#cookie-settings-btn {
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 300;
    background: white;
    border: 1.5px solid #e0e0e0;
    border-radius: 20px;
    padding: 5px 11px;
    font-size: 11px;
    color: #aaa;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: none;
    font-family: inherit;
    transition: 0.15s;
}
#cookie-settings-btn:hover { color: #555; box-shadow: 0 2px 14px rgba(0,0,0,0.14); }
