/* Order Related Styles */

/* Order Status Button Styles */
.status-btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
    min-width: 120px;
    text-align: center;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-btn.pending {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #8b6914;
    border: 1px solid #ffd93d;
}

.status-btn.pending:hover {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.status-btn.in-progress {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border: 1px solid #6c757d;
}

.status-btn.in-progress:hover {
    background: linear-gradient(135deg, #bee5eb 0%, #a2daef 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
}

.status-btn.small {
    padding: 10px 16px;
    font-size: 13px;
    min-width: 100px;
}

/* Status Badge Styles (for completed status) */
.status-badge {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    text-transform: capitalize;
    display: inline-block;
    min-width: 120px;
    text-align: center;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-badge.completed {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #28a745;
}

.status-badge.in_progress {
    background: #4CAF50;
    color: white;
    white-space: nowrap;
    word-break: normal;
}

.status-badge.pending {
    background: #fff3e0;
    color: #e65100;
}

.status-badge.in-progress {
    background: #e3f2fd;
    color: #1565c0;
}

.pending {
    background: #ffd700;
    color: black;
}

.in-progress {
    background: #4CAF50;
    color: white;
}

.completed {
    background: #808080;
    color: white;
}

/* Take Order Section Styles */
#take-order-section .service-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 8px;
}

.service-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.service-option:hover {
    border-color: #2E7D32;
    background: #f8f9fa;
}

.service-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.service-option input[type="radio"]:checked + .service-icon + .service-label,
.service-option input[type="radio"]:checked + .service-icon {
    color: #2E7D32;
}

.service-option input[type="radio"]:checked ~ * {
    color: #2E7D32;
}

.service-option input[type="radio"]:checked + .service-icon {
    transform: scale(1.1);
}

.service-option:has(input[type="radio"]:checked) {
    border-color: #2E7D32;
    background: #E8F5E9;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.1);
}

.service-icon {
    font-size: 24px;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.service-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: color 0.3s ease;
}

#take-order-section select {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

#take-order-section select:hover {
    border-color: #bdbdbd;
}

#take-order-section select:focus {
    border-color: #2E7D32;
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.1);
    outline: none;
}

/* Order Popup Styles */
#order-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 25px;
    border: 2px solid #4CAF50;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    max-width: 90%;
    width: 400px;
    box-sizing: border-box;
}

.popup-content {
    min-width: 250px;
}

.popup-content h3 {
    color: #2E7D32;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.popup-content p {
    margin: 12px 0;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.popup-content p strong {
    color: #333;
}

.popup-content p span {
    color: #666;
}

.popup-content button {
    margin-top: 20px;
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

/* Filter sidebar for orders */
.order-module {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.filter-sidebar {
    flex: 0 0 250px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 8px;
    background-color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
    outline: none;
}

.filter-group select:hover,
.filter-group input:hover {
    border-color: #bdbdbd;
}

.filter-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.filter-actions button {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    min-width: 0;
}

.form-section {
    flex: 1;
    overflow-x: auto;
}

.filter-row {
    display: flex;
    gap: 16px;
    padding: 16px;
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    align-items: flex-end;
}

.filter-item {
    flex: 1;
}

.filter-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.filter-item select,
.filter-item input[type="date"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.date-inputs {
    display: flex;
    gap: 8px;
}

.date-inputs input[type="date"] {
    flex: 1;
}

.filter-actions .apply-btn {
    background: #4CAF50;
    color: white;
}

.filter-actions .clear-btn {
    background: #f5f5f5;
    color: #666;
}

/* Service type options */
.service-type-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.service-type-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.service-type-options label:hover {
    background: #f0f0f0;
    border-color: #2E7D32;
}

input[type="radio"] {
    margin: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #4CAF50;
    transform: scale(1.2);
}

/* Mobile Responsive Styles for Orders */
@media (max-width: 768px) {
    #order-popup {
        padding: 20px;
        width: calc(100% - 30px);
        max-height: 90vh;
        overflow-y: auto;
    }

    .popup-content h3 {
        font-size: 1.1em;
        margin-bottom: 15px;
    }

    .popup-content p {
        font-size: 14px;
        margin: 10px 0;
        flex-wrap: wrap;
    }

    .popup-content p strong {
        min-width: 120px;
    }

    .popup-content button {
        margin-top: 15px;
        padding: 14px;
    }

    .order-module {
        flex-direction: column;
        padding: 10px;
    }

    .filter-sidebar {
        display: none; /* Hide filter sidebar on mobile */
    }

    .form-section {
        width: 100%;
    }

    .filter-row {
        flex-direction: column;
        gap: 12px;
        padding: 8px;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    .filter-item {
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .filter-actions {
        width: 100%;
        padding: 0;
    }
    
    .filter-actions button {
        flex: 1;
        height: 35px;
        padding: 8px 16px;
        border: none;
        border-radius: 4px;
        font-size: 14px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .service-type-options {
        flex-direction: column;
        gap: 8px;
    }

    .service-type-options label {
        width: 100%;
        margin: 4px 0;
        padding: 12px;
    }
}

@media (max-width: 640px) {
    #take-order-section .service-options {
        grid-template-columns: 1fr;
    }

    .service-option {
        flex-direction: row;
        justify-content: center;
        gap: 12px;
        padding: 12px;
    }

    .service-icon {
        margin-bottom: 0;
    }

    #take-order-section select,
    #take-order-section input {
        font-size: 16px;
    }
}

/* Action cell styles in order tables */
.action-cell {
    text-align: center;
    width: 100px;
}

.action-cell button:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
