/* Dynamic Button & Step Styles - Applied based on admin settings */

/* ===========================================
   BUTTON STYLES
   =========================================== */

/* Rounded Pills (Default) */
.wfb-button-style-rounded .wfb-prev-step,
.wfb-button-style-rounded .wfb-next-step,
.wfb-button-style-rounded .wfb-submit {
    border-radius: 50px !important;
}

/* Sharp Rectangle */
.wfb-button-style-sharp .wfb-prev-step,
.wfb-button-style-sharp .wfb-next-step,
.wfb-button-style-sharp .wfb-submit {
    border-radius: 0 !important;
}

/* Soft Rounded */
.wfb-button-style-soft .wfb-prev-step,
.wfb-button-style-soft .wfb-next-step,
.wfb-button-style-soft .wfb-submit {
    border-radius: 8px !important;
}

/* Outlined */
.wfb-button-style-outlined .wfb-prev-step,
.wfb-button-style-outlined .wfb-next-step,
.wfb-button-style-outlined .wfb-submit {
    background: transparent !important;
    border: 2px solid currentColor !important;
    font-weight: 700 !important;
}

/* Only apply default colors if no theme is selected (classic theme) */
.wfb-theme-classic.wfb-button-style-outlined .wfb-next-step,
.wfb-theme-classic.wfb-button-style-outlined .wfb-submit {
    color: #4A90E2 !important;
    border-color: #4A90E2 !important;
}

.wfb-theme-classic.wfb-button-style-outlined .wfb-prev-step {
    color: #666 !important;
    border-color: #666 !important;
}

.wfb-theme-classic.wfb-button-style-outlined .wfb-next-step:hover,
.wfb-theme-classic.wfb-button-style-outlined .wfb-submit:hover {
    background: #4A90E2 !important;
    color: white !important;
}

.wfb-theme-classic.wfb-button-style-outlined .wfb-prev-step:hover {
    background: #666 !important;
    color: white !important;
}

/* ===========================================
   STEP INDICATOR STYLES
   =========================================== */

/* Circles (Default) - Already styled by base CSS with ::before */

/* Squares */
.wfb-step-style-squares .wfb-step-indicator::before {
    border-radius: 4px !important;
}

/* Pills */
.wfb-step-style-pills .wfb-step-indicator {
    min-width: auto !important;
}

.wfb-step-style-pills .wfb-step-indicator::before {
    content: attr(data-step-label) !important;
    width: auto !important;
    height: auto !important;
    padding: 8px 20px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
}

/* Dots */
.wfb-step-style-dots .wfb-step-indicator::before {
    content: '' !important;
    width: 12px !important;
    height: 12px !important;
    margin-bottom: 8px !important;
    font-size: 0 !important;
    border: none !important;
}

.wfb-step-style-dots .wfb-step-indicator.active::before {
    width: 16px !important;
    height: 16px !important;
}

/* Futuristic Loading (NEW) */
.wfb-step-style-futuristic .wfb-step-indicator {
    position: relative;
    min-width: 60px !important;
}

.wfb-step-style-futuristic .wfb-step-indicator::before {
    content: '' !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    border: 3px solid rgba(74, 144, 226, 0.2) !important;
    background: transparent !important;
    position: relative !important;
    font-size: 0 !important;
    animation: none !important;
}

.wfb-step-style-futuristic .wfb-step-indicator.completed::before {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%) !important;
    border-color: #357ABD !important;
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.6), 
                0 0 40px rgba(74, 144, 226, 0.3),
                inset 0 0 10px rgba(255, 255, 255, 0.3) !important;
}

.wfb-step-style-futuristic .wfb-step-indicator.active::before {
    border-color: #4A90E2 !important;
    border-top-color: transparent !important;
    animation: wfb-futuristic-spin 1s linear infinite !important;
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.5),
                0 0 30px rgba(74, 144, 226, 0.3) !important;
}

.wfb-step-style-futuristic .wfb-step-indicator.active::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%) !important;
    animation: wfb-futuristic-pulse 1.5s ease-in-out infinite !important;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.8) !important;
}

@keyframes wfb-futuristic-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes wfb-futuristic-pulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 1;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.5); 
        opacity: 0.6;
    }
}

