/**
 * Regression Hypothesis Testing Calculator Styles
 *
 * Scoped to .hypothesis-testing-regression-calculator wrapper.
 * Color scheme: #2563eb primary, #1e40af dark. NO PURPLE.
 */

/* CSS Variables */
.hypothesis-testing-regression-calculator {
    --htrc-primary: #2563eb;
    --htrc-primary-dark: #1e40af;
    --htrc-primary-light: rgba(37, 99, 235, 0.1);
    --htrc-excellent: #15803d;
    --htrc-excellent-bg: rgba(21, 128, 61, 0.1);
    --htrc-good: #22c55e;
    --htrc-good-bg: rgba(34, 197, 94, 0.1);
    --htrc-moderate: #eab308;
    --htrc-moderate-bg: rgba(234, 179, 8, 0.1);
    --htrc-limited: #f59e0b;
    --htrc-limited-bg: rgba(245, 158, 11, 0.1);
    --htrc-minimal: #ef4444;
    --htrc-minimal-bg: rgba(239, 68, 68, 0.1);
}

/* Animations */
@keyframes htrcFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hypothesis-testing-regression-calculator .col-lg-5 > .card:nth-child(1) { animation: htrcFadeInUp 0.6s ease-out 0ms both; }
.hypothesis-testing-regression-calculator .col-lg-5 > .card:nth-child(2) { animation: htrcFadeInUp 0.6s ease-out 100ms both; }
.hypothesis-testing-regression-calculator .col-lg-5 > .card:nth-child(3) { animation: htrcFadeInUp 0.6s ease-out 200ms both; }
.hypothesis-testing-regression-calculator .col-lg-7 > .card:nth-child(1) { animation: htrcFadeInUp 0.6s ease-out 50ms both; }
.hypothesis-testing-regression-calculator .col-lg-7 > .card:nth-child(2) { animation: htrcFadeInUp 0.6s ease-out 150ms both; }
.hypothesis-testing-regression-calculator .col-lg-7 > .card:nth-child(3) { animation: htrcFadeInUp 0.6s ease-out 250ms both; }
.hypothesis-testing-regression-calculator .col-lg-7 > .card:nth-child(4) { animation: htrcFadeInUp 0.6s ease-out 350ms both; }

.hypothesis-testing-regression-calculator .faq-section .accordion-item:nth-child(1) { animation: htrcFadeInUp 0.6s ease-out 350ms both; }
.hypothesis-testing-regression-calculator .faq-section .accordion-item:nth-child(2) { animation: htrcFadeInUp 0.6s ease-out 400ms both; }
.hypothesis-testing-regression-calculator .faq-section .accordion-item:nth-child(3) { animation: htrcFadeInUp 0.6s ease-out 450ms both; }
.hypothesis-testing-regression-calculator .faq-section .accordion-item:nth-child(4) { animation: htrcFadeInUp 0.6s ease-out 500ms both; }
.hypothesis-testing-regression-calculator .faq-section .accordion-item:nth-child(5) { animation: htrcFadeInUp 0.6s ease-out 550ms both; }
.hypothesis-testing-regression-calculator .faq-section .accordion-item:nth-child(6) { animation: htrcFadeInUp 0.6s ease-out 600ms both; }

