/* delivery.css - COMPLETELY REDESIGNED */
:root {
    --primary-color: #2d5016;
    --primary-light: #4a7c2a;
    --secondary-color: #8db596;
    --accent-color: #f5a623;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --background: #f8faf7;
    --white: #ffffff;
    --border-light: #e8ebe6;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    --shadow: 0 8px 32px rgba(45, 80, 22, 0.1);
    --radius: 16px;
    --gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.delivery-container {
    margin-top: 80px;
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
    background: var(--background);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(141, 181, 150, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(45, 80, 22, 0.05) 0%, transparent 50%);
}

.delivery-title {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 3rem;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.delivery-subtitle {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-light);
    font-size: 1.3rem;
    font-weight: 400;
}

/* Modern Lookup Card */
.order-lookup {
    margin-bottom: 3rem;
}

.lookup-card {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid rgba(141, 181, 150, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.lookup-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
}

.lookup-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    font-weight: 600;
}

.lookup-card p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.lookup-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.lookup-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--background);
    font-weight: 500;
}

.lookup-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
    transform: translateY(-2px);
}

.lookup-help {
    color: var(--text-light);
    font-size: 0.9rem;
}

.lookup-help a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lookup-help a:hover {
    text-decoration: underline;
    color: var(--primary-light);
}

/* Modern Progress Timeline */
.delivery-progress {
    margin-bottom: 3rem;
}

.progress-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(141, 181, 150, 0.2);
}

.progress-card h3 {
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
}

.progress-timeline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.progress-timeline::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 80px;
    right: 80px;
    height: 6px;
    background: linear-gradient(90deg, 
        var(--primary-color) 0%, 
        var(--border-light) 100%);
    z-index: 1;
    border-radius: 3px;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
    text-align: center;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    transition: all 0.4s ease;
    border: 4px solid var(--border-light);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 3;
}

.step-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-size: 1rem;
}

.step-time {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Step States - Much Better */
.timeline-step.completed .step-icon {
    background: var(--success-color);
    color: var(--white);
    border-color: var(--success-color);
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

.timeline-step.current .step-icon {
    background: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
    transform: scale(1.15);
    box-shadow: 0 10px 30px rgba(245, 166, 35, 0.4);
    animation: pulse-glow 2s infinite;
}

.timeline-step.upcoming .step-icon {
    background: var(--white);
    color: var(--text-light);
    border-color: var(--border-light);
}

@keyframes pulse-glow {
    0%, 100% { 
        transform: scale(1.15);
        box-shadow: 0 10px 30px rgba(245, 166, 35, 0.4);
    }
    50% { 
        transform: scale(1.2);
        box-shadow: 0 15px 40px rgba(245, 166, 35, 0.6);
    }
}

/* Progress line fill */
.progress-timeline::after {
    content: '';
    position: absolute;
    top: 40px;
    left: 80px;
    height: 6px;
    background: var(--success-color);
    z-index: 2;
    border-radius: 3px;
    transition: width 0.8s ease;
    width: 0%;
}

/* Modern Order Details */
.order-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.detail-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 6px solid var(--primary-color);
    transition: all 0.3s ease;
    border: 1px solid rgba(141, 181, 150, 0.2);
}

.detail-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(45, 80, 22, 0.15);
}

.detail-card.full-width {
    grid-column: 1 / -1;
}

.detail-card h4 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-card h4::before {
    content: '📋';
    font-size: 1.2rem;
}

.detail-card.delivery-team h4::before { content: '🚚'; }
.detail-card.customer-details h4::before { content: '👤'; }
.detail-card.delivery-notes h4::before { content: '📝'; }

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.detail-item:hover {
    border-bottom-color: var(--primary-color);
}

.detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-item span:first-child {
    font-weight: 600;
    color: var(--text-dark);
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-item span:last-child {
    color: var(--text-light);
    text-align: right;
    flex: 1;
    font-weight: 500;
}

.notes-content {
    background: linear-gradient(135deg, #f8faf7 0%, #ffffff 100%);
    padding: 1.5rem;
    border-radius: var(--radius);
    color: var(--text-dark);
    line-height: 1.6;
    border: 1px solid var(--border-light);
    font-style: italic;
}

/* Modern Delivery Map */
.delivery-map {
    margin-bottom: 3rem;
}

.map-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(141, 181, 150, 0.2);
}

.map-card h4 {
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.map-container {
    background: linear-gradient(135deg, #f8faf7 0%, #e8f5e8 100%);
    border-radius: var(--radius);
    padding: 2.5rem;
    border: 2px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.map-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(45, 80, 22, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(141, 181, 150, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.map-visualization {
    position: relative;
    height: 140px;
    margin-bottom: 2rem;
}

.route-path {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    position: relative;
}

.route-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    text-align: center;
    position: relative;
}

.point-icon {
    width: 60px;
    height: 60px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    border: 3px solid var(--primary-color);
    box-shadow: var(--shadow);
}

.point-label {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 600;
    background: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    border: 1px solid var(--border-light);
}

.route-line {
    position: absolute;
    top: 50%;
    left: 60px;
    right: 60px;
    height: 6px;
    background: var(--border-light);
    z-index: 1;
    border-radius: 3px;
    overflow: hidden;
}

.route-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 1s ease;
    border-radius: 3px;
}

.delivery-vehicle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    z-index: 3;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    left: 10%;
}

.map-status {
    text-align: center;
}

.status-update {
    background: var(--white);
    padding: 1.2rem 2rem;
    border-radius: var(--radius);
    border: 2px solid var(--border-light);
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1rem;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.status-update::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(45, 80, 22, 0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Enhanced No Order Found */
.no-order {
    text-align: center;
    padding: 5rem 2rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 500px;
    margin: 0 auto;
    border: 2px dashed var(--border-light);
}

.no-order-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-order-icon {
    font-size: 5rem;
    margin-bottom: 2rem;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.no-order h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: 1.8rem;
}

.no-order p {
    margin-bottom: 2.5rem;
    color: var(--text-light);
    line-height: 1.6;
    font-size: 1.1rem;
}

.no-order-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons - Enhanced */
.btn-primary {
    background: var(--gradient);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 80, 22, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 1rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 80, 22, 0.2);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .delivery-container {
        padding: 1rem;
        margin-top: 60px;
    }
    
    .delivery-title {
        font-size: 2.2rem;
    }
    
    .lookup-card {
        padding: 2rem 1.5rem;
    }
    
    .lookup-form {
        flex-direction: column;
    }
    
    .progress-timeline {
        flex-direction: column;
        align-items: flex-start;
        gap: 2.5rem;
        padding: 0 1rem;
    }
    
    .progress-timeline::before {
        display: none;
    }
    
    .timeline-step {
        flex-direction: row;
        align-items: center;
        width: 100%;
        text-align: left;
        gap: 1.5rem;
    }
    
    .step-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .step-info {
        flex: 1;
    }
    
    .order-details-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .detail-item {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .detail-item span:last-child {
        text-align: left;
    }
    
    .no-order-actions {
        flex-direction: column;
    }
    
    .no-order-actions .btn-primary,
    .no-order-actions .btn-secondary {
        width: 100%;
    }
    
    .map-container {
        padding: 1.5rem;
    }
    
    .point-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .delivery-vehicle {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .delivery-title {
        font-size: 1.8rem;
    }
    
    .lookup-card,
    .progress-card,
    .map-card {
        padding: 1.5rem;
    }
    
    .step-icon {
        width: 50px;
        height: 50px;
    }
    
    .route-point .point-icon {
        width: 45px;
        height: 45px;
    }
}