/* =============================================================
   LEAVE IT TO THE WORLD — modal za pisanje poruke
   Ide uz style.css, ne umesto njega.
   ============================================================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: auto;
}
.modal-overlay.is-open { display: flex; }

.modal-card {
    width: 100%;
    max-width: 640px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 26px;
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    touch-action: auto;              /* skrolovanje unutar modala radi */
}

.step-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    color: #7dd3fc;
}
.step-sub {
    margin: 6px 0 20px;
    font-size: 0.82rem;
    text-align: center;
    color: #94a3b8;
}

/* ---------- Izbor stila ---------- */

.plan {
    position: relative;
    display: block;
    width: 100%;
    margin-bottom: 14px;
    padding: 18px 20px;
    text-align: left;
    font-family: inherit;
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.plan:hover { transform: translateY(-2px); }
.plan:focus-visible { outline: 2px solid #38bdf8; outline-offset: 3px; }

.plan-popular { border-color: rgba(56, 189, 248, 0.55); }
.plan-popular:hover { border-color: #38bdf8; }
.plan-legend  { border-color: rgba(245, 158, 11, 0.6); }
.plan-legend:hover { border-color: #f59e0b; }

.plan-price {
    position: absolute;
    top: -11px;
    right: 16px;
    padding: 3px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #0f172a;
    background: #38bdf8;
    border-radius: 12px;
}
.plan-legend .plan-price { background: #fbbf24; }

.plan-name { display: block; font-size: 1.05rem; font-weight: 700; }
.plan-desc { display: block; margin-top: 4px; font-size: 0.82rem; color: #94a3b8; }

/* ---------- Preview ---------- */

.preview-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    margin-bottom: 18px;
    padding: 20px 12px;
    background:
        radial-gradient(ellipse at center, rgba(56, 189, 248, 0.08), transparent 70%),
        rgba(2, 6, 23, 0.6);
    border: 1px dashed rgba(148, 163, 184, 0.2);
    border-radius: 14px;
}
/* Kartica u preview-u nije apsolutno pozicionirana kao na zidu */
.preview-stage .card {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    flex-shrink: 0;
}
/* Skaliranje racuna JS iz stvarne sirine prozorceta — ranije je bilo
   fiksno pa su Legend kartici ispadale odsecene ivice. */
.preview-scaler {
    transform-origin: center center;
    transition: height 0.15s ease;
}
@media (max-width: 640px) {
    .preview-stage { min-height: 160px; padding: 16px 8px; }
}

/* ---------- Polja ---------- */

.field { margin-bottom: 14px; }
.field label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.78rem;
    color: #94a3b8;
    letter-spacing: 0.4px;
}
.count { color: #64748b; font-variant-numeric: tabular-nums; }
.count.is-full { color: #fbbf24; }

.field textarea,
.field input[type="text"],
.field select {
    width: 100%;
    padding: 11px 12px;
    font-family: inherit;
    font-size: 0.95rem;
    color: #f1f5f9;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 9px;
    resize: none;
    touch-action: auto;
}
.field textarea:focus,
.field input:focus,
.field select:focus {
    outline: none;
    border-color: #38bdf8;
}

.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }
.field-colour { max-width: 120px; }
.field-colour input[type="color"] {
    width: 100%;
    height: 43px;
    padding: 4px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 9px;
    cursor: pointer;
}

/* ---------- Ramovi ---------- */

.frames { display: flex; flex-wrap: wrap; gap: 8px; }
.frame-pick {
    padding: 8px 14px;
    font-family: inherit;
    font-size: 0.82rem;
    color: #cbd5e1;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 20px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.frame-pick:hover { border-color: #64748b; }
.frame-pick.is-on {
    color: #0f172a;
    background: #fbbf24;
    border-color: #fbbf24;
    font-weight: 600;
}

/* ---------- Ostalo ---------- */

.check {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 4px 0 18px;
    font-size: 0.85rem;
    color: #cbd5e1;
    cursor: pointer;
}
.check input { width: 16px; height: 16px; accent-color: #38bdf8; cursor: pointer; }

.form-error {
    margin-bottom: 12px;
    padding: 10px 12px;
    font-size: 0.82rem;
    color: #fecaca;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.4);
    border-radius: 9px;
}

.btn-continue {
    width: 100%;
    padding: 15px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    background: #38bdf8;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.btn-continue:hover:not(:disabled) { background: #7dd3fc; }
.btn-continue:disabled { opacity: 0.45; cursor: not-allowed; }

.fine-print {
    margin-top: 12px;
    font-size: 0.72rem;
    line-height: 1.5;
    text-align: center;
    color: #64748b;
}

.modal-close, .step-back {
    font-family: inherit;
    font-size: 0.85rem;
    color: #94a3b8;
    background: transparent;
    border: none;
    cursor: pointer;
}
.modal-close {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 12px;
}
.modal-close:hover, .step-back:hover { color: #f1f5f9; }
.step-back { margin-bottom: 10px; }

/* ---------- Placanje ---------- */

#paypalButtons { min-height: 52px; margin-bottom: 12px; }

.btn-promo {
    width: 100%;
    padding: 13px;
    font-family: inherit;
    font-size: 0.88rem;
    color: #cbd5e1;
    background: transparent;
    border: 1px dashed rgba(148, 163, 184, 0.45);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.btn-promo:hover { color: #f1f5f9; border-color: rgba(148, 163, 184, 0.8); }
.btn-promo:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- Gotovo ---------- */

.modal-done { text-align: center; }

.done-mark {
    width: 62px;
    height: 62px;
    margin: 4px auto 16px;
    font-size: 30px;
    line-height: 62px;
    color: #0f172a;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 26px rgba(34, 197, 94, 0.5);
}

.done-link { display: flex; gap: 8px; margin: 18px 0 6px; }
.done-link input {
    flex: 1;
    min-width: 0;
    padding: 11px 12px;
    font-family: 'Fira Code', monospace;
    font-size: 0.76rem;
    color: #cbd5e1;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 9px;
}
.done-link button {
    padding: 11px 18px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    background: #7dd3fc;
    border: none;
    border-radius: 9px;
    cursor: pointer;
}
.done-link button.is-copied { background: #22c55e; }

.modal-done .btn-continue { margin-top: 18px; }

/* =============================================================
   Panel kartice — otvara se dodirom na karticu na zidu
   ============================================================= */

.panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.panel-overlay.is-open { display: flex; }

@media (min-width: 641px) {
    .panel-overlay { align-items: center; }
}

.panel-box {
    width: 100%;
    max-width: 430px;
    padding: 22px;
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    touch-action: auto;
}

.panel-rank {
    font-size: 0.72rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #7dd3fc;
    margin-bottom: 10px;
}
.panel-text {
    font-size: 1.02rem;
    line-height: 1.4;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: #f1f5f9;
    margin-bottom: 6px;
}
.panel-author { font-size: 0.8rem; color: #94a3b8; margin-bottom: 18px; }

.panel-boost {
    width: 100%;
    padding: 14px;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    background: #38bdf8;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}
.panel-boost:hover:not(:disabled) { background: #7dd3fc; }
.panel-boost:disabled { opacity: 0.4; cursor: not-allowed; }

.panel-hint {
    margin: 9px 0 16px;
    font-size: 0.72rem;
    line-height: 1.5;
    color: #64748b;
    text-align: center;
}

.panel-link { display: flex; gap: 8px; margin-bottom: 12px; }
.panel-link input {
    flex: 1;
    min-width: 0;
    padding: 10px 11px;
    font-family: 'Fira Code', monospace;
    font-size: 0.72rem;
    color: #cbd5e1;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 9px;
}
.panel-link button {
    padding: 10px 16px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
    background: #7dd3fc;
    border: none;
    border-radius: 9px;
    cursor: pointer;
}

.panel-msg {
    margin-bottom: 12px;
    padding: 10px 12px;
    font-size: 0.82rem;
    text-align: center;
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: 9px;
}
.panel-msg.is-bad {
    color: #fecaca;
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(248, 113, 113, 0.4);
}

.panel-report {
    display: flex;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}
.panel-report select {
    flex: 1;
    min-width: 0;
    padding: 9px 10px;
    font-family: inherit;
    font-size: 0.8rem;
    color: #cbd5e1;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 9px;
}
.panel-report button {
    padding: 9px 16px;
    font-family: inherit;
    font-size: 0.8rem;
    color: #cbd5e1;
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 9px;
    cursor: pointer;
}
.panel-report button:hover { color: #fecaca; border-color: rgba(248, 113, 113, 0.6); }

.panel-close {
    width: 100%;
    margin-top: 14px;
    padding: 11px;
    font-family: inherit;
    font-size: 0.85rem;
    color: #94a3b8;
    background: transparent;
    border: none;
    cursor: pointer;
}
.panel-close:hover { color: #f1f5f9; }

/* Kartica na zidu se moze kliknuti */
.card { cursor: pointer; }

/* ---------- Saglasnost pre placanja ---------- */

.check-consent {
    align-items: flex-start;
    gap: 11px;
    margin: 4px 0 16px;
    padding: 13px 14px;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 10px;
}
.check-consent input { flex-shrink: 0; margin-top: 2px; }
.check-consent.is-missing {
    border-color: rgba(248, 113, 113, 0.6);
    background: rgba(220, 38, 38, 0.1);
}

.fine-print a { color: #7dd3fc; text-decoration: underline; }
.fine-print a:hover { color: #bae6fd; }

/* ---------- Pravni linkovi u uglu zida ---------- */

.wall-footer {
    position: fixed;
    left: 14px;
    bottom: 12px;
    z-index: 80;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    max-width: 42vw;
    font-size: 0.68rem;
    letter-spacing: 0.3px;
}
.wall-footer a {
    color: #475569;
    text-decoration: none;
    transition: color 0.15s ease;
}
.wall-footer a:hover { color: #94a3b8; text-decoration: underline; }

@media (max-width: 640px) {
    .wall-footer {
        left: 0;
        right: 0;
        bottom: 4px;
        max-width: none;
        justify-content: center;
        gap: 3px 10px;
        font-size: 0.62rem;
    }
}

/* ---------- Tri ponude ---------- */

.plan-basic   { border-color: rgba(148, 163, 184, 0.45); }
.plan-basic:hover { border-color: #94a3b8; }
.plan-basic .plan-price { background: #94a3b8; }

.plan-price s { opacity: 0.55; margin-right: 5px; font-weight: 400; }

/* ---------- Polje za mejl ---------- */

.field input[type="email"] {
    width: 100%;
    padding: 11px 12px;
    font-family: inherit;
    font-size: 0.95rem;
    color: #f1f5f9;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 9px;
}
.field input[type="email"]:focus { outline: none; border-color: #38bdf8; }

.field-note {
    margin-top: 6px;
    font-size: 0.71rem;
    line-height: 1.5;
    color: #64748b;
}