/* map17.css — companion styles for theatreMap v17 */

.tm17 {
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 320px;
    background: #fafbfc;
    border-radius: 8px;
}

.tm17-svg {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 320px;
    touch-action: none;
    cursor: grab;
}
.tm17-svg:active { cursor: grabbing; }

/* ---------- seats ---------- */
.tm17-seat--sel { cursor: pointer; }
.tm17-seat rect { transition: fill .25s ease; }
.tm17-seat--sel:hover rect,
.tm17-seat--sel:focus rect {
    stroke: #ffc107;
    stroke-width: 2;
}
.tm17-seat--sel:focus { outline: none; }
.tm17-seat--flash rect {
    animation: tm17flash 1s ease;
}
@keyframes tm17flash {
    0% { fill: #ffffff; }
}

/* ---------- region overview ---------- */
.tm17-region--active { cursor: pointer; }
.tm17-region--active:hover rect,
.tm17-region--active:focus rect {
    filter: brightness(1.25);
    stroke-width: 2;
}
.tm17-region--active:focus { outline: none; }

/* ---------- zoom buttons (fallback set) ---------- */
.tm17-zoombar {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tm17-zbtn {
    width: 40px;
    height: 40px;
    border: 1px solid #d5dae0;
    border-radius: 8px;
    background: #ffffff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
    transition: background .15s ease, opacity .2s ease;
}
.tm17-zbtn:hover { background: #f0f4f8; }
.tm17-zbtn:focus-visible { outline: 2px solid #007bff; outline-offset: 1px; }

/* ---------- legend ---------- */
.tm17-legend {
    position: absolute;
    z-index: 6;
    display: flex;
    gap: 12px;
    padding: 6px 12px;
    background: rgba(255,255,255,.92);
	color:black;
    border: 1px solid #e2e6ea;
    border-radius: 20px;
    font-size: 12px;
    direction: rtl;
    pointer-events: none;
}
.tm17-legend--tr { top: 10px;    right: 10px; }
.tm17-legend--tl { top: 10px;    left: 10px; }
.tm17-legend--br { bottom: 10px; right: 10px; }
.tm17-legend--bl { bottom: 10px; left: 10px; }
.tm17-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.tm17-legend-item i {
    width: 12px; height: 12px;
    border-radius: 3px;
    display: inline-block;
}

/* ---------- summary bar ---------- */
.tm17-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-top: 8px;
    background: #f4f7fa;
    border: 1px solid #e2e6ea;
    border-radius: 8px;
    font-size: 14px;
    min-height: 46px;
}
.tm17-summary-count { font-weight: 700; }
.tm17-summary-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tm17-chip {
    border: 1px solid #28a745;
    background: #eaf8ee;
    color: #1c7c33;
    border-radius: 16px;
    padding: 3px 10px;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s ease;
}
.tm17-chip:hover { background: #d7f0de; }

/* ---------- loading / error ---------- */
.tm17-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(250,251,252,.7);
    z-index: 7;
}
.tm17-spinner {
    width: 44px; height: 44px;
    border: 4px solid #d9e2ec;
    border-top-color: #007bff;
    border-radius: 50%;
    animation: tm17spin .8s linear infinite;
}
@keyframes tm17spin { to { transform: rotate(360deg); } }

.tm17-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(250,251,252,.95);
    z-index: 8;
    font-size: 15px;
    color: #333;
    text-align: center;
    padding: 20px;
}
.tm17-error[hidden] { display: none; }
.tm17-retry {
    border: 1px solid #007bff;
    color: #007bff;
    background: #fff;
    border-radius: 6px;
    padding: 6px 22px;
    font-size: 14px;
    cursor: pointer;
}
.tm17-retry:hover { background: #eef6ff; }

/* ---------- hint overlay ---------- */
.tm17-hint {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30,35,40,.85);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    z-index: 9;
    white-space: nowrap;
    opacity: 1;
    transition: opacity .5s ease;
    pointer-events: none;
}
.tm17-hint--out { opacity: 0; }

/* ---------- toast (opt-in, useToast:true) ---------- */
.tm17-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translate(-50%, 20px);
    background: #23282d;
    color: #fff;
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transition: opacity .3s ease, transform .3s ease;
    max-width: 92vw;
    text-align: center;
    box-shadow: 0 4px 18px rgba(0,0,0,.3);
}
.tm17-toast--in { opacity: 1; transform: translate(-50%, 0); }

/* ---------- screen-reader live region ---------- */
.tm17-sr {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    .tm17-seat rect,
    .tm17-zbtn,
    .tm17-toast { transition: none; }
    .tm17-seat--flash rect { animation: none; }
}