/* ═══════════════════════════════════════════════════════════════════
   PUJMO.COM — Cookie consent banner (GDPR)
   Three-stage: first popup → settings modal → reopen icon
   ═══════════════════════════════════════════════════════════════════ */

/* ══ Wrapper ══ */
#pj-cookie-banner,
#pj-cookie-banner *,
#pj-cookie-banner *::before,
#pj-cookie-banner *::after {
    box-sizing: border-box;
}
#pj-cookie-banner {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Anti-overflow safety bumper (kritické pre úzke mobily) ── */
#pj-cookie-banner .pjc-first-inner,
#pj-cookie-banner .pjc-modal-inner {
    max-width: calc(100vw - 24px);  /* nikdy nepretiekne, vždy 12px gap z oboch strán */
}
#pj-cookie-banner .pjc-cat-header,
#pj-cookie-banner .pjc-first-buttons,
#pj-cookie-banner .pjc-footer-buttons {
    min-width: 0;
}
#pj-cookie-banner .pjc-cat-header > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
    overflow-wrap: break-word;
}
#pj-cookie-banner h3,
#pj-cookie-banner p,
#pj-cookie-banner .pjc-cat-desc,
#pj-cookie-banner .pjc-cat-header strong {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ══ Overlay ══ */
.pjc-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,10,20,0.55); z-index: 99998;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* ══ PRVNÍ BANNER – centrovaný panel ══ */
.pjc-first {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.pjc-first-inner {
    background: #fff; border-radius: 14px;
    box-shadow: 0 10px 48px rgba(10,10,20,0.22);
    padding: 36px 36px 30px;
    max-width: 600px; width: 100%;
    text-align: center;
    position: relative; z-index: 1;
}
.pjc-first-icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #fff; font-size: 30px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
    box-shadow: 0 8px 24px rgba(22,163,74,0.30);
}
.pjc-first-inner h3 {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 20px; font-weight: 800; color: #0a0a14;
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}
.pjc-first-inner p {
    font-size: 14px; color: #4b5563; line-height: 1.7;
    margin: 0 0 26px;
}
.pjc-first-inner p a {
    color: #15803d; text-decoration: underline; font-weight: 600;
}
.pjc-first-inner p a:hover { color: #166534; }
.pjc-first-buttons {
    display: flex; gap: 8px; justify-content: center; flex-wrap: nowrap;
}

/* ══ Buttons ══ */
.pjc-btn {
    padding: 10px 14px; border-radius: 8px; border: none; cursor: pointer;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.03em;
    transition: background .18s, transform .12s, box-shadow .18s;
    white-space: nowrap; line-height: 1.4;
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
.pjc-btn:hover { transform: translateY(-1px); }

.pjc-btn-accept {
    background: #16a34a !important; color: #fff !important; border: none !important;
}
.pjc-btn-accept:hover {
    background: #15803d !important;
    box-shadow: 0 6px 18px rgba(22,163,74,0.35);
}

.pjc-btn-reject {
    background: transparent !important;
    border: 1px solid #d1d5db !important;
    color: #4b5563 !important;
}
.pjc-btn-reject:hover {
    border-color: #6b7280 !important; color: #1a1a2e !important;
}
.pjc-btn-reject-modal { color: #4b5563 !important; border-color: #d1d5db !important; }
.pjc-btn-reject-modal:hover { color: #1a1a2e !important; border-color: #6b7280 !important; }

.pjc-btn-settings {
    background: #0a0a14 !important; color: #fff !important; border: none !important;
}
.pjc-btn-settings:hover {
    background: #1a1a2e !important;
    box-shadow: 0 6px 18px rgba(10,10,20,0.30);
}
.pjc-btn-save {
    background: #0a0a14 !important; color: #fff !important;
    border: 1px solid transparent !important;
}
.pjc-btn-save:hover {
    background: #1a1a2e !important;
    box-shadow: 0 6px 18px rgba(10,10,20,0.30);
}

/* ══ Settings Modal ══ */
.pjc-modal {
    position: fixed; inset: 0; z-index: 100000;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.pjc-modal-inner {
    background: #fff; border-radius: 14px;
    box-shadow: 0 12px 48px rgba(10,10,20,0.28);
    width: 100%; max-width: 640px;
    max-height: 88vh; overflow-y: auto;
    display: flex; flex-direction: column;
}
.pjc-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 26px 16px; border-bottom: 1px solid #e5e7eb;
    position: sticky; top: 0; background: #fff; z-index: 1;
}
.pjc-modal-header h2 {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px; font-weight: 800; color: #0a0a14; margin: 0;
    text-transform: uppercase; letter-spacing: -0.005em;
    display: flex; align-items: center; gap: 8px;
}
.pjc-modal-header .pjc-icon-shield {
    font-size: 20px;
}
.pjc-modal-close {
    background: none !important; border: none !important;
    font-size: 28px; color: #9ca3af; cursor: pointer;
    line-height: 1; padding: 0 4px; font-weight: 300;
    transition: color .15s;
}
.pjc-modal-close:hover { color: #0a0a14; }
.pjc-modal-body { padding: 20px 26px; flex: 1; }
.pjc-modal-footer {
    display: flex; flex-direction: column; gap: 10px;
    padding: 14px 26px 20px; border-top: 1px solid #e5e7eb;
    position: sticky; bottom: 0; background: #fff;
}
.pjc-footer-buttons {
    display: flex; gap: 8px; justify-content: flex-end; flex-wrap: nowrap;
}
.pjc-footer-buttons .pjc-btn { padding: 10px 12px; font-size: 11.5px; }

/* Vymazat souhlasy */
.pjc-btn-reset {
    background: none !important; border: none !important;
    color: #9ca3af; font-size: 12px; cursor: pointer;
    padding: 6px 2px; font-family: inherit;
    transition: color .18s; white-space: nowrap;
    text-transform: none; letter-spacing: 0;
}
.pjc-btn-reset:hover { color: #ef4444; }

/* ══ Categories ══ */
.pjc-category {
    border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 14px 16px; margin-bottom: 12px;
    background: #f9fafb;
}
.pjc-cat-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;
    gap: 12px;
}
.pjc-cat-header strong {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px; color: #0a0a14;
    text-transform: uppercase; letter-spacing: 0.02em;
}
.pjc-cat-desc { font-size: 13px; color: #6b7280; line-height: 1.55; margin: 0; }
.pjc-cat-desc em { font-size: 12px; color: #9ca3af; }

.pjc-badge {
    display: inline-block; font-size: 10px; font-weight: 700;
    padding: 2px 8px; border-radius: 20px; margin-left: 8px; vertical-align: middle;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.pjc-badge-always { background: #dcfce7; color: #15803d; }
.pjc-badge:not(.pjc-badge-always) { background: #f3f4f6; color: #6b7280; }

/* ══ Toggle ══ */
.pjc-toggle {
    position: relative; width: 48px; height: 28px; flex-shrink: 0;
    background: #d1d5db; border-radius: 28px;
    cursor: pointer; transition: background .22s; outline: none;
}
.pjc-toggle:focus-visible { box-shadow: 0 0 0 3px rgba(22,163,74,0.35); }
.pjc-toggle-knob {
    position: absolute; top: 4px; left: 4px;
    width: 20px; height: 20px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 4px rgba(10,10,20,0.25);
    transition: transform .22s; pointer-events: none;
}
.pjc-toggle.pjc-toggle-on { background: #16a34a; }
.pjc-toggle.pjc-toggle-on .pjc-toggle-knob { transform: translateX(20px); }
.pjc-toggle.pjc-toggle-locked { background: #15803d; cursor: default; opacity: .85; }
.pjc-toggle.pjc-toggle-locked .pjc-toggle-knob { transform: translateX(20px); }

/* ══ Reopen button ══ */
#pjc-reopen-btn {
    position: fixed; bottom: 18px; left: 18px; z-index: 9990;
    background: #16a34a; color: #fff;
    border: none !important; border-radius: 50%;
    width: 50px; height: 50px; font-size: 22px; cursor: pointer;
    display: none; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(22,163,74,0.45);
    transition: transform .18s, box-shadow .18s, background .18s;
    line-height: 1;
}
#pjc-reopen-btn:hover {
    transform: scale(1.12);
    background: #15803d;
    box-shadow: 0 6px 22px rgba(22,163,74,0.55);
}

/* ══ Responsive — tablet (do 768px) ══ */
@media (max-width: 768px) {
    .pjc-first { padding: 12px; }
    .pjc-first-inner { padding: 24px 18px 20px; max-width: 100%; }
    .pjc-first-buttons { flex-direction: column; gap: 8px; }
    .pjc-first-buttons .pjc-btn { width: 100%; text-align: center; padding: 12px 14px; font-size: 13px; }

    .pjc-modal { padding: 10px; }
    .pjc-modal-inner { max-width: 100%; max-height: 92vh; max-height: 92dvh; }
    .pjc-modal-header { padding: 16px 18px 12px; }
    .pjc-modal-header h2 { font-size: 14px; }
    .pjc-modal-body { padding: 14px 18px; }
    .pjc-modal-footer { padding: 12px 18px 16px; }
    .pjc-footer-buttons { flex-direction: column; gap: 8px; }
    .pjc-footer-buttons .pjc-btn { width: 100%; flex: 1 1 100%; min-width: 0; text-align: center; padding: 12px 14px; font-size: 13px; }
    .pjc-btn-reset { text-align: center; align-self: center; margin-top: 4px; }
    #pjc-reopen-btn { width: 44px; height: 44px; font-size: 18px; bottom: 14px; left: 14px; }
}

/* ══ Responsive — malé/stredné telefóny (do 480px) ══ */
@media (max-width: 480px) {
    .pjc-first { padding: 8px; }
    .pjc-first-inner { padding: 20px 14px 18px; border-radius: 12px; }
    .pjc-first-icon { width: 52px; height: 52px; font-size: 24px; margin-bottom: 14px; }
    .pjc-first-inner h3 { font-size: 17px; margin-bottom: 10px; }
    .pjc-first-inner p { font-size: 13px; margin-bottom: 20px; line-height: 1.55; }
    .pjc-first-buttons .pjc-btn { padding: 11px 12px; font-size: 12px; }

    .pjc-modal { padding: 6px; }
    .pjc-modal-inner { border-radius: 12px; max-height: 96vh; max-height: 96dvh; }
    .pjc-modal-header { padding: 14px 16px 10px; }
    .pjc-modal-body { padding: 12px 16px; }
    .pjc-category { padding: 12px 14px; }
    .pjc-cat-header strong { font-size: 13px; }
    .pjc-cat-desc { font-size: 12px; }
}
