/* Style Ticket - i Nha Trang V3 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: #f5f5f0;
    min-height: 100vh;
    padding: 1rem;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 1.5rem;
}

header {
    text-align: center;
    border-bottom: 2px dashed #848C3E;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

header h1 {
    color: #848C3E;
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

header .branding {
    color: #666;
    font-size: 0.9rem;
}

/* Menu Section */
#menu {
    margin-bottom: 1.5rem;
}

#menu h3 {
    color: #848C3E;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid #ddd;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px dotted #eee;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item span {
    font-size: 0.85rem;
}

.menu-item.custom {
    background: #f5f9e8;
}

.custom-badge {
    color: #848C3E;
    font-size: 0.7rem;
    margin-left: 4px;
}

.btn-add {
    background: #848C3E;
    color: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add:hover {
    background: #6b7232;
}

/* Cart Section */
.cart {
    background: #fdfaf3;
    border: 2px solid #848C3E;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.cart h3 {
    color: #848C3E;
    font-size: 1rem;
    margin-bottom: 0.8rem;
    text-align: center;
}

#cart-content {
    min-height: 60px;
    margin-bottom: 0.8rem;
}

.empty-msg, .loading-msg {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 1rem 0;
}

.cart-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    font-size: 0.85rem;
    border-bottom: 1px dotted #ddd;
}

.cart-item-info {
    flex: 1;
}

.cart-qty {
    font-weight: bold;
    color: #848C3E;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cart-price {
    min-width: 70px;
    text-align: right;
}

.btn-remove,
.btn-add-cart {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove {
    background: #e74c3c;
    color: #fff;
}

.btn-remove:hover {
    background: #c0392b;
}

.btn-add-cart {
    background: #848C3E;
    color: #fff;
}

.btn-add-cart:hover {
    background: #6b7232;
}

/* Options Modal */
.options-content {
    max-width: 350px;
}

.options-section {
    margin-bottom: 1.2rem;
}

.options-section h4 {
    color: #848C3E;
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.3rem;
}

.options-choices {
    display: flex;
    gap: 0.8rem;
}

.option-choice {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-choice:hover {
    border-color: #848C3E;
    background: #f9f9f9;
}

.option-choice input[type="radio"] {
    display: none;
}

.option-choice input[type="radio"]:checked + .option-label {
    color: #848C3E;
    font-weight: bold;
}

.option-choice:has(input[type="radio"]:checked) {
    border-color: #848C3E;
    background: #f5f9e8;
}

.option-label {
    font-size: 0.95rem;
}

.total {
    text-align: right;
    font-size: 1.2rem;
    font-weight: bold;
    color: #848C3E;
    padding-top: 0.8rem;
    border-top: 2px solid #848C3E;
}

/* Actions */
.actions {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.btn-action {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action.reset {
    background: #e0e0e0;
    color: #333;
}

.btn-action.reset:hover {
    background: #ccc;
}

.btn-action.pdf {
    background: #848C3E;
    color: #fff;
}

.btn-action.pdf:hover {
    background: #6b7232;
}

.btn-action.reserve {
    background: #d4a017;
    color: #fff;
}

.btn-action.reserve:hover {
    background: #b8860b;
}

/* Footer */
.footer-info {
    text-align: center;
    border-top: 2px dashed #848C3E;
    padding-top: 1rem;
    font-size: 0.8rem;
    color: #666;
}

.footer-info p {
    margin-bottom: 0.2rem;
}

.footer-info strong {
    color: #848C3E;
}

/* Add Item Section */
.add-item-section {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.add-item-section h3 {
    color: #848C3E;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    text-align: center;
}

/* Admin Login */
.admin-login {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.admin-login input {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    width: 150px;
}

.btn-login {
    background: #848C3E;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-login:hover {
    background: #6b7232;
}

/* Admin Panel */
.admin-panel {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ddd;
}

.admin-badge {
    background: #848C3E;
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.btn-logout {
    background: #999;
    color: #fff;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: #777;
}

.add-item-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.add-item-form select,
.add-item-form input {
    flex: 1;
    min-width: 80px;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.add-item-form select {
    min-width: 100px;
}

.add-item-form input[type="number"] {
    max-width: 80px;
}

.btn-add-item {
    background: #848C3E;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-add-item:hover {
    background: #6b7232;
}

.custom-items-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.btn-small {
    background: #e0e0e0;
    color: #333;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-small:hover {
    background: #ccc;
}

.btn-small.danger {
    background: #e74c3c;
    color: #fff;
}

.btn-small.danger:hover {
    background: #c0392b;
}

#custom-items-list {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
}

.custom-item-row {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    border-bottom: 1px dotted #eee;
}

.custom-item-row:last-child {
    border-bottom: none;
}

.custom-item-row .delete-item {
    background: #e74c3c;
    color: #fff;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.7rem;
}

/* Modal Reservation */
.modal-overlay,
.confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-overlay.active,
.confirmation-overlay.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-content h3 {
    color: #848C3E;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Reservation Summary */
.reservation-summary {
    background: #fdfaf3;
    border: 1px solid #848C3E;
    border-radius: 8px;
    padding: 0.8rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.reservation-summary .summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.2rem 0;
    border-bottom: 1px dotted #ddd;
}

.reservation-summary .summary-item:last-child {
    border-bottom: none;
}

.reservation-summary .summary-total {
    font-weight: bold;
    color: #848C3E;
    border-top: 2px solid #848C3E;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: bold;
    color: #333;
    font-size: 0.85rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #848C3E;
}

.btn-submit {
    width: 100%;
    padding: 0.9rem;
    background: #848C3E;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: #6b7232;
}

/* Confirmation Modal */
.confirmation-content {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    max-width: 350px;
    animation: modalSlideIn 0.3s ease;
}

.confirmation-icon {
    width: 60px;
    height: 60px;
    background: #848C3E;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.confirmation-content h3 {
    color: #848C3E;
    margin-bottom: 0.5rem;
}

.confirmation-content p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }

    .container {
        padding: 1rem;
        border-radius: 0;
    }

    header h1 {
        font-size: 1.5rem;
    }
}
