@charset "UTF-8";

:root {
    --primary-color: rgb(72, 150, 60);
    --secondary-color: rgb(11, 179, 11);
    --accent-color: rgb(236, 161, 20);
    --danger-color: rgb(200, 50, 60);
    --numpad-color: rgb(37, 116, 37);
    --text-color: #333;
    --bg-color: #fff;
    --light-gray: rgb(240, 240, 240);
    --border-color: #ccc;
    --header-height: 7vh;
    --footer-height: 18vw;
}

html {
    box-sizing: border-box;
    font-family: "Meiryo", sans-serif;
    height: 100%;
    overflow: hidden;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.header {
    background-color: var(--primary-color);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4.9vw;
    font-family: sans-serif;
    font-weight: bold;
    flex-shrink: 0;
}

.main-content {
    flex-grow: 1;
    padding: 2%;
    padding-bottom: var(--footer-height);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.view {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.hidden {
    display: none !important;
}

/* --- Buttons --- */
.btn {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 4.5vw;
    cursor: pointer;
    font-weight: bold;
}

.btn-primary {
    color: white;
    font-family: sans-serif;
    border: 1px solid #a11;
    border-radius: 12px;
    background-image:
        linear-gradient(to bottom, rgba(255,255,255,0.4), rgba(255,255,255,0) 50%),
        linear-gradient(to bottom, #f55, #d22);
    text-shadow: 0 -1px 1px rgba(0,0,0,0.6);
    box-shadow: 0 2px 3px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.btn-secondary {
    color: white;
    border: 1px solid #2a7a20;
    border-radius: 12px;
    background-image:
        linear-gradient(to bottom, rgba(255,255,255,0.4), rgba(255,255,255,0) 50%),
        linear-gradient(to bottom, #60d652, #39a12c);
    text-shadow: 0 -1px 1px rgba(0,0,0,0.6);
    box-shadow: 0 2px 3px rgba(0,0,0,0.3);
}

/* --- Add View --- */
.menu-display-area {
    height: 28vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.menu-image-container {
    text-align: center;
    margin-bottom: 2vh;
}
.menu-image {
    max-width: 100%;
    max-height: 25vh;
}
.menu-entry {
    margin-bottom: 2vh;
}
#menu-name-preview {
    background-color: rgb(218, 255, 219);
    color: var(--primary-color);
    font-size: 8vw;
    font-weight: bold;
    padding: 1vh 3%;
    margin-bottom: 1vh;
}
#btn-next {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    width: 45%;
    height: 7vh;
    font-size: 4vh;
    border-radius: 18px;
    font-family: sans-serif;
}

#numpad-display {
    background-color: var(--bg-color);
    border: 3px solid var(--secondary-color);
    height: 9vh;
    font-size: 8vh;
    font-weight: bold;
    padding: 0;
    margin: 0 0 2vh 0;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1vw;
    margin: 0 3% auto;
}
.btn-numpad {
    height: 7vh;
    font-size: 6vh;
    background: linear-gradient(rgb(255, 255, 255),rgb(240,240,240),rgb(230, 230, 230),rgb(200,200,200));
    color: green;
    border:2px solid rgb(122, 122, 122);
    border-radius: 8px;
    padding: 0;
    font-weight: bold;
    font-family: sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
#btn-numpad-del {
    font-size: 4vh;
    color: white;
    border: 1px solid #2a7a20;
    background-image:
        linear-gradient(to bottom, rgba(255,255,255,0.4), rgba(255,255,255,0) 50%),
        linear-gradient(to bottom, #60d652, #39a12c);
    text-shadow: 0 -1px 1px rgba(0,0,0,0.6);
    box-shadow: 0 2px 3px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-numpad[data-value="0"] {
    grid-column: 2;
}

/* --- Counter View --- */
#view-counter {
    justify-content: center;
    gap: 3vh;
}
#counter-menu-name, #counter-menu-price {
    font-size: 7vw;
    font-weight: bold;
    margin: 0;
}
#counter-menu-price {
    text-align: right;
}
.counter-control {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2%;
}
.btn-counter {
    width: 10vw;
    height: 10vw;
    font-size: 6vw;
    border: 3px solid var(--secondary-color);
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
#menu-count, #glass-count {
    width: 15%;
    border: 1px solid var(--border-color);
    text-align: center;
    font-size: 6vw;
    padding: 5px 0;
    font-weight: bold;
}
.glass-label {
    font-size: 7vw;
    font-weight: bold;
    margin: 0;
}
.glass-message {
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    padding: 1vh 3%;
    font-size: 5vw;
    font-weight: bold;
    box-shadow: 3px 3px 5px gray;
    align-self: flex-start;
}
.action-buttons {
    display: flex;
    gap: 3%;
}

#view-counter .action-buttons {
    margin-top: 3vh;
}
#view-counter .action-buttons .btn {
    flex-grow: 1;
    font-size: 6vw;
    height: 7vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
#view-counter .action-buttons .btn-secondary {
    flex-grow: 0;
    width: 30%;
}

#view-cart .action-buttons {
    padding: 0 2% 2vh 2%;
}
#view-cart .action-buttons .btn {
    flex-grow: 1;
    font-size: 8vw;
    height: 7.2vh;
    font-weight: 900;
    letter-spacing: 0.5em;
    text-indent: 0.5em;
    border-radius: 12px;
    padding: 0;
}
#view-cart .action-buttons .btn-secondary {
    letter-spacing: 0.2em;
    text-indent: 0.2em;
}
#view-bill .action-buttons {
    padding-bottom: 2vh;
}

