/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: hsl(240, 20%, 99%);
    color: hsl(220, 15%, 20%);
    line-height: 1.6;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

/* Container - NEGATIVE TOP MARGIN */
.container {
    max-width: 896px;
    margin: -1rem auto 0; /* Negative top margin to move up */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0.25rem 1rem 14rem; /* Minimal padding */
}

/* Order Card */
.order-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid hsl(220, 13%, 91%);
    animation: fadeIn 0.5s ease-out;
    margin-bottom: 0.5rem;
}

.order-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Header - COMPACT SIZE - UPDATED TO MATCH MAIN HEADER */
.order-header {
    background: #004d40; /* Same dark green as your main header */
    color: white;
    padding: 0.6rem 1.25rem;
    border-bottom: 2px solid #00332a; /* Border to match header style */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.2rem;
}

.order-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0;
    line-height: 1.2;
}

.order-id {
    font-size: 0.7rem;
    opacity: 0.9;
    margin-top: 0.05rem;
    line-height: 1.2;
}

.order-date {
    font-size: 0.6rem;
    opacity: 0.8;
    margin-top: 0.2rem;
    line-height: 1.2;
}

/* Badge - COMPACT SIZE - UPDATED TO MATCH HEADER */
.badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.15); /* Lighter transparency to match header */
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    line-height: 1.2;
}

.badge-success {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.badge-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.badge-destructive {
    background: hsl(0, 84%, 60%);
    color: white;
    padding: 0.4rem 0.8rem;
    border: none;
}

/* Order Info Grid - REDUCED SPACING */
.order-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: hsl(215, 25%, 97%);
}

@media (min-width: 768px) {
    .order-info-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.info-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: hsl(220, 10%, 50%);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.info-value {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.info-text {
    font-weight: 600;
    color: hsl(220, 15%, 20%);
    font-size: 0.85rem;
    line-height: 1.2;
}

.info-price {
    font-weight: 700;
    font-size: 1rem;
    color: hsl(220, 15%, 20%);
    line-height: 1.2;
}

.delivery-fee {
    font-size: 0.7rem;
    color: hsl(220, 10%, 50%);
    margin-left: 0.2rem;
}

/* Icon Styles */
.icon {
    width: 0.9rem;
    height: 0.9rem;
    flex-shrink: 0;
}

.icon-primary {
    color: hsl(217, 91%, 45%);
}

.icon-accent {
    color: hsl(142, 76%, 45%);
}

.icon-muted {
    color: hsl(220, 10%, 50%);
}

.icon-muted-fg {
    color: hsl(220, 10%, 50%);
}

/* Progress Section - REDUCED SPACING */
.progress-section {
    padding: 1.5rem 1.5rem;
}

.progress-container {
    position: relative;
}

.progress-line {
    position: absolute;
    top: 1rem;
    left: 0;
    right: 0;
    height: 0.2rem;
    background: hsl(220, 13%, 91%);
    z-index: 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, hsl(217, 91%, 45%), hsl(142, 76%, 45%));
    transition: width 0.5s ease;
}

.progress-steps {
    position: relative;
    display: flex;
    justify-content: space-between;
    z-index: 1;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.step-circle {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    transition: all 0.3s ease;
    z-index: 10;
    position: relative;
}

.step-completed {
    background: linear-gradient(135deg, hsl(217, 91%, 45%), hsl(142, 76%, 45%));
    box-shadow: 0 8px 12px -3px rgba(0, 0, 0, 0.1);
}

.step-active {
    background: hsl(217, 91%, 45%);
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.1);
}

.step-inactive {
    background: hsl(215, 25%, 96%);
}

.step-icon {
    width: 1rem;
    height: 1rem;
    stroke-width: 2;
    color: white;
}

.step-label {
    font-size: 0.7rem;
    margin-top: 0.5rem;
    text-align: center;
    max-width: 90px;
    font-weight: 500;
    color: hsl(220, 10%, 50%);
    line-height: 1.2;
}

.step-active-label {
    color: hsl(220, 15%, 20%);
}

/* Products Section - REDUCED SPACING */
.products-section {
    padding: 0 1.5rem 1rem;
}

.products-title {
    font-weight: 600;
    color: hsl(220, 15%, 20%);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    line-height: 1.2;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border-radius: 0.5rem;
    background: hsl(215, 25%, 98%);
    border: 1px solid hsl(220, 13%, 91%);
    margin-bottom: 0.5rem;
    transition: background 0.2s ease;
}

.product-item:hover {
    background: hsl(215, 25%, 96%);
}

.product-image {
    width: 3.5rem;
    height: 3.5rem;
    background: hsl(215, 25%, 96%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid hsl(220, 13%, 91%);
    flex-shrink: 0;
}

.product-info {
    flex: 1;
}

.product-name {
    font-weight: 600;
    color: hsl(220, 15%, 20%);
    font-size: 0.9rem;
    line-height: 1.2;
}

.product-color {
    font-size: 0.8rem;
    color: hsl(220, 10%, 50%);
    line-height: 1.2;
}

.product-price {
    font-weight: 700;
    font-size: 1rem;
    color: hsl(220, 15%, 20%);
    line-height: 1.2;
}

/* Footer - REDUCED SPACING */
.order-footer {
    padding: 0.8rem 1.5rem;
    background: hsl(215, 25%, 97%);
    border-top: 1px solid hsl(220, 13%, 91%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    line-height: 1.2;
}

.contact-label {
    color: hsl(220, 10%, 50%);
}

.contact-link {
    font-weight: 600;
    color: hsl(217, 91%, 45%);
    text-decoration: none;
}

/* Cancel Button */
.cancel-btn {
    background: hsl(0, 84%, 60%);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 0.4rem;
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1.2;
}

.cancel-btn:hover {
    background: hsl(0, 84%, 55%);
    box-shadow: 0 6px 10px -3px rgba(0, 0, 0, 0.1);
}

.cancel-btn:active {
    transform: translateY(1px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Responsive Design */
@media (max-width: 640px) {
    .container {
        margin: -0.5rem auto 0; /* Smaller negative margin for mobile */
        padding: 0.1rem 0.5rem; /* Minimal padding for mobile */
        gap: 1rem;
    }

    .order-header {
        padding: 0.5rem 1rem;
    }

    .order-title {
        font-size: 0.9rem;
    }

    .order-info-grid {
        padding: 0.8rem 1rem;
        gap: 0.6rem;
    }

    .progress-section {
        padding: 1rem 1rem;
    }

    .products-section {
        padding: 0 1rem 0.8rem;
    }

    .step-label {
        font-size: 0.6rem;
        max-width: 70px;
        margin-top: 0.4rem;
    }

    .step-circle {
        width: 1.8rem;
        height: 1.8rem;
    }

    .step-icon {
        width: 0.9rem;
        height: 0.9rem;
    }

    .product-item {
        gap: 0.6rem;
        padding: 0.6rem;
    }

    .product-image {
        width: 3rem;
        height: 3rem;
    }

    .order-footer {
        padding: 0.6rem 1rem;
    }
}

/* Hide badge class from Customerdashboard.css that might conflict */
.cart-badge.hidden {
    display: none !important;
}