/**
 * Take Order Form CSS
 */

.take-order-form-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.take-order-form-container h2 {
    color: #FF0000;
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
}

.take-order-form-container h3 {
    color: #FF0000;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
    justify-content: space-between;
}

.form-group {
    flex: 0 0 48%;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-group input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.checkbox-group {
    display: flex;
    gap: 20px;
}

.checkbox-group label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
}

.products-table-container {
    margin: 20px 0;
    overflow-x: auto;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.products-table th, 
.products-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.products-table th {
    background-color: #FF0000;
    color: white;
    font-weight: bold;
}

.products-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.products-table tr:hover {
    background-color: #f1f1f1;
}

.products-table td.price,
.products-table td .total-input {
    text-align: right;
}

.products-table td .quantity-input {
    width: 60px;
    text-align: center;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    color: #FF0000;
}

.checkbox-label input {
    margin-right: 8px;
    transform: scale(1.2);
}

.submit-row {
    margin-top: 30px;
    justify-content: center;
}

.submit-button {
    background-color: #FF0000;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.submit-button:hover {
    background-color: #cc0000;
}

#form-message {
    margin-top: 10px;
    padding: 10px;
    text-align: center;
    border-radius: 4px;
}

#form-message.success {
    background-color: #dff0d8;
    color: #3c763d;
}

#form-message.error {
    background-color: #f2dede;
    color: #a94442;
}

/* Modal Styles */
.tof-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.tof-modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #ddd;
    width: 80%;
    max-width: 600px;
    border-radius: 5px;
    position: relative;
}

.tof-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.tof-modal-close:hover,
.tof-modal-close:focus {
    color: black;
    text-decoration: none;
}

.modal-actions {
    margin-top: 20px;
    text-align: right;
}

.modal-actions button {
    padding: 8px 15px;
    margin-left: 10px;
    cursor: pointer;
}

.button-primary {
    background-color: #FF0000;
    color: white;
    border: none;
}

/* For mobile devices */
@media screen and (max-width: 768px) {
    .form-group {
        flex: 0 0 100%;
    }
    
    .checkbox-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .tof-modal-content {
        width: 95%;
        margin: 5% auto;
    }
}