/* =========================================================
   Bioskop Abazija — Web rezervacije
   Tamna tema, responsive, bez framework-a
   ========================================================= */

:root {
    --bg:            #0f1014;
    --bg-elevated:   #1a1c22;
    --bg-card:       #20232b;
    --border:        #2c2f38;
    --text:          #e8e8ec;
    --text-muted:    #9096a3;
    --text-dim:      #6b7280;
    --accent:        #f5a623;
    --accent-hover:  #ffb845;
    --accent-dark:   #c28218;
    --success:       #2ecc71;
    --danger:        #ef4444;
    --warning:       #f59e0b;
    --info:          #3b82f6;
    --radius:        10px;
    --radius-sm:     6px;
    --shadow:        0 4px 16px rgba(0,0,0,.4);
    --shadow-lg:     0 10px 40px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

h1, h2, h3 { margin: 0 0 0.5em; line-height: 1.25; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.muted       { color: var(--text-muted); }
.small       { font-size: 0.875rem; }
.big-number  { font-size: 2.2rem; color: var(--accent); }

/* --------- Header / Footer --------- */
.site-header {
    background: linear-gradient(180deg, #13151b 0%, #0f1014 100%);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.logo-icon { font-size: 1.8rem; }
.logo-text strong { display: block; font-size: 1.1rem; letter-spacing: .5px; }
.logo-text small  { color: var(--text-muted); font-size: .75rem; }

/* --------- Language Switch --------- */
.lang-switch {
    display: inline-flex;
    gap: 2px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 3px;
}
.lang-switch__btn {
    display: inline-block;
    padding: 6px 12px;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .5px;
    color: var(--text-muted);
    border-radius: 4px;
    text-decoration: none;
    transition: all .15s;
}
.lang-switch__btn:hover { color: var(--text); background: rgba(255,255,255,.04); }
.lang-switch__btn--active {
    background: var(--accent);
    color: #1a1400;
}
.lang-switch__btn--active:hover { color: #1a1400; background: var(--accent-hover); }

.site-footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    margin-top: 60px;
    padding: 24px 0;
    color: var(--text-muted);
    font-size: .9rem;
    text-align: center;
}
.site-footer p { margin: 4px 0; }

/* --------- Breadcrumb --------- */
.breadcrumb { margin: 20px 0; }
.breadcrumb ol {
    display: flex; gap: 8px; flex-wrap: wrap;
    list-style: none; margin: 0; padding: 0;
    background: var(--bg-elevated);
    border-radius: var(--radius);
    padding: 10px 14px;
    border: 1px solid var(--border);
}
.breadcrumb li { color: var(--text-muted); font-size: .9rem; }
.breadcrumb li.current { color: var(--accent); font-weight: 600; }
.breadcrumb li.done    { color: var(--text); }
.breadcrumb li:not(:last-child)::after { content: " › "; margin-left: 8px; color: var(--text-dim); }
.breadcrumb a { color: inherit; }

/* --------- Dugmad --------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px;
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    transition: all .15s;
}
.btn:hover { background: var(--border); color: var(--text); }
.btn--primary {
    background: var(--accent);
    color: #1a1400;
    border-color: var(--accent);
    font-weight: 600;
}
.btn--primary:hover { background: var(--accent-hover); color: #1a1400; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* --------- Chip --------- */
.chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: .82rem;
    white-space: nowrap;
}
.chip--subtle {
    background: transparent;
    color: var(--text-muted);
}
.chip--lang {
    font-weight: 700;
    letter-spacing: .5px;
    font-size: .75rem;
    padding: 3px 10px;
}
.chip--lang-sr {
    background: rgba(59,130,246,.15);
    border-color: rgba(59,130,246,.3);
    color: #7eb3ff;
}
.chip--lang-hu {
    background: rgba(245,158,11,.15);
    border-color: rgba(245,158,11,.3);
    color: #ffc66a;
}

/* --------- Intro / Empty state --------- */
.films-intro { padding: 30px 0; text-align: center; }
.films-intro .lead { color: var(--text-muted); font-size: 1.1rem; }
.empty-state {
    text-align: center; padding: 60px 20px;
    background: var(--bg-elevated);
    border-radius: var(--radius); border: 1px dashed var(--border);
}
.empty-state h2 { color: var(--text-muted); font-weight: 500; }

/* --------- Grid filmova --------- */
.films-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin: 20px 0 40px;
}
.films-grid--compact { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

.film-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform .2s, border-color .2s, box-shadow .2s;
    position: relative;
}
.film-card::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dark) 100%);
}
.film-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}
.film-card__link { display: block; color: var(--text); height: 100%; }
.film-card__body {
    padding: 20px 22px;
    display: flex; flex-direction: column;
    gap: 14px;
    min-height: 160px;
}
.film-card--compact .film-card__body { min-height: 140px; }
.film-card__title {
    font-size: 1.2rem;
    margin: 0;
    color: var(--text);
    line-height: 1.3;
}
.film-card__info {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.film-card__cta {
    margin-top: auto;
    padding-top: 4px;
}
.film-card__cta .btn { width: 100%; }

/* --------- Film header (minimalni) --------- */
.film-header {
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.film-header--minimal h1 { margin-bottom: 6px; }
.film-header__meta {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 10px;
}
.film-header__length {
    color: var(--text-muted);
    margin: 0;
}

/* --------- Lista termina --------- */
.projections { margin: 30px 0; }
.projection-day { margin-bottom: 22px; }
.projection-day__title {
    font-size: 1.05rem; color: var(--text);
    padding-bottom: 6px; border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
    text-transform: capitalize;
}
.projection-day__times {
    display: flex; flex-wrap: wrap; gap: 10px;
}
.proj-btn {
    display: flex; flex-direction: column; align-items: center;
    min-width: 110px; padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    transition: all .15s;
    position: relative;
}
.proj-btn:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.proj-btn__time { font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.proj-btn__hall { font-size: .85rem; color: var(--text-muted); margin-top: 2px; }
.proj-btn__price { font-size: .8rem; color: var(--text); margin-top: 4px; }
.proj-btn__badge {
    font-size: .7rem; padding: 2px 8px; border-radius: 10px;
    background: var(--border); color: var(--text-muted);
    margin-top: 6px;
}
.proj-btn__badge--free { background: rgba(46,204,113,.15); color: var(--success); }
.proj-btn--full {
    opacity: .5; cursor: not-allowed; pointer-events: none;
}

.back-link { margin: 30px 0; }

/* --------- Sala --------- */
.seat-page__header {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 20px; flex-wrap: wrap;
    padding-bottom: 16px; border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
.seat-page__meta { color: var(--text-muted); margin: 4px 0; }
.seat-page__price-info { text-align: right; }
.seat-page__price-info small { display: block; color: var(--text-muted); }
.seat-page__price-info strong { font-size: 1.3rem; color: var(--accent); }

.legend {
    display: flex; flex-wrap: wrap; gap: 16px;
    margin: 16px 0;
    padding: 12px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    font-size: .88rem;
}
.legend__item { display: inline-flex; align-items: center; gap: 6px; }
.seat-demo {
    width: 18px; height: 18px; border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(255,255,255,.08);
}
.seat-demo--free     { background: #e8e8e8; }
.seat-demo--selected { background: var(--accent); }
.seat-demo--taken    { background: #777; }
.seat-demo--offline  { background: #2a2a2a; }

.hall-screen-label {
    text-align: center;
    letter-spacing: 12px;
    font-size: .8rem;
    color: var(--text-muted);
    padding: 8px 0;
    margin: 10px 0 4px;
    background: linear-gradient(180deg, rgba(245,166,35,.15), transparent 80%);
    border-radius: 50% 50% 2px 2px / 100% 100% 2px 2px;
    border-top: 2px solid var(--accent);
}

.hall-svg-wrapper {
    background: var(--bg-elevated);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 20px;
    margin-bottom: 20px;
    max-width: 100%;
    overflow: auto;
}
.hall-svg-wrapper svg {
    display: block;
    width: 100%; height: auto;
    max-width: 800px; margin: 0 auto;
}
.seat { transition: opacity .15s; }
.seat--free:hover path,
.seat--free:hover rect,
.seat--free:hover circle,
.seat--free:hover polygon {
    fill: var(--accent-hover) !important;
}
.seat--flash { animation: flash .4s; }
@keyframes flash {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.15); }
}

/* --------- Forma za rezervaciju --------- */
.reserve-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}
.reserve-form__summary,
.reserve-form__contact {
    display: flex; flex-direction: column;
}
.reserve-form h3 { margin-top: 0; color: var(--accent); }

.selected-seats {
    list-style: none; padding: 0; margin: 0 0 14px;
    min-height: 80px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 12px;
    border: 1px solid var(--border);
}
.selected-seats li { padding: 4px 0; border-bottom: 1px dashed var(--border); }
.selected-seats li:last-child { border-bottom: none; }

.reserve-form__totals {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 10px;
    font-size: 1.1rem;
}
.reserve-form__totals strong { color: var(--accent); font-size: 1.3rem; }

.reserve-form__contact label {
    display: block;
    margin: 0 0 6px;
    font-size: .9rem;
    color: var(--text-muted);
}
.reserve-form__contact input[type=email] {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 12px;
}
.reserve-form__contact input[type=email]:focus {
    outline: 2px solid var(--accent);
    border-color: var(--accent);
}
.checkbox-inline {
    display: flex; align-items: flex-start; gap: 8px;
    margin: 14px 0;
    cursor: pointer;
    font-size: .9rem;
}
.checkbox-inline input { margin-top: 3px; }

.reserve-form__actions {
    grid-column: 1 / -1;
    display: flex; justify-content: space-between; gap: 10px;
    padding-top: 14px; border-top: 1px solid var(--border);
}

/* --------- Alert --------- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin: 16px 0;
    border-left: 4px solid var(--info);
    background: rgba(59,130,246,.1);
}
.alert strong { display: block; margin-bottom: 4px; }
.alert p { margin: 4px 0 0; }
.alert--warning { border-left-color: var(--warning); background: rgba(245,158,11,.12); }
.alert--info    { border-left-color: var(--info);    background: rgba(59,130,246,.12); }

.error-box {
    background: rgba(239,68,68,.08);
    border-left: 4px solid var(--danger);
    padding: 20px;
    border-radius: var(--radius-sm);
    margin: 20px 0;
}
.error-box pre {
    background: #000; color: #fca5a5;
    padding: 12px; overflow: auto;
    border-radius: 4px; font-size: .8rem;
}

/* --------- Confirm page --------- */
.confirm-page { max-width: 720px; margin: 30px auto; }
.confirm-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.confirm-card__check {
    width: 70px; height: 70px;
    border-radius: 50%;
    background: var(--success);
    color: #fff;
    font-size: 2.5rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 20px rgba(46,204,113,.4);
}
.confirm-card .lead { color: var(--text-muted); font-size: 1.05rem; }
.confirm-details {
    text-align: left;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 20px; margin: 24px 0;
    border: 1px solid var(--border);
}
.confirm-details__row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
}
.confirm-details__row:last-child { border-bottom: none; }
.confirm-details__row dt { color: var(--text-muted); margin: 0; }
.confirm-details__row dd { margin: 0; }

.seat-list { list-style: none; padding: 0; margin: 0; }
.seat-list li { padding: 2px 0; }

.confirm-actions {
    display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
    margin-top: 20px;
}

@media print {
    .site-header, .site-footer, .breadcrumb, .confirm-actions { display: none; }
    body { background: #fff; color: #000; }
    .confirm-card { border: none; box-shadow: none; background: #fff; color: #000; }
    .confirm-details { border: 1px solid #000; background: #fff; color: #000; }
    .big-number { color: #000; }
}

/* --------- Responsive --------- */
@media (max-width: 768px) {
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.25rem; }
    .reserve-form { grid-template-columns: 1fr; }
    .confirm-details__row { grid-template-columns: 1fr; gap: 0; }
    .confirm-details__row dt { color: var(--text-muted); font-size: .85rem; }
    .films-grid, .films-grid--compact { grid-template-columns: 1fr; }
    .film-card__body { min-height: auto; padding: 18px; }
    .film-card__title { font-size: 1.1rem; }
    .seat-page__header { flex-direction: column; align-items: stretch; }
    .seat-page__price-info { text-align: left; }
    .container { padding: 0 12px; }
    .proj-btn { min-width: 90px; padding: 10px 12px; }
    .proj-btn__time { font-size: 1.1rem; }
    .site-header__inner { gap: 10px; }
    .logo-text small { display: none; }
}

/* --------- Toast notifications --------- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: calc(100vw - 40px);
    width: 420px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    color: var(--text);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    font-size: .92rem;
    line-height: 1.45;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: auto;
}
.toast--visible {
    opacity: 1;
    transform: translateX(0);
}
.toast--error   { border-left-color: var(--danger);  }
.toast--warning { border-left-color: var(--warning); }
.toast--info    { border-left-color: var(--info);    }
.toast--success { border-left-color: var(--success); }

.toast__icon {
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}
.toast--error   .toast__icon { color: var(--danger);  }
.toast--warning .toast__icon { color: var(--warning); }
.toast--info    .toast__icon { color: var(--info);    }
.toast--success .toast__icon { color: var(--success); }

.toast__text { flex-grow: 1; }
.toast__close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0 4px;
    margin: -2px -4px 0 0;
    flex-shrink: 0;
}
.toast__close:hover { color: var(--text); }

@media (max-width: 600px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }
}
