/* Business Valuation Calculator Styles */

:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --danger-color: #e74c3c;
    --success-color: #27ae60;
    --border-radius: 0.5rem;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header h1 {
    color: var(--dark-color);
    font-weight: 700;
}

.disclaimer {
    font-size: 0.9rem;
    border-radius: var(--border-radius);
}

/* Section Card Styles */
.section-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    border: none;
    transition: var(--transition);
}

.section-card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.section-header {
    background-color: var(--light-color);
    padding: 15px;
    cursor: pointer;
}

.section-button {
    color: var(--dark-color);
    font-weight: 600;
    text-decoration: none;
    width: 100%;
    text-align: left;
    padding: 0;
}

.section-button:hover, .section-button:focus {
    color: var(--primary-color);
    text-decoration: none;
}

.section-icon {
    float: right;
    transition: transform 0.3s ease;
}

.collapsed .section-icon {
    transform: rotate(-90deg);
}

/* Form Control Styles */
.form-control, .form-select {
    border-radius: var(--border-radius);
    padding: 10px 15px;
    border: 1px solid #ced4da;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

.input-group-text {
    background-color: var(--light-color);
    border-color: #ced4da;
}

.form-range {
    height: 38px;
    padding: 10px 0;
}

.info-tooltip {
    background-color: transparent;
    border-color: transparent;
    color: var(--primary-color);
}

.info-tooltip:hover, .info-tooltip:focus {
    color: var(--dark-color);
    background-color: transparent;
    border-color: transparent;
}

/* Button Styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #2980b9;
    border-color: #2980b9;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover, .btn-success:focus {
    background-color: #219653;
    border-color: #219653;
}

/* Results Section Styles */
#resultsSection .card-header {
    padding: 15px 20px;
}

#resultsSection .card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

#resultsSection .card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

#resultsSection .card-header small {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .row > div {
        margin-bottom: 20px;
    }
    
    .section-header h2 {
        font-size: 1.25rem;
    }
    
    #resultsSection .card-header h2 {
        font-size: 1.25rem;
    }
    
    #resultsSection .card-header h3 {
        font-size: 1.1rem;
    }
}

/* Animation for Results Section */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

#resultsSection:not(.d-none) {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Chart Container Styles */
canvas {
    max-width: 100%;
    height: auto !important;
}

/* Tooltip Customization */
.tooltip .tooltip-inner {
    background-color: var(--dark-color);
    max-width: 300px;
    padding: 10px;
    font-size: 0.9rem;
    box-shadow: var(--box-shadow);
}

/* Form Validation Styles */
.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: var(--danger-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23e74c3c'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23e74c3c' stroke='none'/%3e%3c/svg%3e");
}

.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: var(--success-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2327ae60' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
}

/* Focus Indicators for Accessibility */
:focus {
    outline: 3px solid rgba(52, 152, 219, 0.5);
    outline-offset: 2px;
}

.btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.5);
}

/* Print Styles for PDF Export */
@media print {
    body {
        background-color: white;
    }
    
    .calculator-container {
        max-width: 100%;
        padding: 0;
    }
    
    .section-card {
        box-shadow: none;
        margin-bottom: 20px;
        page-break-inside: avoid;
    }
    
    .btn, .info-tooltip, form {
        display: none !important;
    }
    
    #resultsSection {
        display: block !important;
    }
    
    footer {
        margin-top: 30px;
        font-size: 0.8rem;
    }
}
