:root {
    --light: #F5F5F5;
    --lightgray: #D8D9DB;
    --dark: #2b2c27;
    --color-main: #FCCA59;
    --secondary: #657CAA;
    --highlight: #f0cf75;
    --card-shadow: 20px 20px 60px var(--lightgray);
    --border-radius: 35px;
    --btn-border-radius: 35px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--dark);
    color: var(--light);
}

/* Fullscreen kiosk layout */
#fsContent {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#fsHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background-color: var(--dark);
}

#fsLogo img {
    height: 60px;
}

#fsHeaderCenter {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#liveDate,
#liveClock {
    font-size: 1.2rem;
    color: var(--lightgray);
}

/* Location bar: shows the location this kiosk scans members into */
#locationBar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 30px;
    background-color: var(--color-main);
    color: var(--dark);
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
}

#locationBar.d-none {
    display: none;
}

.location-icon {
    width: 18px;
    height: 18px;
    border: 3px solid var(--dark);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.location-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--dark);
}

#locationName {
    text-transform: uppercase;
}

#videoWrapper {
    display: flex;
    justify-content: center;
    padding: 0 30px 30px;
}

.video-wrap {
    position: relative;
    width: 100%;
    max-width: 900px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: #000;
}

#videoSource {
    width: 100%;
    height: auto;
    display: block;
}

/* Loading spinner overlay */
.loading-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(43, 44, 39, 0.85);
    z-index: 2;
}

.loading-wrap.d-none {
    display: none;
}

.spinner-border {
    width: 60px;
    height: 60px;
    color: var(--color-main);
}

/* Scan message overlay */
#scanMessageWrapper {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 60px;
    z-index: 3;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

#scanMessage {
    padding: 20px 30px;
    border-radius: var(--border-radius);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 1.4rem;
    text-align: center;
    display: none;
}

#scanMessage.scanned-success,
#scanMessage.scanned-warning {
    display: block !important;
}

.scanned-success {
    background-color: #9de06f;
    border: 4px solid #70a460;
    color: var(--light);
}

.scanned-warning {
    background-color: #f8b66a;
    border: 4px solid #e2873c;
    color: var(--dark);
}

/* Code input view (shown before a scan code has been set) */
#codeInputView {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--dark);
    padding: 30px;
}

#codeInputView.d-none {
    display: none;
}

#codeInputView h1 {
    color: var(--color-main);
    margin-bottom: 10px;
    font-size: 2.4rem;
    text-transform: uppercase;
}

#codeInputView p {
    color: var(--lightgray);
    margin-bottom: 30px;
    font-size: 1.2rem;
    text-align: center;
}

.code-input-form {
    display: flex;
    gap: 15px;
    align-items: stretch;
}

#codeInput {
    padding: 15px 20px;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 8px;
    text-align: center;
    border: none;
    border-radius: var(--btn-border-radius);
    background-color: var(--light);
    color: var(--dark);
    width: 280px;
}

#codeInput:focus {
    outline: 3px solid var(--color-main);
}

#codeSubmitBtn {
    padding: 15px 30px;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    border-radius: var(--btn-border-radius);
    background-color: var(--color-main);
    color: var(--dark);
    cursor: pointer;
}

#codeSubmitBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#codeInputHint {
    margin-top: 20px;
    color: var(--lightgray);
    font-size: 0.95rem;
}

/* Status bar at the bottom */
#statusBar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 30px;
    background-color: rgba(43, 44, 39, 0.9);
    z-index: 4;
    font-size: 0.95rem;
    color: var(--lightgray);
}

#statusBar button {
    background: none;
    border: none;
    color: var(--color-main);
    font-size: 0.95rem;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 700;
}

#statusBar button:hover {
    text-decoration: underline;
}

#cameraStatus {
    display: flex;
    align-items: center;
    gap: 8px;
}

.camera-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #9de06f;
}

.camera-dot.off {
    background-color: #f8b66a;
}

@media (max-width: 640px) {
    #fsHeader {
        padding: 12px 16px;
    }

    #fsLogo img {
        height: 40px;
    }

    .code-input-form {
        flex-direction: column;
    }

    #codeInput {
        width: 100%;
    }

    #videoWrapper {
        padding: 0 10px 10px;
    }

    #scanMessage {
        font-size: 1.1rem;
        padding: 14px 18px;
    }
}