/* Checkout Prerequisites Navigation Styles */

/* CSS Custom Properties */
:root {
    --connection-progress: 0%;
    --primary-color: #007cba;
    --success-color: #4CAF50;
    --warning-color: #ffc107;
    --error-color: #dc3545;
    --text-color: #333;
    --border-color: #e9ecef;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Main Container */
.checkout-prerequisites {
    max-width: 1200px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Status Header */
.status-header {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

/* Static Header */
.static-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkout-main-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
}

.progress-stats {
    display: flex;
    align-items: center;
}

.steps-count {
    color: #555;
    font-size: 13px;
    font-weight: 600;
    background: #f8f9fa;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Step Header in Step Body */
.step-body .step-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.step-title-main {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
}

.step-description-main {
    margin: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

/* Enhanced Progress Steps */
.checkout-progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 30px;
}

/* Connection line background */
.checkout-progress-steps::before {
    content: '';
    position: absolute;
    top: 30px;
    left: calc(30px + 30px);
    right: calc(30px + 30px);
    height: 3px;
    background: var(--border-color);
    z-index: 1;
    border-radius: 2px;
}

/* Connection line progress */
.checkout-progress-steps::after {
    content: '';
    position: absolute;
    top: 30px;
    left: calc(30px + 30px);
    height: 3px;
    background: linear-gradient(90deg, var(--success-color) 0%, #66BB6A 100%);
    z-index: 2;
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: var(--connection-progress);
    max-width: calc(100% - 60px - 60px);
}

/* Step Indicators */
.step-indicator {
    position: relative;
    z-index: 3;
    text-decoration: none;
    flex: 1;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px;
    border-radius: 12px;
}

.step-indicator:hover {
    transform: translateY(-2px);
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.05);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s;
}

.step-indicator:hover::before {
    opacity: 1;
}

/* Step Numbers - Clean, numbers only */
.step-number {
    width: 60px;
    height: 60px;
    background: white;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-weight: 700;
    font-size: 18px;
    color: #6c757d;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: var(--shadow);
}

/* Checkout step gets cart icon instead of number */
.step-indicator.checkout-step .step-number::before {
    content: '🛒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
}

/* Step Info */
.step-info {
    padding: 0 12px;
}

.step-title {
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 1.3;
}

.step-status {
    font-size: 12px;
    font-weight: 500;
}

/* Completed Steps */
.step-indicator.completed .step-number {
    background: linear-gradient(135deg, var(--success-color) 0%, #66BB6A 100%);
    border-color: var(--success-color);
    color: #6c757d;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.step-indicator.completed .step-title {
    color: var(--success-color);
}

/* Checkout step completed */
.step-indicator.completed.checkout-step .step-number::before {
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
}

/* Current Step */
.step-indicator.current .step-number {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, #0096dc 100%);
    color: white;
    transform: scale(1.1);
    animation: currentStepPulse 2s infinite;
}

@keyframes currentStepPulse {
    0% {
        box-shadow: 0 0 0 4px rgba(0, 124, 186, 0.3);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(0, 124, 186, 0.1);
    }
    100% {
        box-shadow: 0 0 0 4px rgba(0, 124, 186, 0.3);
    }
}

.step-indicator.current .step-title {
    color: var(--primary-color);
    font-weight: 700;
}

/* Current checkout step */
.step-indicator.current.checkout-step .step-number::before {
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
}

/* Current completed step */
.step-indicator.current.completed .step-number {
    background: linear-gradient(135deg, var(--success-color) 0%, #66BB6A 100%);
    border-color: var(--primary-color);
}

/* Future checkout step - same as other locked steps */
.step-indicator:not(.completed):not(.current).checkout-step .step-number {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #adb5bd;
}

.step-indicator:not(.completed):not(.current).checkout-step .step-number::before {
    color: #adb5bd;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
}

.step-indicator:not(.completed):not(.current).checkout-step:hover .step-number {
    border-color: var(--primary-color);
}

.step-indicator:not(.completed):not(.current).checkout-step:hover .step-number::before {
    color: var(--primary-color);
}

.step-indicator:not(.completed):not(.current).checkout-step .step-title {
    color: #6c757d;
}

/* Enhanced Navigation */
.checkout-step-navigation {
    margin: 32px 20px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

/* Both buttons styled consistently when shown */
.nav-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    min-width: 140px;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0096dc 100%);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.nav-button::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;
}

.nav-button:hover::before {
    left: 100%;
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
}

/* Proceed to donate gets special green styling */
.nav-button.proceed-to-donate {
    background: linear-gradient(135deg, var(--success-color) 0%, #34ce57 100%);
    border-color: var(--success-color);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.nav-button.proceed-to-donate:hover {
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Status Indicators - Checkmark back in status area */
.status-completed {
    color: var(--success-color);
    font-weight: 600;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.status-completed::before {
    content: '✓';
    font-size: 10px;
    font-weight: 700;
}

.status-incomplete {
    color: #6c757d;
    font-weight: 500;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(108, 117, 125, 0.1);
    border: 1px solid rgba(108, 117, 125, 0.2);
}

/* Notification System */
.checkout-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    min-width: 300px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkout-notification__content {
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.checkout-notification__message {
    flex: 1;
    line-height: 1.5;
    font-weight: 500;
    white-space: pre-line;
}

.checkout-notification__close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-notification__close:hover {
    opacity: 1;
}

/* Notification Types */
.checkout-notification--error {
    background: linear-gradient(135deg, var(--error-color) 0%, #c82333 100%);
    color: white;
    border-left: 4px solid #a71e2a;
}

.checkout-notification--warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #e0a800 100%);
    color: #212529;
    border-left: 4px solid #d39e00;
}

.checkout-notification--success {
    background: linear-gradient(135deg, var(--success-color) 0%, #1e7e34 100%);
    color: white;
    border-left: 4px solid #1c7430;
}

.checkout-notification--info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    border-left: 4px solid #117a8b;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading States */
body.checkout-navigating {
    cursor: progress;
}

body.checkout-navigating * {
    pointer-events: none;
}

.step-indicator.just-completed {
    animation: celebrate 0.6s ease-in-out;
}

@keyframes celebrate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Focus states for accessibility */
.step-indicator:focus,
.nav-button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .checkout-prerequisites {
        margin: 15px;
    }
    
    .status-header {
        padding: 20px 16px;
    }
    
    .static-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .checkout-main-title {
        font-size: 20px;
    }

    .step-body .step-header {
        margin-bottom: 24px;
        padding-bottom: 16px;
    }
    
    .step-title-main {
        font-size: 22px;
    }
    
    .step-description-main {
        font-size: 14px;
    }

    .checkout-progress-steps {
        flex-direction: column;
        gap: 16px;
        padding: 0;
    }

    .checkout-progress-steps::before,
    .checkout-progress-steps::after {
        display: none;
    }

    .step-indicator {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 12px 16px;
        border-radius: 12px;
        background: #f8f9fa;
        border: 1px solid var(--border-color);
    }

    .step-indicator.completed {
        background: rgba(76, 175, 80, 0.05);
        border-color: rgba(76, 175, 80, 0.2);
    }
    
    .step-indicator.current {
        background: rgba(0, 124, 186, 0.05);
        border-color: rgba(0, 124, 186, 0.3);
    }

    .step-number {
        margin: 0;
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
    
    .step-indicator.current .step-number {
        transform: none;
    }

    .step-indicator.checkout-step .step-number::before {
        font-size: 20px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .step-info {
        text-align: left;
        flex: 1;
        padding: 0;
    }
    
    .step-title {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .checkout-step-navigation {
        flex-direction: column;
        gap: 12px;
        margin: 24px 16px;
    }
    
    .nav-button {
        width: 100%;
        padding: 16px 24px;
        font-size: 16px;
        min-width: auto;
    }

    .checkout-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        min-width: auto;
    }
    
    .checkout-notification__content {
        padding: 14px 16px;
    }
    
    .checkout-notification__message {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .checkout-main-title {
        font-size: 18px;
    }
    
    .step-title-main {
        font-size: 20px;
    }
    
    .step-number {
        width: 45px;
        height: 45px;
        font-size: 14px;
    }
    
    .step-indicator.checkout-step .step-number::before {
        font-size: 18px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .step-title {
        font-size: 15px;
    }
}

/* High contrast and accessibility */
@media (prefers-contrast: high) {
    .step-number {
        border-width: 3px;
    }
    
    .nav-button {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}