/**
 * Public-facing CSS for the Business Valuation Calculator
 */

/* Container */
.bvc-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: 'satoshi-black';
    color: #333;
    line-height: 1.5;
    padding: 20px;
}

/* Typography */
.bvc-heading {
    color: #0073aa; /* Primary color, will be overridden by dynamic styles */
    margin-bottom: 15px;
    font-weight: 600;
}

.bvc-description {
    margin-bottom: 25px;
    color: #666;
}

.bvc-step-heading {
    font-size: 1.2em;
    margin-bottom: 20px;
    font-weight: 600;
    color: #23282d; /* Secondary color, will be overridden by dynamic styles */
}

/* Form Container */
.bvc-form-container {
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Form */
.bvc-form {
    position: relative;
}

.bvc-form-header {
    padding: 20px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.bvc-form-steps {
    padding: 20px;
}

.bvc-form-step {
    margin-bottom: 20px;
}

/* Form Fields */
.bvc-field-group {
    margin-bottom: 20px;
}

.bvc-form-field {
    margin-bottom: 15px;
}

.bvc-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.bvc-required {
    color: #d63638;
    margin-left: 3px;
}

.bvc-form-field input,
.bvc-form-field select,
.bvc-form-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 0.2s ease;
}

.bvc-form-field input:focus,
.bvc-form-field select:focus,
.bvc-form-field textarea:focus {
    border-color: #0073aa; /* Primary color, will be overridden by dynamic styles */
    outline: none;
}

.bvc-error {
    border-color: #d63638 !important;
}

.bvc-field-description {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}

/* Currency Input */
.bvc-currency-input {
    position: relative;
}

.bvc-currency-symbol {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.bvc-currency-field {
    padding-left: 25px !important;
}

/* Buttons */
.bvc-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa; /* Primary color, will be overridden by dynamic styles */
    color: #fff; /* Button text color, will be overridden by dynamic styles */
    border: none;
    border-radius: 4px; /* Will be overridden by dynamic styles based on button_style */
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.bvc-button:hover {
    background-color: #005a87; /* Darker shade of primary color */
}

.bvc-button-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.bvc-button-secondary:hover {
    background-color: #e0e0e0;
}

.bvc-step-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* Progress Indicator */
.bvc-progress-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0 10px;
}

.bvc-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.bvc-step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #f0f0f0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.bvc-step-label {
    font-size: 12px;
    color: #666;
}

.bvc-progress-step.active .bvc-step-number {
    background-color: #0073aa; /* Primary color, will be overridden by dynamic styles */
    color: #fff;
}

.bvc-progress-step.completed .bvc-step-number {
    background-color: #46b450;
    color: #fff;
}

.bvc-progress-connector {
    flex-grow: 1;
    height: 2px;
    background-color: #f0f0f0;
    margin: 0 5px;
    position: relative;
    top: -12px;
    z-index: 0;
    max-width: 60px;
}

/* Loading Overlay */
.bvc-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.bvc-loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa; /* Primary color, will be overridden by dynamic styles */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: bvc-spin 1s linear infinite;
    margin-bottom: 15px;
}

.bvc-loading-message {
    font-weight: 600;
    color: #333;
}

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

/* Validation Messages */
.bvc-validation-messages {
    margin-bottom: 20px;
}

.bvc-error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 4px;
    border-left: 4px solid #d63638;
    margin-bottom: 15px;
}

.bvc-error-message ul {
    margin: 5px 0 5px 20px;
    padding: 0;
}

.bvc-success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 4px;
    border-left: 4px solid #46b450;
    margin-bottom: 15px;
}

/* Results Display */
#bvc-results-container {
    background: #fff;
    border-radius: 5px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bvc-results-header {
    text-align: center;
    margin-bottom: 30px;
}

.bvc-valuation-summary {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 40px;
    text-align: center;
    justify-content: center;
}

.bvc-value-range,
.bvc-value-average {
    padding: 20px;
    flex: 1;
    min-width: 250px;
    margin: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bvc-range-label,
.bvc-average-label {
    font-weight: 600;
    margin-bottom: 10px;
    color: #666;
}

.bvc-range-value,
.bvc-average-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #0073aa; /* Primary color, will be overridden by dynamic styles */
}

.bvc-chart-heading,
.bvc-details-heading {
    font-size: 1.3em;
    margin: 30px 0 20px;
    font-weight: 600;
    color: #23282d; /* Secondary color, will be overridden by dynamic styles */
}

/* Chart Styles */
.bvc-chart {
    margin-bottom: 40px;
}

.bvc-chart-item {
    margin-bottom: 15px;
}

.bvc-chart-label {
    margin-bottom: 5px;
    font-weight: 600;
}

.bvc-chart-bar-container {
    position: relative;
    height: 30px;
    background-color: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.bvc-chart-bar {
    height: 100%;
    background-color: #0073aa; /* Primary color, will be overridden by dynamic styles */
    transition: width 1s ease;
}

.bvc-chart-value {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #333;
    font-weight: 600;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
}

/* Valuation Methods Details */
.bvc-methods-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.bvc-method-item {
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bvc-method-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.bvc-method-name {
    margin: 0;
    font-size: 1.1em;
    color: #23282d; /* Secondary color, will be overridden by dynamic styles */
}

.bvc-method-value {
    font-weight: 700;
    color: #0073aa; /* Primary color, will be overridden by dynamic styles */
}

.bvc-method-description {
    font-size: 0.9em;
    color: #666;
}

.bvc-result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .bvc-methods-list {
        grid-template-columns: 1fr;
    }
    
    .bvc-value-range,
    .bvc-value-average {
        min-width: 100%;
    }
    
    .bvc-result-actions {
        flex-direction: column;
    }
    
    .bvc-result-actions button {
        width: 100%;
        margin-bottom: 10px;
    }
}