/* Swiggy-Style Delivery Tracker - Frontend Styles */

/* Order Tracking Form */
.swiggy-order-tracker {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tracking-form h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
    text-align: center;
}

.tracking-form .form-group {
    margin-bottom: 20px;
}

.tracking-form label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.tracking-form input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.tracking-form input[type="text"]:focus {
    outline: none;
    border-color: #fc8019;
}

.tracking-form button {
    width: 100%;
    padding: 14px 24px;
    background: #fc8019;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.tracking-form button:hover {
    background: #e67312;
}

/* Tracking Results */
.tracking-result {
    margin-top: 30px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tracking-info h4 {
    color: #333;
    margin-bottom: 25px;
    font-size: 20px;
    text-align: center;
}

/* Order Progress Tracker */
.order-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 20px 0;
    margin-bottom: 30px;
}

.order-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #e0e0e0;
    z-index: 0;
}

.progress-step {
    position: relative;
    text-align: center;
    flex: 1;
    z-index: 1;
}

.step-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 3px solid #e0e0e0;
    transition: all 0.3s;
}

.progress-step.completed .step-icon,
.progress-step.active .step-icon {
    background: #fc8019;
    border-color: #fc8019;
    color: white;
}

.progress-step.completed .step-icon {
    background: #28a745;
    border-color: #28a745;
}

.step-title {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.progress-step.completed .step-title,
.progress-step.active .step-title {
    color: #333;
    font-weight: 600;
}

/* Progress Line Animation */
.progress-step.completed::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 4px;
    background: #28a745;
    z-index: -1;
}

/* Delivery Location */
.delivery-location {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.delivery-location h5 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.delivery-location .button {
    display: inline-block;
    padding: 10px 24px;
    background: #0084ff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.delivery-location .button:hover {
    background: #0071e3;
}

/* Delivery Login Page */
.delivery-login-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f5f5f5;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 28px;
}

.login-box label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 20px;
}

.login-box button {
    width: 100%;
    padding: 14px 24px;
    background: #fc8019;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

/* Delivery Dashboard */
.delivery-dashboard {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.delivery-dashboard h2 {
    color: #333;
    margin-bottom: 10px;
}

.delivery-dashboard h3 {
    color: #555;
    margin: 30px 0 20px;
    font-size: 22px;
}

.orders-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.order-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s;
}

.order-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.order-card h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.order-card p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.order-card strong {
    color: #555;
}

/* Order Status Badge */
.order-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.status-order-accepted {
    background: #e3f2fd;
    color: #1976d2;
}

.status-preparing {
    background: #fff3cd;
    color: #856404;
}

.status-out-for-delivery {
    background: #d1ecf1;
    color: #0c5460;
}

.status-delivered {
    background: #d4edda;
    color: #155724;
}

/* Delivery Location Input */
.delivery-location-input {
    width: calc(100% - 80px);
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 10px;
}

.update-location-btn {
    padding: 8px 16px;
    background: #0084ff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

/* Order Actions */
.order-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.order-actions .button {
    width: 100%;
    padding: 12px 20px;
    background: #fc8019;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.order-actions .button:hover {
    background: #e67312;
}

.order-actions .button-primary {
    background: #28a745;
}

.order-actions .button-primary:hover {
    background: #218838;
}

.order-actions .button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .order-progress {
        flex-direction: column;
    }
    
    .order-progress::before {
        width: 4px;
        height: 100%;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .progress-step {
        margin-bottom: 30px;
    }
    
    .progress-step.completed::after {
        top: 100%;
        left: 50%;
        width: 4px;
        height: 100%;
        transform: translateX(-50%);
    }
    
    .orders-list {
        grid-template-columns: 1fr;
    }
}