/**
 * Shopify-Style Progress Sidebar
 * Modern checkout progress indicator with order summary
 */

/* Main Layout Container */
.wmc-checkout-wrapper {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    gap: 40px;
    padding: 20px;
}

.wmc-wizard-main {
    flex: 1;
    min-width: 0;
}

/* Progress Sidebar Container */
.wmc-progress-sidebar {
    width: 400px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.wmc-progress-sidebar-inner {
    background: #fafafa;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 24px;
}

/* Progress Steps Section */
.wmc-progress-steps {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e1e1e1;
}

.wmc-progress-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wmc-step-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    position: relative;
    transition: all 0.3s ease;
}

.wmc-step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 44px;
    width: 2px;
    height: calc(100% - 20px);
    background: #e1e1e1;
    transition: background 0.3s ease;
}

.wmc-step-item.completed::after {
    background: #4caf50;
}

.wmc-step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

/* Step States */
.wmc-step-item.pending .wmc-step-indicator {
    background: #fff;
    border: 2px solid #e1e1e1;
    color: #999;
}

.wmc-step-item.current .wmc-step-indicator {
    background: #007cba;
    border: 2px solid #007cba;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 124, 186, 0.1);
}

.wmc-step-item.completed .wmc-step-indicator {
    background: #4caf50;
    border: 2px solid #4caf50;
    color: #fff;
}

.wmc-step-item.completed .wmc-step-indicator::before {
    content: '\2713';
    font-size: 18px;
}

.wmc-step-item.completed .wmc-step-indicator .wmc-step-number {
    display: none;
}

.wmc-step-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.wmc-step-item.current .wmc-step-label {
    color: #333;
    font-weight: 600;
}

.wmc-step-item.completed .wmc-step-label {
    color: #4caf50;
}

/* Order Summary Section */
.wmc-order-summary {
    margin-bottom: 24px;
}

.wmc-order-items {
    margin-bottom: 16px;
}

.wmc-order-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e1e1e1;
}

.wmc-order-item:first-child {
    padding-top: 0;
}

.wmc-order-item:last-child {
    border-bottom: none;
}

.wmc-item-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e1e1e1;
    position: relative;
}

.wmc-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wmc-item-quantity {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #333;
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    border: 2px solid #fafafa;
}

.wmc-item-details {
    flex: 1;
    min-width: 0;
}

.wmc-item-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
    font-weight: 500;
    line-height: 1.4;
}

.wmc-item-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.wmc-item-price {
    font-size: 14px;
    color: #333;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

/* Price Breakdown */
.wmc-price-breakdown {
    padding: 16px 0;
    border-top: 1px solid #e1e1e1;
}

.wmc-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}

.wmc-price-label {
    color: #666;
}

.wmc-price-value {
    color: #333;
    font-weight: 500;
}

.wmc-price-row.shipping-pending .wmc-price-value {
    color: #999;
    font-style: italic;
    font-size: 13px;
}

.wmc-price-row.total {
    padding-top: 16px;
    margin-top: 8px;
    border-top: 2px solid #333;
    font-size: 18px;
    font-weight: 700;
}

.wmc-price-row.total .wmc-price-label {
    color: #333;
}

.wmc-price-row.total .wmc-price-value {
    color: #333;
}

/* Trust Badges */
.wmc-trust-badges {
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
    text-align: center;
}

.wmc-trust-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.wmc-trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
}

.wmc-trust-icon {
    font-size: 16px;
    color: #4caf50;
}

.wmc-trust-icon.lock::before {
    content: '🔒';
}

.wmc-trust-icon.shield::before {
    content: '🛡️';
}

.wmc-trust-icon.check::before {
    content: '✓';
    background: #4caf50;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .wmc-checkout-wrapper {
        flex-direction: column;
        gap: 24px;
    }

    .wmc-progress-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        order: -1;
    }

    .wmc-progress-sidebar-inner {
        padding: 20px;
    }

    .wmc-progress-steps {
        display: none;
    }

    /* Mobile: Show compact progress bar */
    .wmc-progress-mobile {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 16px;
        padding-bottom: 16px;
        border-bottom: 1px solid #e1e1e1;
    }

    .wmc-progress-mobile-bar {
        flex: 1;
        height: 8px;
        background: #e1e1e1;
        border-radius: 4px;
        overflow: hidden;
    }

    .wmc-progress-mobile-fill {
        height: 100%;
        background: linear-gradient(90deg, #007cba 0%, #4caf50 100%);
        transition: width 0.4s ease;
    }

    .wmc-progress-mobile-text {
        font-size: 12px;
        color: #666;
        font-weight: 600;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .wmc-checkout-wrapper {
        padding: 12px;
    }

    .wmc-progress-sidebar-inner {
        padding: 16px;
    }

    .wmc-order-item {
        gap: 10px;
    }

    .wmc-item-image {
        width: 50px;
        height: 50px;
    }

    .wmc-item-name {
        font-size: 13px;
    }

    .wmc-price-row {
        font-size: 13px;
    }

    .wmc-price-row.total {
        font-size: 16px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .wmc-progress-sidebar-inner {
        background: #1a1a1a;
        border-color: #333;
    }

    .wmc-progress-title,
    .wmc-step-label,
    .wmc-item-name,
    .wmc-price-label,
    .wmc-price-value {
        color: #e1e1e1;
    }

    .wmc-order-item {
        border-bottom-color: #333;
    }

    .wmc-item-image {
        background: #2a2a2a;
        border-color: #333;
    }

    .wmc-price-breakdown {
        border-top-color: #333;
    }

    .wmc-price-row.total {
        border-top-color: #555;
    }
}

/* Animation Classes */
.wmc-fade-in {
    animation: wmcFadeIn 0.3s ease;
}

@keyframes wmcFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wmc-slide-in {
    animation: wmcSlideIn 0.4s ease;
}

@keyframes wmcSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Accessibility */
.wmc-step-item:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
    border-radius: 4px;
}

.wmc-screen-reader-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
