/**
 * Kiosk Reservation Screen Styles
 * 
 * @package KioskManager
 * @since 1.0.0
 */

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    height: 100%;
    overflow-x: hidden;
    font-family: Arial, sans-serif;
}

body.kiosk-reservation-screen {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    --kiosk-title-space: 78px;
    --kiosk-bottom-safe: 16px;
}

.wrapper {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 0 6px;
    box-sizing: border-box;
}

svg {
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - var(--kiosk-title-space) - var(--kiosk-bottom-safe));
    height: auto;
    display: block;
    margin: -40px auto 0;
}

/* SVG Text Styling */
text {
    font-size: var(--kiosk-font-size, 12px);
    font-weight: bold;
    fill: #ffffff;
    text-anchor: middle;
    dominant-baseline: middle;
}

/* Time end text styling */
.time-end-text {
    font-size: 11px;
    fill: #333333;
    text-anchor: middle;
    font-weight: bold;
}

/* Status color mapping */
.status-green {
    fill: #2b752f;
}

.status-blue {
    fill: #1565C0;
}

.status-brown {
    fill: #8B4513;
}

.status-gray {
    fill: #6B6B6B;
}

/* Loading indicator */
.update-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0);
    color: rgb(14, 92, 14);
    border-radius: 4px;
    font-size: 15px;
    font-family: monospace;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 9999;
}

.update-indicator.visible {
    opacity: 1;
}

.update-indicator.error {
    color: #f00;
}

/* Status Legend */
.status-legend {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    gap: 30px;
}

.legend-item {
    display: flex;
    align-items: center;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

.legend-green {
    background-color: #2b752f;
}

.legend-blue {
    background-color: #1565C0;
}

.legend-brown {
    background-color: #8B4513;
}

.legend-gray {
    background-color: #6B6B6B;
}

.legend-text {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}

/* Responsive H1 Title */
.kiosk-screen-title {
    margin: 45px 0 6px;
    padding: 0 16px;
    color: #172025;
    text-align: center;
    line-height: 1.2;
    font-size: clamp(1.5rem, 2.6vw, 2.5rem);
    font-family: benton-sans, Helvetica Neue, Arial, Noto Sans, sans-serif;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

@media (max-width: 767px) {
    body.kiosk-reservation-screen {
        --kiosk-title-space: 64px;
        --kiosk-bottom-safe: 86px;
    }

    .kiosk-screen-title {
        font-size: clamp(1.125rem, 6vw, 1.625rem);
        margin: 30px 0 4px;
    }

    .status-legend {
        bottom: 10px;
        padding: 10px 14px;
        gap: 14px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .legend-circle {
        width: 18px;
        height: 18px;
        margin-right: 8px;
    }

    .legend-text {
        font-size: 12px;
    }
}

/* Laptop and short-height screens: keep title visible while maximizing map size. */
@media (min-width: 1024px) and (max-width: 1279px) {
    body.kiosk-reservation-screen {
        --kiosk-title-space: 66px;
        --kiosk-bottom-safe: 12px;
    }

    .kiosk-screen-title {
        margin: 30px 0 4px;
        font-size: clamp(1.2rem, 1.9vw, 1.75rem);
    }

    .status-legend {
        bottom: 12px;
        padding: 12px 20px;
        gap: 20px;
    }

    .legend-circle {
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }

    .legend-text {
        font-size: 13px;
    }
}

@media (max-height: 860px) {
    body.kiosk-reservation-screen {
        --kiosk-title-space: 56px;
        --kiosk-bottom-safe: 10px;
    }

    .wrapper {
        padding: 4px 0 6px;
    }

    .kiosk-screen-title {
        margin: 30px 0 4px;
        font-size: clamp(1.2rem, 2.2vw, 1.8rem);
    }

    .status-legend {
        bottom: 8px;
        padding: 10px 16px;
        gap: 16px;
    }

    .legend-circle {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }

    .legend-text {
        font-size: 13px;
    }
}

@media (min-width: 1280px) and (max-width: 1599px) {
    .kiosk-screen-title {
        font-size: 3rem;
    }

    .legend-circle {
        width: 22px;
        height: 22px;
    }

    .legend-text {
        font-size: 14px;
    }
}

@media (min-width: 1600px) {
    svg {
    margin: -50px auto 0;
    }
    .kiosk-screen-title {
        font-size: 5rem;
    }

    .legend-circle {
        width: 32px;
        height: 32px;
    }

    .legend-text {
        font-size: 18px;
    }
}

/* SVG Text Styling - Applied via inline style in template for dynamic font size */