/* --- Cart/History/Bill View --- */
.items-container {
    border: 2px solid var(--secondary-color);
    border-radius: 0;
    overflow-y: auto;
    background-color: var(--light-gray);
    flex-grow: 1;
    min-height: 0;
}
.cart-item, .table-row {
    background-color: white;
    margin: 0 1% 0 0;
    border-radius: 0;
    padding: 2%;
}
.cart-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 14vh;
}
.cart-item-name {
    font-size: 7.5vw;
    font-weight: 900;
    margin: 0;
    margin-top: 3px;
}
.glass-item {
    margin-top: -2vh;
    height: auto;
    justify-content: flex-start;
    padding-bottom: 1.5vh;
}
.glass-item .cart-item-name {
    padding-left: 40%;
    margin-top: 0px;
    margin-bottom: -5px;
    font-size: 7vw;
    font-weight: normal;
}

#view-cart .counter-control {
    align-self: flex-end;
}
#view-cart .counter-control p {
    width: 12vw;
    border: 1px solid var(--border-color);
    text-align: center;
    font-size: 6vw;
    font-weight: bold;
    margin: 0;
    margin-bottom: 3px;
    padding: 0px 2px;
}
#view-cart .btn-counter {
    width: 9vw;
    height: 9vw;
    font-size: 6vw;
    border: 2px solid var(--secondary-color);
    border-radius: 6px;
}
.price-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5vh 2%;
    font-size: 7vw;
    font-weight: bold;
}
.price-summary p {
    margin: 0;
}
.table-layout .table-header, .table-layout .table-row {
    display: grid;
    grid-template-columns: 6fr 2fr 2fr;
    align-items: center;
    padding: 1.5vh 3%;
}
.table-layout .table-header {
    background-color: #eee;
    font-weight: bold;
}
.table-layout p {
    margin: 0;
    text-align: center;
}
.table-layout p:first-child {
    text-align: left;
}
.btn-full-width {
    width: 100%;
    font-size: 7vw;
    padding: 1.5vh;
}
.sended-message {
    font-size: 6vw;
    font-weight: bold;
    text-align: left;
    margin-top: 30vh;
}
.history-note {
    color: var(--secondary-color);
    text-align: center;
    margin-top: 1vh;
    font-size: 4.5vw;
}