/* Battery Charging (NEW) - Cold to Hot Effect */
.wfb-step-style-battery .wfb-step-indicator {
    position: relative;
    min-width: 60px !important;
}

.wfb-step-style-battery .wfb-step-indicator::before {
    content: '' !important;
    width: 50px !important;
    height: 28px !important;
    border-radius: 4px !important;
    border: 3px solid #e5e7eb !important;
    background: linear-gradient(to right, #e5e7eb 0%, #e5e7eb 100%) !important;
    position: relative !important;
    font-size: 0 !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Battery terminal (the little nub on the right) */
.wfb-step-style-battery .wfb-step-indicator::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    right: -6px !important;
    transform: translateY(-50%) !important;
    width: 4px !important;
    height: 16px !important;
    background: #e5e7eb !important;
    border-radius: 0 2px 2px 0 !important;
    z-index: 1 !important;
}

/* Completed steps - Full battery (HOT - Red/Orange) */
.wfb-step-style-battery .wfb-step-indicator.completed::before {
    background: linear-gradient(to right, 
        #ff6b6b 0%, 
        #ff8787 50%, 
        #ffa94d 100%) !important;
    border-color: #ff6b6b !important;
    box-shadow: 
        inset 0 2px 8px rgba(255, 107, 107, 0.3),
        0 0 15px rgba(255, 107, 107, 0.4),
        0 0 30px rgba(255, 107, 107, 0.2) !important;
    animation: wfb-battery-glow-hot 2s ease-in-out infinite !important;
}

.wfb-step-style-battery .wfb-step-indicator.completed::after {
    background: #ff6b6b !important;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.6) !important;
}

/* Active step - Charging (WARM - Yellow/Orange) */
.wfb-step-style-battery .wfb-step-indicator.active::before {
    background: linear-gradient(to right, 
        #4ecdc4 0%, 
        #4ecdc4 var(--battery-charge, 50%), 
        #e5e7eb var(--battery-charge, 50%), 
        #e5e7eb 100%) !important;
    border-color: #4ecdc4 !important;
    animation: wfb-battery-charging 2s ease-in-out infinite !important;
    box-shadow: 
        inset 0 2px 8px rgba(78, 205, 196, 0.3),
        0 0 15px rgba(78, 205, 196, 0.4) !important;
}

.wfb-step-style-battery .wfb-step-indicator.active::after {
    background: #4ecdc4 !important;
    animation: wfb-battery-pulse 1s ease-in-out infinite !important;
}

/* Inactive steps - Empty battery (COLD - Blue/Gray) */
.wfb-step-style-battery .wfb-step-indicator::before {
    border-color: #cbd5e1 !important;
}

.wfb-step-style-battery .wfb-step-indicator::after {
    background: #cbd5e1 !important;
}

/* Charging animation - fills from left to right */
@keyframes wfb-battery-charging {
    0% {
        background: linear-gradient(to right, 
            #4ecdc4 0%, 
            #4ecdc4 30%, 
            #e5e7eb 30%, 
            #e5e7eb 100%);
    }
    50% {
        background: linear-gradient(to right, 
            #4ecdc4 0%, 
            #4ecdc4 70%, 
            #e5e7eb 70%, 
            #e5e7eb 100%);
    }
    100% {
        background: linear-gradient(to right, 
            #4ecdc4 0%, 
            #4ecdc4 30%, 
            #e5e7eb 30%, 
            #e5e7eb 100%);
    }
}

/* Hot battery glow effect */
@keyframes wfb-battery-glow-hot {
    0%, 100% {
        box-shadow: 
            inset 0 2px 8px rgba(255, 107, 107, 0.3),
            0 0 15px rgba(255, 107, 107, 0.4),
            0 0 30px rgba(255, 107, 107, 0.2);
    }
    50% {
        box-shadow: 
            inset 0 2px 8px rgba(255, 107, 107, 0.5),
            0 0 20px rgba(255, 107, 107, 0.6),
            0 0 40px rgba(255, 107, 107, 0.4);
    }
}

/* Terminal pulse for active battery */
@keyframes wfb-battery-pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 8px rgba(78, 205, 196, 0.6);
    }
    50% {
        opacity: 0.6;
        box-shadow: 0 0 4px rgba(78, 205, 196, 0.3);
    }
}
