/* File: plugins/wdm-cart-abandonment-calculator/assets/css/frontend.css */
/* Frontend CSS for Cart Abandonment Calculator */

/* Step Display Control */
.wdm-step {
    display: none;
}

.wdm-step.active {
    display: block !important;
}

/* First step should be visible by default, but allow JavaScript to control it */
.wdm-step:first-child {
    display: block;
}

/* Ensure calculator is visible */
.wdm-cart-abandonment-calculator {
    display: block !important;
    visibility: visible !important;
}

.wdm-calculator-container {
    display: block !important;
    visibility: visible !important;
}

/* Form Styles */
.wdm-calculator-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid #e8eaed;
}

.wdm-calculator-header {
    text-align: center;
    margin-bottom: 30px;
}

.wdm-calculator-header h2 {
    color: #1a1a1a;
    margin-bottom: 15px;
    font-size: 2.2em;
    font-weight: 700;
    line-height: 1.2;
}

.wdm-calculator-header p {
    color: #4a5568;
    font-size: 1.1em;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.wdm-step-header {
    text-align: center;
    margin-bottom: 35px;
}

.wdm-step-header h3 {
    color: #1a1a1a;
    margin-bottom: 12px;
    font-size: 1.8em;
    font-weight: 600;
}

.wdm-step-header p {
    color: #4a5568;
    font-size: 1.05em;
    line-height: 1.5;
    max-width: 500px;
    margin: 0 auto;
}

.wdm-form-section {
    max-width: 600px;
    margin: 0 auto;
}

.wdm-form-group {
    margin-bottom: 20px;
}

.wdm-form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wdm-form-group input,
.wdm-form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    background: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.wdm-form-group input:focus,
.wdm-form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background: #ffffff;
}

.wdm-form-group input::placeholder,
.wdm-form-group select::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.wdm-form-group small {
    display: block;
    margin-top: 8px;
    color: #6b7280;
    font-size: 0.875em;
    font-weight: 500;
    line-height: 1.4;
}

/* Error States */
.wdm-form-group input.wdm-error,
.wdm-form-group select.wdm-error {
    border-color: #dc2626;
    background-color: #fef2f2;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.wdm-error-message {
    color: #dc2626;
    font-size: 0.875em;
    font-weight: 500;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wdm-error-message::before {
    content: "⚠";
    font-size: 14px;
}

/* Success States */
.wdm-form-group input.wdm-success,
.wdm-form-group select.wdm-success {
    border-color: #059669;
    background-color: #f0fdf4;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
}

/* Loading States */
.wdm-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #6b7280;
    font-weight: 500;
}

.wdm-loading::before {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.wdm-form-actions {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: 30px;
}

.wdm-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 140px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wdm-btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: 1px solid #1d4ed8;
}

.wdm-btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.wdm-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.wdm-btn-secondary {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #374151;
    border: 2px solid #d1d5db;
}

.wdm-btn-secondary:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: #9ca3af;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wdm-btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wdm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Progress Bar */
.wdm-analysis-progress {
    text-align: center;
    padding: 50px 20px;
}

.wdm-progress-header h3 {
    color: #1a1a1a;
    margin-bottom: 15px;
    font-size: 1.8em;
    font-weight: 600;
}

.wdm-progress-header p {
    color: #4a5568;
    margin-bottom: 40px;
    font-size: 1.05em;
    line-height: 1.5;
}

.wdm-progress-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wdm-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.wdm-progress-steps {
    display: flex;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
}

.wdm-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.wdm-step-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 12px;
    transition: all 0.4s ease;
    border: 3px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wdm-progress-step.active .wdm-step-icon {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transform: scale(1.1);
}

.wdm-progress-step.completed .wdm-step-icon {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.wdm-step-text {
    font-size: 0.9em;
    color: #6b7280;
    text-align: center;
    line-height: 1.4;
    font-weight: 500;
    transition: all 0.3s ease;
}

.wdm-progress-step.active .wdm-step-text {
    color: #2563eb;
    font-weight: 600;
    transform: scale(1.05);
}

.wdm-progress-step.completed .wdm-step-text {
    color: #059669;
    font-weight: 600;
}

/* Results Display */
.wdm-results-container {
    text-align: center;
    padding: 50px 20px;
}

.wdm-results-header h3 {
    color: #1a1a1a;
    margin-bottom: 15px;
    font-size: 2.2em;
    font-weight: 700;
}

.wdm-results-header p {
    color: #4a5568;
    margin-bottom: 40px;
    font-size: 1.1em;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.wdm-results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.wdm-result-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 30px 20px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.wdm-result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.wdm-result-number {
    font-size: 2.5em;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    line-height: 1.2;
}

.wdm-result-label {
    color: #374151;
    font-size: 0.95em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wdm-results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.wdm-results-footer {
    color: #666;
    font-size: 0.9em;
}

/* Privacy Notice */
.wdm-privacy-notice {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 20px;
    border-radius: 10px;
    margin: 25px 0;
    border-left: 5px solid #2563eb;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

.wdm-privacy-notice p {
    margin: 0;
    color: #1e40af;
    font-weight: 500;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wdm-calculator-container {
        padding: 15px;
        margin: 10px;
    }
    
    .wdm-form-actions {
        flex-direction: column;
    }
    
    .wdm-results-summary {
        grid-template-columns: 1fr;
    }
    
    .wdm-results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .wdm-progress-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .wdm-progress-step {
        flex-direction: row;
        text-align: left;
    }
    
    .wdm-step-icon {
        margin-right: 15px;
        margin-bottom: 0;
    }
} 