@media (prefers-reduced-motion: reduce) {
    .hypothesis-testing-regression-calculator *,
    .hypothesis-testing-regression-calculator *::before,
    .hypothesis-testing-regression-calculator *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Hero Section */
.hypothesis-testing-regression-calculator .hero-section {
    background: linear-gradient(135deg, var(--htrc-primary), var(--htrc-primary-dark));
    padding: 3rem 0;
    margin-bottom: 0;
    color: white;
}

.hypothesis-testing-regression-calculator .hero-section .display-4 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.hypothesis-testing-regression-calculator .hero-section .lead {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

.hypothesis-testing-regression-calculator .hero-section .text-white-50 {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Cards */
.hypothesis-testing-regression-calculator .card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.hypothesis-testing-regression-calculator .card-header {
    background: linear-gradient(135deg, var(--htrc-primary), var(--htrc-primary-dark));
    color: white;
    padding: 1rem 1.25rem;
    border: none;
}

.hypothesis-testing-regression-calculator .card-header .h5,
.hypothesis-testing-regression-calculator .card-header h2,
.hypothesis-testing-regression-calculator .card-header h3 {
    font-weight: 600;
    color: white;
}

/* Form Controls */
.hypothesis-testing-regression-calculator .form-control,
.hypothesis-testing-regression-calculator .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hypothesis-testing-regression-calculator .form-control:focus,
.hypothesis-testing-regression-calculator .form-select:focus {
    border-color: var(--htrc-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.hypothesis-testing-regression-calculator .form-control-lg {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
}

.hypothesis-testing-regression-calculator .input-group-text {
    background-color: #f8f9fa;
    border-radius: 8px;
}

.hypothesis-testing-regression-calculator .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

/* Tooltips */
.hypothesis-testing-regression-calculator .htrc-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--htrc-primary-light);
    color: var(--htrc-primary);
    font-size: 11px;
    font-weight: 700;
    cursor: help;
    position: relative;
    vertical-align: middle;
    margin-left: 4px;
}

.hypothesis-testing-regression-calculator .htrc-tooltip:hover::after,
.hypothesis-testing-regression-calculator .htrc-tooltip:focus::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    white-space: normal;
    width: 250px;
    z-index: 1000;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Results Display */
.hypothesis-testing-regression-calculator .result-display {
    text-align: center;
    padding: 1rem 0;
}

.hypothesis-testing-regression-calculator .result-value-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.hypothesis-testing-regression-calculator .result-label {
    font-size: 0.875rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.hypothesis-testing-regression-calculator .result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--htrc-primary);
    line-height: 1.2;
}

.hypothesis-testing-regression-calculator .htrc-decision-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.hypothesis-testing-regression-calculator .htrc-decision-badge.reject {
    background-color: var(--htrc-excellent-bg);
    color: var(--htrc-excellent);
}

.hypothesis-testing-regression-calculator .htrc-decision-badge.fail-to-reject {
    background-color: var(--htrc-minimal-bg);
    color: var(--htrc-minimal);
}

/* Secondary Results */
.hypothesis-testing-regression-calculator .secondary-result {
    text-align: center;
    padding: 0.75rem 0.25rem;
}

.hypothesis-testing-regression-calculator .secondary-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.hypothesis-testing-regression-calculator .secondary-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.hypothesis-testing-regression-calculator .secondary-value.reject {
    color: var(--htrc-excellent);
}

.hypothesis-testing-regression-calculator .secondary-value.fail-to-reject {
    color: var(--htrc-minimal);
}

/* Confidence Interval Display */
.hypothesis-testing-regression-calculator .ci-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
}

.hypothesis-testing-regression-calculator .ci-value {
    font-family: 'Courier New', Consolas, monospace;
    color: var(--htrc-primary);
}

.hypothesis-testing-regression-calculator .ci-separator {
    color: #64748b;
    font-size: 1rem;
}

/* CI Bar */
.hypothesis-testing-regression-calculator .ci-bar-container {
    position: relative;
    padding: 0 10px;
}

.hypothesis-testing-regression-calculator .ci-bar {
    position: relative;
    height: 24px;
    background: #e2e8f0;
    border-radius: 12px;
    overflow: visible;
    margin: 8px 0;
}

.hypothesis-testing-regression-calculator .ci-range {
    position: absolute;
    height: 100%;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.hypothesis-testing-regression-calculator .ci-range.reject {
    background: rgba(21, 128, 61, 0.3);
    border: 2px solid var(--htrc-excellent);
}

.hypothesis-testing-regression-calculator .ci-range.fail-to-reject {
    background: rgba(239, 68, 68, 0.3);
    border: 2px solid var(--htrc-minimal);
}

.hypothesis-testing-regression-calculator .ci-range.neutral {
    background: rgba(37, 99, 235, 0.2);
    border: 2px solid var(--htrc-primary);
}

.hypothesis-testing-regression-calculator .ci-point-estimate {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--htrc-primary);
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hypothesis-testing-regression-calculator .ci-null-value {
    position: absolute;
    width: 3px;
    height: 32px;
    background: var(--htrc-minimal);
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.hypothesis-testing-regression-calculator .ci-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #64748b;
}

/* Canvas */
.hypothesis-testing-regression-calculator #htrc-distribution-canvas {
    width: 100%;
    height: auto;
    max-height: 300px;
}

/* Formula Display */
.hypothesis-testing-regression-calculator .formula-display .formula-main {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--htrc-primary-dark);
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 1rem;
}

.hypothesis-testing-regression-calculator .formula-display .formula-secondary {
    font-size: 0.875rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 1rem;
}

.hypothesis-testing-regression-calculator .formula-steps {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
}

.hypothesis-testing-regression-calculator .formula-step {
    display: flex;
    align-items: baseline;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.9rem;
}

.hypothesis-testing-regression-calculator .formula-step:last-child {
    border-bottom: none;
}

.hypothesis-testing-regression-calculator .formula-step-label {
    min-width: 160px;
    color: #64748b;
    font-weight: 500;
}

.hypothesis-testing-regression-calculator .formula-step-value {
    color: #1e293b;
    font-weight: 600;
}

/* Formula Reference */
.hypothesis-testing-regression-calculator .formula-reference .formula-main {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--htrc-primary-dark);
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
}

.hypothesis-testing-regression-calculator .formula-reference .formula-legend {
    text-align: center;
    color: #64748b;
}

