/**
 * BT Order Processing Popup Styles
 * Save as: assets/bt-order-processing.css
 */

/* Override WooCommerce default processing overlay */
body.bt-order-processing .woocommerce .blockUI.blockOverlay,
body.bt-order-processing .woocommerce .blockUI.blockMsg,
body.bt-order-processing .blockUI.blockOverlay,
body.bt-order-processing .blockUI.blockMsg {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Overlay */
.bt-processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    backdrop-filter: blur(4px);
}

/* Modal */
.bt-processing-modal {
    background: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: btModalSlideIn 0.3s ease-out;
}

@keyframes btModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.bt-processing-header {
    background: linear-gradient(135deg, #5514B4 0%, #7B2CBF 100%);
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: 12px 12px 0 0;
}

.bt-processing-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    color: #fff !important;
}

.bt-processing-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
    color: #fff !important;
}

/* Steps Container */
.bt-processing-steps {
    padding: 30px;
}
 
.bt-processing-steps .bt-step-content {
    text-align: center;
}
/* Step Item */
.bt-step-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    position: relative;
}
.bt-step-item.bt-step-active{
    margin: 0 auto !important;
    max-width: 90%;
    display: flex !important;
    justify-content: center;
    flex-wrap: wrap;
}
.bt-step-item:last-child {
    margin-bottom: 0;
}

/* Active Step */
.bt-step-item.bt-step-active {
    background: #E8F4FD;
    border: 2px solid #5514B4;
    box-shadow: 0 4px 12px rgba(85, 20, 180, 0.15);
}

/* Complete Step */
.bt-step-item.bt-step-complete {
    background: #E8F5E9;
    border: 2px solid #4CAF50;
}

 
/* Step Content */
.bt-step-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bt-step-label {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.bt-step-active .bt-step-label {
    color: #5514B4;
    font-weight: 600;
}

/* Step Spinner */
.bt-step-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid #E0E0E0;
    border-top-color: #5514B4;
    border-radius: 50%;
    animation: btSpin 0.8s linear infinite;
}

.bt-step-active .bt-step-spinner {
    display: block;
}

@keyframes btSpin {
    to { transform: rotate(360deg); }
}

/* Step Status */
.bt-step-status {
    display: none;
    font-size: 24px;
    color: #4CAF50;
    margin-left: 15px;
    animation: btCheckmark 0.3s ease-in;
}

.bt-step-complete .bt-step-status {
    display: block;
}

@keyframes btCheckmark {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Footer */
.bt-processing-footer {
    padding: 30px;
    border-top: 1px solid #E0E0E0;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* Progress Bar */
.bt-progress-bar {
    width: 100%;
    height: 8px;
    background: #E0E0E0;
    border-radius: 4px;
    overflow: hidden; 
}

.bt-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #5514B4 0%, #7B2CBF 100%);
    transition: width 0.5s ease;
    border-radius: 4px;
}

/* Processing Note */
.bt-processing-note {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.bt-processing-note strong {
    color: #5514B4;
    display: block;
    margin-bottom: 5px;
}

/* Error State */
.bt-processing-error {
    padding: 40px;
    text-align: center;
}

.bt-error-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.bt-processing-error h3 {
    color: #dc3545;
    margin: 0 0 15px 0;
    font-size: 22px;
}

.bt-error-message {
    color: #666;
    font-size: 15px;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Buttons */
.bt-processing-error .bt-btn {
    margin: 0 5px;
    padding: 12px 30px;
    font-size: 15px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.bt-btn-primary {
    background: #5514B4;
    color: white;
}

.bt-btn-primary:hover {
    background: #7B2CBF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(85, 20, 180, 0.3);
}

.bt-btn-secondary {
    background: #6c757d;
    color: white;
}

.bt-btn-secondary:hover {
    background: #5a6268;
}
/**
 * BT Order Processing Popup Styles
 * Add to: assets/bt-order-processing.css
 */

.bt-processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bt-processing-modal {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bt-processing-header {
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.bt-processing-header h2 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #5514B4;
    font-weight: 600;
}

.bt-processing-subtitle {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.bt-processing-steps {
    padding: 20px 30px;
    min-height: 200px;
}

.bt-step-item {
    display: none; /* Hidden by default */
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.bt-step-item:last-child {
    border-bottom: none;
}

.bt-step-item.bt-step-active,
.bt-step-item.bt-step-complete {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bt-step-item.bt-step-active {
    background: #f8f4ff;
    margin: 0 -30px;
    padding: 15px 30px;
    border-radius: 8px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.bt-step-item.bt-step-complete {
    opacity: 0.6;
}

.bt-step-item .bt-step-icon {
    font-size: 24px;
    min-width: 30px;
    text-align: center;
    width: 100%;
}

.bt-step-content {
    flex: 1;
}

.bt-step-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.bt-step-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid #5514B4;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-top: 5px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
.bt-step-item.bt-step-active .bt-step-spinner {
    display: inline-block;
    height: 30px;
    width: 30px;
    margin: 0 auto;
}

.bt-step-status {
    display: none;
    font-size: 20px;
    color: #4CAF50;
    min-width: 30px;
    text-align: center;
}

.bt-step-item.bt-step-complete .bt-step-status {
    display: block;
}

.bt-processing-footer {
    padding: 20px 30px 30px;
}
 
.bt-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #5514B4 0%, #7B3FD4 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.bt-processing-note {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.bt-processing-note strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
}

/* Error State */
.bt-processing-error {
    padding: 30px;
    text-align: center;
}

.bt-error-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.bt-processing-error h3 {
    margin: 0 0 10px;
    color: #dc3545;
    font-size: 20px;
}

.bt-error-message {
    color: #666;
    margin: 0 0 25px;
    font-size: 14px;
}

.bt-processing-error .bt-btn {
    margin: 5px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.bt-btn-primary {
    background: #5514B4;
    color: white;
}

.bt-btn-primary:hover {
    background: #6B2AC9;
}

.bt-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.bt-btn-secondary:hover {
    background: #e0e0e0;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .bt-processing-modal {
        max-width: 100%;
        margin: 10px;
    }
    
    .bt-processing-header {
        padding: 20px;
    }
    
    .bt-processing-header h2 {
        font-size: 20px;
    }
    
    .bt-processing-steps {
        padding: 15px 20px;
    }
    
    .bt-step-item.bt-step-active {
        margin: 0 -20px;
        padding: 15px 20px;
    } 
    .bt-step-label {
        font-size: 13px;
    }
}

/* Smooth scroll for steps container */
.bt-processing-steps {
    scroll-behavior: smooth;
}
 
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}
/* Responsive */
@media (max-width: 600px) {
    .bt-processing-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .bt-processing-header {
        padding: 20px;
    }
    
    .bt-processing-header h2 {
        font-size: 20px;
    }
    
    .bt-processing-steps {
        padding: 20px;
    }
    
    .bt-step-item {
        padding: 12px;
    }
    
 
    .bt-step-label {
        font-size: 14px;
    }
    
    .bt-processing-error .bt-btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
}