/**
 * Business Valuation Wizard - Frontend Styles
 * Exit Readiness Report Design Theme
 */

/* Container and Layout */
.bvw-wizard {
    background: #fff;
    min-width: 750px;
    max-width: 900px !important;
    width: 100%;
    margin: 40px auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    overflow: hidden;
}

/* Header - Exit Readiness Style */
.bvw-wizard-header {
    background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 50%, #FF8C42 100%);
    color: white;
    padding: 50px 40px;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.bvw-wizard-header::after {
    content: "";
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 140, 66, 0.3);
    transform: rotate(45deg);
}

.bvw-wizard-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    position: relative;
    z-index: 1;
}

.bvw-wizard-header h1::after {
    content: 'Advisory';
    display: block;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 3px;
    margin-top: 5px;
    opacity: 0.9;
}

.bvw-wizard-header p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Progress Bar */
.bvw-progress {
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.bvw-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.bvw-progress-fill {
    height: 100%;
    background: #FF8C42;
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(255, 140, 66, 0.5);
}

.bvw-progress-text {
    position: absolute;
    top: -25px;
    right: 0;
    font-size: 0.9rem;
    opacity: 0.9;
    color: white;
}

/* Wizard Body */
.bvw-wizard-body {
    padding: 50px;
    min-height: 400px;
    background: white;
}

/* Steps - Fixed Width */
.bvw-step {
    display: none;
    width: 100%;
    max-width: 100%;
    animation: bvw-fadeIn 0.4s ease-out;
}

.bvw-step.active {
    display: block;
}

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

.bvw-step h2 {
    font-size: 2rem;
    color: #1E3A8A;
    margin-bottom: 15px;
    font-weight: 700;
}

.bvw-step > p {
    color: #666;
    font-size: 1.05rem;
    margin-bottom: 35px;
}

/* Form Elements */
.bvw-form-group {
    margin-bottom: 25px;
}

.bvw-form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.bvw-form-group label .required {
    color: #FF8C42;
}

.bvw-form-group input[type="text"],
.bvw-form-group input[type="email"],
.bvw-form-group input[type="number"],
.bvw-form-group input[type="tel"],
.bvw-form-group input[type="url"],
.bvw-form-group select,
.bvw-form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.bvw-form-group input:focus,
.bvw-form-group select:focus,
.bvw-form-group textarea:focus {
    outline: none;
    border-color: #FF8C42;
    box-shadow: 0 0 0 4px rgba(255, 140, 66, 0.1);
}

.bvw-form-group input.error,
.bvw-form-group select.error {
    border-color: #dc2626;
    background: #fff5f5;
}

.bvw-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Question Container */
.bvw-question-container,
.bvw-personal-info-container {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 35px;
    min-height: 300px;
}

.bvw-question-container h2,
.bvw-personal-info-container h2 {
    font-size: 1.6rem;
    color: #1E3A8A;
    margin-bottom: 25px;
    font-weight: 600;
}

.bvw-question-description,
.bvw-personal-info-container p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Answer Options - Exit Readiness Style */
.bvw-answer-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bvw-answer-option {
    display: flex;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid #e0e6ed;
    position: relative;
    overflow: hidden;
}

.bvw-answer-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 5px;
    background: #FF8C42;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.bvw-answer-option:hover {
    border-color: #FF8C42;
    background: #fff9f5;
    /* transform: translateX(5px); */
}

.bvw-answer-option:hover::before {
    /* transform: scaleX(1); */
}

.bvw-answer-option input[type="radio"],
.bvw-answer-option input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-right: 18px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #f86300;
}

.bvw-answer-label {
    font-size: 1.05rem;
    color: #333;
    cursor: pointer;
    flex: 1;
}

.bvw-answer-option:has(input:checked) {
    /* background: linear-gradient(to right, rgba(255, 140, 66, 0.05), rgba(255, 140, 66, 0.02)); */
    border-color: #FF8C42;
}

.bvw-answer-option:has(input:checked)::before {
    /* transform: scaleX(1); */
}

.bvw-answer-option:has(input:checked) .bvw-answer-label {
    font-weight: 600;
    color: #1E3A8A;
}

.bvw-helper-text {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

/* Footer */
.bvw-wizard-footer {
    padding: 30px 50px;
    background: #f8f9fb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid #e0e6ed;
}

/* Buttons - Exit Readiness Style */
button.bvw-btn {
    padding: 15px 35px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

button.bvw-btn-prev {
    background: #e0e6ed;
    color: #666 !important;
}

button.bvw-btn-prev:hover,
button.bvw-btn-prev:focus {
    background: #d0d6dd;
    /* transform: translateX(-3px); */
}

button.bvw-btn-next,
button.bvw-btn-submit {
    background: #FF8C42;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.3);
}

button.bvw-btn-next:hover,
button.bvw-btn-submit:hover,
button.bvw-btn-next:focus,
button.bvw-btn-submit:focus {
    background: #ff7a28;
    /* transform: translateY(-2px); */
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.4);
}

button.bvw-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Hidden step */
.bvw-hidden-step {
    display: none !important;
}

/* Loading Spinner */
.bvw-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.bvw-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FF8C42;
    border-radius: 50%;
    animation: bvw-spin 1s linear infinite;
}

