/* ========================================
   ONE-WAY ANOVA TOOL - CUSTOM STYLES
   Inherits shared patterns from main.css:
   - .info-icon (tooltips)
   - .quick-start-card (onboarding)
   - .pulse-success (animations)
   - .hero-header & .professor-mode-banner (layout)
   ======================================== */

.equation-section p,
.scenario-section p {
    margin: 0.75rem 0;
}

.equation-display {
    margin: 1rem 0;
    padding: 0.75rem;
    background: #f8f9fb;
    border-radius: var(--border-radius);
    box-shadow: inset 0 0 0 1px #e1e7f0;
}

.equation-definitions {
    background: #f8f9fb;
    border-radius: var(--border-radius);
    padding: 0.9rem 1rem;
    margin: 0.75rem 0 1rem;
    border-left: 3px solid rgba(44, 62, 80, 0.2);
}

.equation-definitions ul {
    margin: 0.4rem 0 0;
    padding-left: 1.25rem;
}

.equation-definitions.compact {
    margin: 0.5rem 0 0;
    padding: 0.75rem 0.85rem;
    border-left-color: rgba(3, 155, 229, 0.3);
}

.scenario-section span {
    font-weight: 600;
    color: var(--accent-color);
}

#scenario-description p {
    margin: 0.6rem 0;
}

.group-controls h2,
.group-input-block h2,
.analysis-settings h2 {
    margin-top: 0;
}

.group-table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
}

/* Position tooltips BELOW for table header info icons (parent has overflow clipping) */
.group-table th .info-icon::after {
    bottom: auto;
    top: 130%;
    transform: translateX(-50%) translateY(8px);
}
.group-table th .info-icon::before {
    bottom: auto;
    top: 115%;
    border-top-color: transparent;
    border-bottom-color: rgba(30, 30, 40, 0.98);
}
.group-table th .info-icon:hover::after,
.group-table th .info-icon:hover::before {
    transform: translateX(-50%) translateY(0);
}

.group-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.group-table th,
.group-table td {
    border: 1px solid #e4e9f0;
    padding: 0.65rem;
    text-align: left;
}

.group-table thead th {
    background: #f5f7fb;
    font-weight: 600;
    color: var(--secondary-color);
}

.group-table td input {
    width: 100%;
    border: 1px solid #ccd6e3;
    border-radius: var(--border-radius);
    padding: 0.4rem 0.5rem;
    font-size: 0.95rem;
}

.group-table td input.group-mean,
.group-table td input.group-sd,
.group-table td input.group-n {
    max-width: 120px;
    min-width: 90px;
}

.group-label {
    font-weight: 600;
    color: var(--primary-color);
}

.visual-options {
    margin-top: 1.25rem;
    padding: 1rem;
    border: 1px solid #e4e9f0;
    border-radius: var(--border-radius);
    background: #fafbfc;
}

.mean-type-options {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-left: 1.5rem;
}

.mean-type-options input[disabled] + span {
    color: #9aa5b5;
}

.warning {
    background: rgba(192, 57, 43, 0.1);
    color: #8c2f23;
    border: 1px solid rgba(192, 57, 43, 0.3);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.warning.hidden {
    display: none;
}

.tukey-equation {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    background: #f8f9fb;
    border-left: 3px solid rgba(3, 155, 229, 0.3);
}

.math-block {
    text-align: center;
    font-size: 1.05rem;
    margin: 0.5rem 0 0.75rem;
}

.advanced-menu {
    margin-top: 1.25rem;
    border: 1px solid #e4e9f0;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem 1rem;
    background: #fdfdfd;
}

.advanced-menu summary {
    font-weight: 600;
    color: var(--secondary-color);
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.planned-panel {
    margin-top: 1rem;
    border-top: 1px solid #e4e9f0;
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.planned-panel.hidden {
    display: none;
}

.planned-actions {
    display: flex;
    justify-content: flex-end;
}

.comparison-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.75rem;
    background: #f5f7fb;
    border-radius: var(--border-radius);
}

.comparison-select {
    flex: 1 1 160px;
    padding: 0.45rem 0.5rem;
    border: 1px solid #ccd6e3;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
}

.vs-label {
    font-weight: 600;
    color: var(--secondary-color);
}

.remove-comparison {
    border: none;
    background: transparent;
    color: var(--accent-color);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
}

.remove-comparison:hover {
    color: #96281b;
}

.comparison-list {
    padding-left: 1.25rem;
    margin: 0.5rem 0 0;
}

.diagnostics details {
    cursor: pointer;
}

.diagnostics summary {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.diagnostic-section {
    margin-bottom: 1rem;
}

.diagnostic-status {
    font-weight: 600;
}

.diagnostic-status.good {
    color: #2e7d32;
}

.diagnostic-status.caution {
    color: #f9a825;
}

.diagnostic-status.alert {
    color: #c0392b;
}

.diagnostics ul {
    margin: 0.4rem 0 0;
    padding-left: 1.25rem;
}

/* ========================================
   DECISION INDICATOR (TRAFFIC LIGHT SYSTEM)
   ======================================== */

.decision-section {
    margin: 2.5rem 0;
}

.decision-section h2 {
    margin-bottom: 1.25rem;
}

.decision-card {
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid transparent;
    background: white;
}

/* Pending state (neutral) */
.decision-pending {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Success state (Green - Significant difference) */
.decision-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #10b981;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
    animation: pulse-success 2s ease-in-out infinite;
}

@keyframes pulse-success {
    0%, 100% { box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 4px 24px rgba(16, 185, 129, 0.35); }
}

/* Warning state (Yellow - Borderline) */
.decision-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

/* Danger state (Red - No significant difference) */
.decision-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #ef4444;
}

.decision-indicator {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.decision-icon {
    font-size: 4rem;
    line-height: 1;
    flex-shrink: 0;
}

.decision-status h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
}

.decision-status p {
    margin: 0;
    font-size: 1.1rem;
    color: #475569;
    line-height: 1.5;
}

.decision-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    margin-top: 1rem;
}

.decision-metric {
    text-align: center;
}

.metric-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.decision-action-btn {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.decision-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* Decision recommendation modal */
.decision-recommendation {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.decision-recommendation h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
}

.decision-recommendation ul {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.decision-recommendation li {
    margin: 0.5rem 0;
}

@media (max-width: 768px) {
    .decision-indicator {
        flex-direction: column;
        text-align: center;
    }
    .decision-details {
        grid-template-columns: 1fr;
    }
}

/* Visualization */
.visualization-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.plot-container {
    width: 100%;
    min-height: 320px;
}

.interpretation-details h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.educational-note {
    background: #f8f9fb;
    padding: 1.2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
}

/* Responsive */
@media (max-width: 900px) {
    .visualization-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .range-inputs {
        flex-direction: column;
    }

    .input-group.inline {
        flex: 1 1 100%;
    }
}

/* Professor Mode styles are now in shared/css/main.css */

