/* ===== COMMON STYLES FOR MONOGENIC DISORDER PAGES ===== */
/* Applied to: thalassaemia.php, sma.php, g6pd.php, hypercholesterolemia.php, dmd.php, fmr1.php */

:root {
    --primary: #881D6B;
    --primary-light: rgba(136, 29, 107, 0.08);
    --primary-medium: rgba(136, 29, 107, 0.05);
    --primary-dark: #6e1655;
    --accent: #A3B8C9;
    --accent-light: #D9E7F3;
    --dark: #2A2A2A;
    --gray: #6C757D;
    --light-gray: #F8F9FA;
    --border: #E0E0E0;
    --white: #FFFFFF;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-hover: 0 20px 40px rgba(136,29,107,0.15);
    --transition: all 0.3s ease;
}

/* ===== TEST SPECIFICATIONS TABLE ===== */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 20px 0;
}

.specs-table th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-weight: 600;
    padding: 15px;
    text-align: left;
    width: 30%;
}

.specs-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    background: var(--white);
}

.specs-table tr:last-child td {
    border-bottom: none;
}

/* ===== MUTATION GRID ===== */
.mutation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.mutation-card {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 20px;
    transition: var(--transition);
    border-left: 4px solid var(--primary);
}

.mutation-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    background: var(--white);
}

.mutation-card h4 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

.mutation-card p {
    color: var(--gray);
    margin: 5px 0;
    font-size: 0.95rem;
}

.mutation-card .mutation-name {
    font-family: monospace;
    background: var(--white);
    padding: 5px 10px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
}

/* ===== GENOTYPE-PHENOTYPE TABLE ===== */
.genotype-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 30px 0;
}

.genotype-table th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-weight: 600;
    padding: 15px;
    text-align: left;
}

.genotype-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
}

.genotype-table tr:last-child td {
    border-bottom: none;
}

.severity-mild {
    background: #d4edda;
    color: #155724;
    padding: 3px 10px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.severity-moderate {
    background: #fff3cd;
    color: #856404;
    padding: 3px 10px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.severity-severe {
    background: #f8d7da;
    color: #721c24;
    padding: 3px 10px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

/* ===== INHERITANCE DIAGRAM ===== */
.inheritance-diagram {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.inheritance-box {
    text-align: center;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 12px;
    min-width: 200px;
}

.inheritance-box h4 {
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 600;
}

.parents {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.parent {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-light), var(--white));
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary);
}

.offspring {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
}

.child {
    width: 45px;
    height: 45px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.child.affected {
    background: #f8d7da;
    border-color: #721c24;
    color: #721c24;
}

.child.carrier {
    background: #fff3cd;
    border-color: #856404;
    color: #856404;
}

.risk-percent {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

/* ===== EPIDEMIOLOGY STATS ===== */
.epidemiology-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-light), var(--white));
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-card .stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 10px;
}

.stat-card .stat-label {
    color: var(--gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== FREQUENCY TABLE ===== */
.frequency-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.frequency-table th {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid var(--primary);
}

.frequency-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

/* ===== MANAGEMENT OPTIONS ===== */
.management-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin: 30px 0;
}

.management-card {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.management-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.management-card h4 {
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.management-card h4 i {
    font-size: 1.3rem;
}

.management-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.management-card ul li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.management-card ul li:last-child {
    border-bottom: none;
}

.management-card ul li i {
    color: var(--primary);
    width: 20px;
}

/* ===== TESTING ALGORITHM ===== */
.algorithm-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.algorithm-step {
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: 50px;
    padding: 15px 25px;
    min-width: 200px;
    text-align: center;
    font-weight: 600;
    color: var(--primary);
    position: relative;
}

.algorithm-step.completed {
    background: var(--primary);
    color: white;
}

.algorithm-arrow {
    color: var(--primary);
    font-size: 1.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .mutation-grid,
    .epidemiology-stats,
    .management-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mutation-grid,
    .epidemiology-stats,
    .management-options,
    .inheritance-diagram {
        grid-template-columns: 1fr;
    }
    
    .algorithm-flow {
        flex-direction: column;
    }
    
    .algorithm-arrow {
        transform: rotate(90deg);
    }
    
    .specs-table {
        display: block;
        overflow-x: auto;
    }
}