@keyframes bvw-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notifications */
.bvw-notification {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    animation: bvw-slideDown 0.3s ease-out;
}

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

.bvw-notification-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.bvw-notification-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.bvw-notification-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

/* Results Container - Exit Readiness Report Style */
.bvw-results-wrapper {
    padding: 20px;
}

.bvw-valuation-header {
    text-align: center;
    margin-bottom: 30px;
}

.bvw-valuation-header h2 {
    font-size: 2rem;
    color: #1E3A8A;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.bvw-valuation-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #FF8C42;
}

.bvw-valuation-card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.bvw-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.bvw-metric-row:last-child {
    border-bottom: none;
}

.bvw-metric-label {
    font-size: 1.1rem;
    color: #666;
    font-weight: 600;
}

.bvw-metric-value {
    font-size: 1.3rem;
    color: #1E3A8A;
    font-weight: 700;
}

.bvw-metric-value.bvw-highlight {
    color: #FF8C42;
    font-size: 2rem;
}

/* Progress Visualization */
.bvw-progress-visualization {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.bvw-progress-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1E3A8A;
    margin-bottom: 20px;
}

.bvw-gradient-bar {
    position: relative;
    height: 50px;
    background: linear-gradient(90deg, #dc2626 0%, #eab308 50%, #16a34a 100%);
    border-radius: 25px;
    margin: 20px 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bvw-position-marker {
    position: absolute;
    top: -5px;
    width: 60px;
    height: 60px;
    background: white;
    border: 4px solid #1E3A8A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: #1E3A8A;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateX(-50%);
    transition: all 0.5s ease;
}

.bvw-position-marker.animated {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

.bvw-progress-labels {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Status Message */
.bvw-status-message {
    background: #f0f7ff;
    border-left: 4px solid #1E3A8A;
    padding: 20px;
    margin: 30px 0;
    border-radius: 8px;
}

.bvw-status-message p {
    margin: 0;
    color: #333;
    line-height: 1.6;
}

/* Next Steps Section */
.bvw-next-steps {
    background: #1E3A8A;
    color: white;
    padding: 40px;
    border-radius: 12px;
    margin: 30px 0;
    text-align: center;
}

.bvw-next-steps h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: white;
}

.bvw-next-steps p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 25px;
}

.bvw-next-steps strong,
.bvw-next-steps a {
    color: #FF8C42;
}

button.bvw-btn-cta {
    background: #FF8C42 !important;
    color: white !important;
    padding: 15px 40px !important;
    font-size: 1.1rem !important;
    border-radius: 8px !important;
    display: inline-block;
    text-decoration: none;
    font-weight: 700;
    text-transform: none !important;
    margin: 20px 0;
    transition: all 0.3s ease;
}

button.bvw-btn-cta:hover {
    background: #ff7a28 !important;
    /* transform: translateY(-2px); */
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.4);
}

.bvw-contact-info {
    margin-top: 20px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.bvw-contact-info a {
    color: #FF8C42;
    text-decoration: none;
}

.bvw-contact-info a:hover {
    text-decoration: underline;
}

/* Results Actions */
.bvw-results-actions {
    margin: 30px 0;
    text-align: center;
}

.bvw-download-pdf {
    background: #FF8C42 !important;
    color: white !important;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 8px;
    display: inline-block;
    text-decoration: none;
    font-weight: 700;
    margin: 10px;
    transition: all 0.3s ease;
}

.bvw-download-pdf:hover {
    background: #ff7a28 !important;
    /* transform: translateY(-2px); */
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.4);
}

button.bvw-btn-outline {
    background: transparent !important;
    border: 2px solid #1E3A8A !important;
    color: #1E3A8A !important;
}

button.bvw-btn-outline:hover {
    background: #1E3A8A !important;
    color: white !important;
}

/* Icons */
.bvw-icon-download::before {
    content: "⬇";
    margin-right: 8px;
}

.bvw-icon-check::before {
    content: "✓";
    margin-right: 8px;
}

/* Animations */
.bvw-metric-value.animated {
    animation: fadeInScale 0.5s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .bvw-wizard {
        margin: 20px;
        max-width: 100%;
    }
    
    .bvw-wizard-header {
        padding: 30px 20px;
    }
    
    .bvw-wizard-header h1 {
        font-size: 1.8rem;
    }
    
    .bvw-wizard-body {
        padding: 30px 20px;
    }
    
    .bvw-wizard-footer {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    button.bvw-btn {
        width: 100%;
        justify-content: center;
    }
    
    .bvw-form-row {
        grid-template-columns: 1fr;
    }
    
    .bvw-question-container {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    .bvw-wizard-footer,
    button.bvw-btn,
    .bvw-notification {
        display: none !important;
    }
    
    .bvw-wizard {
        box-shadow: none;
        margin: 0;
    }
    
    .bvw-step {
        page-break-inside: avoid;
    }
}

/* Accessibility */
/* .bvw-wizard *:focus {
    outline: 2px solid #FF8C42;
    outline-offset: 2px;
}

.bvw-wizard button:focus {
    outline-offset: 4px;
} */