/* Tracking Modal Styles */
.tawasel-tracking-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.tawasel-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.tawasel-close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.tawasel-close-modal:hover {
    color: #00B5F5;
}

.tawasel-modal-content h2 {
    color: #00B5F5;
    margin-bottom: 25px;
    text-align: center;
    font-size: 24px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

/* Tracking Form */
.tawasel-tracking-form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

/* Fix input text color */
.tawasel-tracking-input {
    color: #333 !important;
    background-color: #fff !important;
}

.tawasel-tracking-input::placeholder {
    color: #999 !important;
    opacity: 1;
}

.tawasel-tracking-input:-ms-input-placeholder {
    color: #999 !important;
}

.tawasel-tracking-input::-ms-input-placeholder {
    color: #999 !important;
}

.tawasel-tracking-btn {
    background: linear-gradient(135deg, #00B5F5, #0099CC);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tawasel-tracking-btn:hover {
    background: linear-gradient(135deg, #0099CC, #0077AA);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 181, 245, 0.3);
}

/* Loading Spinner */
.tawasel-loading-spinner {
    text-align: center;
    padding: 40px;
    display: none;
}

.tawasel-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #00B5F5;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Order Table */
.tawasel-order-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-size: 14px;
}

.tawasel-order-table th {
    background: linear-gradient(135deg, #00B5F5, #0099CC);
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tawasel-order-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    vertical-align: middle;
}

.tawasel-order-table tbody tr:hover {
    background-color: #f8fdff;
}

.tawasel-order-table .sequence-number {
    font-weight: 600;
    color: #00B5F5;
    font-size: 16px;
}

.track_table_sequence_and_reference_col {
    color: #666;
    font-size: 13px;
    font-style: italic;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 5px;
}

.track_table_reference_col {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.status-delivered {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.status-received {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.status-transit {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.status-out-for-delivery {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.status-cancelled {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.previous-status {
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
}

.order-datetime {
    color: #333;
    font-weight: 500;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-family: monospace;
}

/* Error Messages */
.tawasel-error {
    background: #ffeaea;
    color: #e74c3c;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    text-align: center;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tawasel-modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
    
    .tawasel-tracking-form {
        flex-direction: column;
    }
    
    .tawasel-tracking-btn {
        width: 100%;
    }
    
    .tawasel-order-table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
    }
    
    .tawasel-order-table th,
    .tawasel-order-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .tawasel-modal-content h2 {
        font-size: 20px;
    }
    
    .tawasel-order-table {
        font-size: 11px;
    }
    
    .sequence-number {
        font-size: 14px !important;
    }
    
    .track_table_reference_col {
        font-size: 13px !important;
    }
}