/* --- Call View --- */
#view-call {
    justify-content: center;
    gap: 10vh;
}
.btn-call {
    width: 100%;
    padding: 4vh 8vw;
    color: var(--text-color);
    border-radius: 10px;
    font-size: 7vw;
    font-weight: bold;
    text-align: left;
    display: flex;
    align-items: center;
    border: 1px solid #999;
    background-image: linear-gradient(to bottom, #f0f0f0, #d0d0d0);
    text-shadow: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
#btn-call-clerk,
.btn-call.active {
    color: white;
    border: 1px solid #a11;
    background-image:
        linear-gradient(to bottom, rgba(255,255,255,0.4), rgba(255,255,255,0) 50%),
        linear-gradient(to bottom, #f55, #d22);
    text-shadow: 0 -1px 1px rgba(0,0,0,0.6);
    box-shadow: 0 2px 3px rgba(0,0,0,0.3);
}

/* --- Register View --- */
#view-register {
    text-align: center;
    overflow-y: auto;
    padding: 3vh 0;
}
.register-logo,
.register-barcode {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2vh;
}
.register-logo {
    width: 60%;
    max-width: 240px;
}
.register-barcode {
    width: 90%;
    max-width: 360px;
}
.barcode-number,
.table-number,
.register-instruction {
    margin: 0;
    margin-bottom: 2vh;
}
.table-number {
    font-size: 10vw;
    font-weight: bold;
    margin-bottom: 3vh;
}
.register-instruction {
    font-size: 6vw;
    margin-bottom: 4vh;
    padding: 0 20vw;
}
#btn-return-to-history {
    width: 60%;
    max-width: 320px;
    height: 15vh;
    margin: 0 auto 2vh auto;
    font-size: 5vw;
}
.register-note {
    width: 70%;
    margin: 0 auto;
    font-size: 2vw;
}

/* --- Footer --- */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 18vw;
    background-color: var(--primary-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 2.5%;
    flex-shrink: 0;
}
.footer-btn {
    position: relative;
    height: 80%;
    width: 18%;
    padding: 0;
    font-size: 6vw;
    line-height: 1;
    color: green;
    background: linear-gradient(rgb(255, 255, 255),rgb(240,240,240),rgb(230, 230, 230),rgb(200,200,200));
    border-radius: 6px;
    border: 1px solid rgb(226, 226, 226);
    font-weight: bold;
}
.footer-btn.active {
    border: 3px solid var(--accent-color);
}
.footer-btn:disabled {
    color: rgb(189, 189, 189);
}
.badge {
    position: absolute;
    top: -1.5vw;
    right: -1.5vw;
    background-color: red;
    color: white;
    border-radius: 50%;
    width: 7vw;
    height: 7vw;
    font-size: 5vw;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}
#bill-badge {
    background-color: orange;
    line-height: 7vw;
    padding-top: 0;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    max-width: 400px;
    background-color: white;
    border: 1px solid var(--secondary-color);
    border-radius: 7px;
    padding: 20px;
    z-index: 1000;
    text-align: left;
}
.modal p {
    font-size: 5.5vw;
}
.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 20px;
}
.modal-buttons .btn {
    padding: 5px 10px;
    border-radius: 2px;
    color: var(--text-color);
    font-weight: normal;
    text-shadow: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    border: 1px solid #ccc;
    background-image: linear-gradient(to bottom, rgb(255, 255, 255), rgb(240, 240, 240));
}
#btn-cart-del-yes,
#btn-cart-send-yes {
    border-color: #000;
    background-image: linear-gradient(to bottom, rgb(255, 255, 255), rgb(226, 226, 226));
}
.btn-modal-close {
    display: block;
    margin-left: auto;
    margin-top: 10px;
    padding: 5px 10px;
    border-radius: 2px;
    color: var(--text-color);
    font-weight: normal;
    text-shadow: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    border: 1px solid #000;
    background-image: linear-gradient(to bottom, #f0f0f0, #d0d0d0);
}