/* Model Assumptions */
.hypothesis-testing-regression-calculator .model-assumptions ul {
    padding-left: 1.25rem;
}

.hypothesis-testing-regression-calculator .model-assumptions li {
    margin-bottom: 0.35rem;
    line-height: 1.5;
}

/* Author Badge */
.hypothesis-testing-regression-calculator .calculator-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hypothesis-testing-regression-calculator .author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.hypothesis-testing-regression-calculator .author-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
}

.hypothesis-testing-regression-calculator .author-name {
    font-weight: 600;
    color: var(--htrc-primary);
    text-decoration: none;
}

.hypothesis-testing-regression-calculator .author-name:hover {
    text-decoration: underline;
}

/* FAQ Accordion */
.hypothesis-testing-regression-calculator .faq-accordion .accordion-item {
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.hypothesis-testing-regression-calculator .faq-accordion .accordion-button {
    font-weight: 600;
    color: #1e293b;
    background: white;
    padding: 1rem 1.25rem;
}

.hypothesis-testing-regression-calculator .faq-accordion .accordion-button:not(.collapsed) {
    background: var(--htrc-primary);
    color: white;
    box-shadow: none;
}

.hypothesis-testing-regression-calculator .faq-accordion .accordion-button:not(.collapsed)::after {
    filter: brightness(0) invert(1);
}

.hypothesis-testing-regression-calculator .faq-accordion .accordion-body {
    padding: 1.25rem;
    line-height: 1.7;
    color: #475569;
}

/* Disclaimer */
.hypothesis-testing-regression-calculator .disclaimer {
    background: #fffbeb;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 1.25rem;
}

.hypothesis-testing-regression-calculator .disclaimer h5 {
    color: #92400e;
    margin-bottom: 0.5rem;
}

.hypothesis-testing-regression-calculator .disclaimer p {
    color: #78350f;
    margin-bottom: 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Related Calculators */
.hypothesis-testing-regression-calculator .related-calc-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    height: 100%;
}

.hypothesis-testing-regression-calculator .related-calc-card:hover {
    border-color: var(--htrc-primary);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
    transform: translateY(-4px);
    text-decoration: none;
    color: inherit;
}

.hypothesis-testing-regression-calculator .related-calc-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--htrc-primary), var(--htrc-primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: white;
    font-size: 1.5rem;
}

.hypothesis-testing-regression-calculator .related-calc-image {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.hypothesis-testing-regression-calculator .related-calc-image img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.hypothesis-testing-regression-calculator .related-calc-card:hover .related-calc-image img {
    transform: scale(1.05);
}

.hypothesis-testing-regression-calculator .related-calc-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
}

.hypothesis-testing-regression-calculator .related-calc-desc {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 12px;
    line-height: 1.5;
}

.hypothesis-testing-regression-calculator .related-calc-cta {
    font-weight: 600;
    color: var(--htrc-primary);
    font-size: 0.875rem;
}

/* Breadcrumb */
.hypothesis-testing-regression-calculator .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}

.hypothesis-testing-regression-calculator .breadcrumb-item a {
    color: var(--htrc-primary);
    text-decoration: none;
}

/* Reset Button */
.hypothesis-testing-regression-calculator .btn-outline-secondary {
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-weight: 500;
}

/* Responsive: 992px */
@media (max-width: 991px) {
    .hypothesis-testing-regression-calculator .hero-section {
        padding: 2rem 0;
    }

    .hypothesis-testing-regression-calculator .result-value {
        font-size: 2rem;
    }
}

/* Responsive: 768px */
@media (max-width: 767px) {
    .hypothesis-testing-regression-calculator .hero-section .display-4 {
        font-size: 1.75rem;
    }

    .hypothesis-testing-regression-calculator .hero-section .lead {
        font-size: 1rem;
    }

    .hypothesis-testing-regression-calculator .result-value {
        font-size: 1.75rem;
    }

    .hypothesis-testing-regression-calculator .formula-step {
        flex-direction: column;
    }

    .hypothesis-testing-regression-calculator .formula-step-label {
        min-width: auto;
        margin-bottom: 0.25rem;
    }

    .hypothesis-testing-regression-calculator .ci-display {
        font-size: 1rem;
        flex-wrap: wrap;
    }
}

/* Responsive: 576px */
@media (max-width: 575px) {
    .hypothesis-testing-regression-calculator .hero-section {
        padding: 1.5rem 0;
    }

    .hypothesis-testing-regression-calculator .hero-section .display-4 {
        font-size: 1.5rem;
    }

    .hypothesis-testing-regression-calculator .result-value {
        font-size: 1.5rem;
    }

    .hypothesis-testing-regression-calculator .secondary-value {
        font-size: 1.1rem;
    }

    .hypothesis-testing-regression-calculator .ci-display {
        font-size: 0.875rem;
        padding: 0.5rem;
    }
}
