/* did/assets/style.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f5f6fa;
    color: #333;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

.screen {
    display: none;
    width: 100%;
    height: 100%;
}
.screen.active {
    display: flex;
}

/* Login/Interact Screen */
#login-container, #interact-screen {
    justify-content: center;
    align-items: center;
    background: #000;
}

.login-box, .interact-box {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    z-index: 10;
}

.login-box h1 { margin-bottom: 5px; color: #1a73e8; }
.login-box p { margin-bottom: 20px; color: #666; font-size: 14px; }
.login-box input, .login-box select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}
.login-box input:focus, .login-box select:focus {
    outline: none;
    border-color: #1a73e8;
}
.login-box button {
    width: 100%;
    padding: 14px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}
.login-box button:active { background: #1557b0; }
.error { color: #d93025; font-size: 14px; margin-top: 10px; min-height: 20px; }

/* Interact box specific */
.interact-box { cursor: pointer; background: #e8f0fe; border: 2px solid #1a73e8; }
.interact-box h1 { color: #1a73e8; font-size: 24px; margin-top: 15px;}
.interact-box p { color: #555; margin-top: 10px; }

/* Pulse animation for touch prompt */
.pulse-ring {
    width: 60px; height: 60px;
    background: rgba(26, 115, 232, 0.4);
    border-radius: 50%;
    margin: 0 auto;
    animation: pulse 1.5s infinite ease-out;
}
@keyframes pulse {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

/* Main Board Screen */
#board-screen {
    display: none; 
    flex-direction: row;
}
#board-screen.active {
    display: flex;
}

.board-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2vh 2vw;
}

/* Ready / Left side */
.col-ready {
    background-color: #1a73e8; /* Blue */
    color: white;
}
/* Making / Right side */
.col-making {
    background-color: #ffffff; /* White */
    color: #333;
}

.col-header {
    text-align: left;
    padding-bottom: 2vh;
    border-bottom: 4px solid rgba(255,255,255,0.2);
}
.col-making .col-header {
    border-bottom: 4px solid rgba(0,0,0,0.1);
}

.col-header h2 {
    font-size: 3vw;
    font-weight: 900;
    letter-spacing: 2px;
}
.col-header h3 {
    font-size: 2.2vw;
    font-weight: 700;
    margin-top: 5px;
}
.col-header h4.sub-vn {
    font-size: 1.5vw;
    font-weight: 400;
    opacity: 0.8;
}

.col-body {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(auto-fill, 10vh);
    grid-auto-rows: 10vh;
    gap: 2vw;
    align-content: start;
    overflow: hidden; /* Hide overflow to prevent scrolling on TV */
}
.col-body.is-empty {
    display: flex;
    justify-content: center;
    align-items: center;
}
/* Allow larger grid sizes if little elements */
.col-making .col-body {
    grid-template-columns: repeat(3, 1fr);
}

/* Individual Order Numbers */
.order-num {
    background: #fff;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4.5vw;
    font-weight: 900;
    color: #1a73e8;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    height: 12vh;
}

.col-making .order-num {
    background: #f8f9fa;
    color: #5f6368;
    border: 2px solid #e8eaed;
}

/* Highly visible for Ready */
.col-ready .order-num {
    color: #d93025; /* Red order number on white background inside blue column */
    background: #fff;
    border: 4px solid #fff;
}

/* Flash Animation when a new order appears in Ready */
.flash-new {
    animation: flashReady 3s ease-in-out;
}
@keyframes flashReady {
    0%, 20%, 40%, 60%, 80% { transform: scale(1.1); background: #fce8e6; }
    10%, 30%, 50%, 70%, 90% { transform: scale(1); background: #fff; }
    100% { transform: scale(1); }
}

/* Empty State */
.empty-state {
    font-size: 2vw;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
}
.col-making .empty-state {
    color: rgba(0, 0, 0, 0.2);
}

/* Hidden Logout actions for Kiosk/DID display */
.footer-actions {
    position: absolute;
    bottom: 2vh;
    right: 2vw;
    opacity: 0.05;
    transition: opacity 0.3s;
}
.footer-actions:hover, .footer-actions:active {
    opacity: 1;
}
.btn-logout-hidden {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 1vh 1vw;
    cursor: pointer;
    font-size: 1.2vw;
}
