/* Cinema seat-selection UI — Wizarding Center
   Design tokens: purple #6c31a8/#9464c4/#b084d6, gold #ffcb00/#f8d23f, Estedad, RTL */

.cinema-ticket {
    direction: rtl;
    font-family: 'Estedad', Tahoma, sans-serif;
    color: #fff;
}

/* ---- Event selector ---- */
.cinema-event-pick {
    margin: 0 0 18px;
}
.cinema-event-pick label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: #e9d4ff;
}
.cinema-event-pick select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, .2);
    background: #6c31a8;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
}
.cinema-event-title {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 800;
    margin: 4px 0 16px;
    color: #ffcb00;
}

/* ---- Screen ---- */
.cinema-screen {
    margin: 8px auto 26px;
    max-width: 80%;
    text-align: center;
}
.cinema-screen .screen-bar {
    height: 12px;
    border-radius: 50% 50% 6px 6px / 100% 100% 6px 6px;
    background: linear-gradient(180deg, #ffffff, #b9b9d6);
    box-shadow: 0 12px 30px -6px rgba(255, 255, 255, .55);
    transform: perspective(220px) rotateX(-34deg);
}
.cinema-screen .screen-text {
    margin-top: 14px;
    letter-spacing: 6px;
    font-size: .85rem;
    color: #cdbce6;
}

/* ---- Seat grid ---- */
.cinema-map-wrap {
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}
.cinema-map {
    display: inline-block;
    min-width: 100%;
    margin: 0 auto;
}
.cinema-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-bottom: 7px;
    white-space: nowrap;
}
.cinema-row .row-label {
    flex: 0 0 22px;
    width: 22px;
    text-align: center;
    font-weight: 700;
    color: #b084d6;
    font-size: .8rem;
}
.seat {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 8px 8px 5px 5px;
    border: 1px solid rgba(0, 0, 0, .25);
    font-size: .62rem;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.seat.aisle {
    visibility: hidden;
    cursor: default;
    border: none;
    background: none;
}
.seat.available:hover {
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
    filter: brightness(1.1);
}
.seat.sold {
    background: #4a4a5a !important;
    color: #8d8d9e;
    cursor: not-allowed;
    border-color: #3a3a48;
}
.seat.held {
    background: #c98a00 !important;
    color: rgba(255, 255, 255, .65);
    cursor: not-allowed;
    border-style: dashed;
}
.seat.mine {
    background: #ffcb00 !important;
    color: #2a1646 !important;
    font-weight: 800;
    box-shadow: 0 0 0 2px #fff, 0 4px 14px rgba(255, 203, 0, .6);
    transform: translateY(-2px);
}

/* ---- Legend ---- */
.cinema-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin: 18px 0 6px;
    font-size: .8rem;
    color: #e9d4ff;
}
.cinema-legend .lg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cinema-legend .sw {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, .25);
}
.cinema-legend .sw.sold { background: #4a4a5a; }
.cinema-legend .sw.held { background: #c98a00; border-style: dashed; }
.cinema-legend .sw.mine { background: #ffcb00; }

/* zone price legend */
.cinema-zones {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 10px 0 4px;
    font-size: .82rem;
    color: #fff;
}
.cinema-zones .z {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, .08);
    padding: 5px 10px;
    border-radius: 20px;
}
.cinema-zones .z .sw {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

/* ---- Selection summary + countdown ---- */
.cinema-summary {
    margin: 18px 0;
    background: rgba(0, 0, 0, .18);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 16px;
    padding: 14px 16px;
}
.cinema-summary .sum-seats {
    min-height: 24px;
    margin-bottom: 8px;
    line-height: 2.2;
}
.cinema-summary .seat-chip {
    display: inline-block;
    background: linear-gradient(135deg, #ffcb00, #f8d23f);
    color: #2a1646;
    font-weight: 700;
    border-radius: 8px;
    padding: 3px 9px;
    margin: 0 0 0 6px;
    font-size: .8rem;
}
.cinema-summary .sum-empty { color: #cdbce6; }
.cinema-summary .sum-total {
    font-size: 1.05rem;
    font-weight: 800;
}
.cinema-summary .sum-total span { color: #ffcb00; }
.cinema-countdown {
    display: none;
    margin-top: 10px;
    font-weight: 700;
    color: #ffd9d9;
}
.cinema-countdown.show { display: block; }
.cinema-countdown b {
    color: #fff;
    background: rgba(255, 0, 0, .25);
    border-radius: 8px;
    padding: 2px 8px;
}

/* ---- States / messages ---- */
.cinema-loading,
.cinema-empty {
    text-align: center;
    padding: 30px 10px;
    color: #cdbce6;
}
.cinema-msg {
    margin: 12px 0;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    display: none;
}
.cinema-msg.show { display: block; }
.cinema-msg.err { background: rgba(255, 80, 80, .18); color: #ffcccb; }
.cinema-msg.info { background: rgba(135, 206, 235, .15); color: #cdeeff; }

.cinema-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-top-color: #ffcb00;
    border-radius: 50%;
    animation: cinema-spin 0.8s linear infinite;
    vertical-align: middle;
}
@keyframes cinema-spin { to { transform: rotate(360deg); } }

/* ---- Desktop: wide card for big halls, readable column for text/inputs ----
   The card itself is widened (modern-ticket-form.css). Here we keep the title,
   receipt, buyer inputs and summary in a comfortable centered column so they
   don't stretch, while the hall map / legend / zones use the full width. */
@media (min-width: 760px) {
    .modern-ticket-form .donation_head,
    .modern-ticket-form .donation_body,
    .modern-ticket-form .cinema-event-pick,
    .modern-ticket-form .cinema-summary,
    .modern-ticket-form .cinema-msg,
    .modern-ticket-form .donation_info > .field,
    .modern-ticket-form .donation_info > .form-row {
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
    }
    /* hall map, screen, legend and zones span the full widened card */
    .cinema-map-wrap { width: 100%; }
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .seat { flex: 0 0 26px; width: 26px; height: 26px; }
    .cinema-row { gap: 5px; }
    .cinema-screen { max-width: 96%; }
    .cinema-event-title { font-size: 1.1rem; }
}
