/* =========================================================
   Fault Codes Page
   Isolated styles: no shared site CSS is changed.
   ========================================================= */

.fault-codes-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 46px 24px 70px;
}

.fault-hero {
    padding-top: 58px;
    padding-bottom: 58px;
}

.fault-content {
    max-width: 1120px;
    margin: 0 auto;
}

.fault-intro {
    max-width: 760px;
    margin: 0 auto 34px;
    text-align: center;
}

.fault-intro > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 999px;
    background: #eaf7ff;
    color: #0789e8;
    font-size: 13px;
    font-weight: 700;
}

.fault-intro h2 {
    margin: 10px 0 8px;
    color: #082a4a;
    font-size: 34px;
    line-height: 1.25;
}

.fault-intro p {
    margin: 0;
    color: #68798a;
    font-size: 15px;
    line-height: 1.9;
}

.fault-tables {
    display: grid;
    gap: 22px;
}

.fault-table-card {
    display: block;
    margin: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce7ef;
    border-radius: 20px;
    box-shadow: 0 14px 34px rgba(8, 42, 74, .07);
}

.fault-table-card[open] {
    overflow: hidden;
}

.fault-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    margin: 0;
    padding: 20px 24px;
    box-sizing: border-box;
    color: #fff;
    background: linear-gradient(135deg, #082a4a, #0a5d8f);
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.fault-table-head::-webkit-details-marker {
    display: none;
}

.fault-table-head::marker {
    display: none;
    content: '';
}

.fault-table-title {
    min-width: 0;
    flex: 1 1 auto;
}

.fault-table-title h3 {
    margin: 0;
    color: #fff;
    font-size: 24px;
    line-height: 1.3;
}

.fault-table-title span {
    display: block;
    margin-top: 4px;
    color: #dcecf7;
    font-size: 13px;
    line-height: 1.6;
}

.fault-accordion-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 13px 9px 15px;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 11px;
    background: rgba(255,255,255,.11);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
    transition: background .2s ease, border-color .2s ease;
}

.fault-table-head:hover .fault-accordion-toggle {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.42);
}

.fault-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    font-size: 15px;
    line-height: 1;
    transition: transform .22s ease;
}

.fault-table-card[open] .fault-toggle-icon {
    transform: rotate(180deg);
}

.fault-table-wrap {
    width: 100%;
    overflow: hidden;
    animation: fault-table-open .22s ease both;
}

@keyframes fault-table-open {
    from { opacity: .35; }
    to { opacity: 1; }
}

.fault-table-card.tcl .fault-table-head {
    background: linear-gradient(135deg, #082a4a, #0b6fa9);
}

.fault-table-card.midea .fault-table-head {
    background: linear-gradient(135deg, #087d8a, #079fb0);
}

.fault-table-card.gree .fault-table-head {
    background: linear-gradient(135deg, #0a5d8f, #0789e8);
}

.fault-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    direction: rtl;
}

.fault-table th {
    padding: 13px 18px;
    background: #f2f8fc;
    color: #082a4a;
    border-bottom: 1px solid #dce7ef;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.5;
    text-align: right;
}

.fault-table td {
    padding: 13px 18px;
    color: #304b63;
    border-bottom: 1px solid #e7eef4;
    vertical-align: middle;
    font-size: 14px;
    line-height: 1.75;
}

.fault-table tbody tr:last-child td {
    border-bottom: 0;
}

.fault-table tbody tr:hover td {
    background: #f8fcff;
}

.fault-table .fault-code-cell {
    width: 115px;
    text-align: center;
    border-left: 1px solid #e7eef4;
}

.fault-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 7px 10px;
    box-sizing: border-box;
    border: 1px solid #cfeafb;
    border-radius: 10px;
    background: #eaf7ff;
    color: #0578c9;
    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: 900;
    direction: ltr;
    box-shadow: 0 4px 10px rgba(7,137,232,.08);
}

.fault-table td:nth-child(2) {
    color: #163a59;
    font-weight: 700;
}

.fault-table td:nth-child(3) {
    color: #68798a;
}

.fault-table .note {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 8px;
    background: #f7fafc;
    color: #68798a;
    font-size: 12px;
}

.fault-table-card.midea .fault-code {
    background: #e9fbfc;
    color: #087d8a;
    border-color: #c6eef1;
}

.fault-table-card.gree .fault-code {
    background: #eef8ff;
    color: #086fae;
}

@media (max-width: 700px) {
    .fault-codes-page {
        padding: 30px 12px 48px;
    }

    .fault-hero {
        padding: 48px 24px;
    }

    .fault-intro {
        margin-bottom: 24px;
    }

    .fault-intro h2 {
        font-size: 26px;
    }

    .fault-intro p {
        font-size: 13px;
    }

    .fault-tables {
        gap: 16px;
    }

    .fault-table-card {
        border-radius: 16px;
    }

    .fault-table-head {
        gap: 10px;
        padding: 14px 14px;
    }

    .fault-table-title h3 {
        font-size: 18px;
    }

    .fault-table-title span {
        font-size: 11px;
    }

    .fault-accordion-toggle {
        min-height: 37px;
        padding: 7px 9px 7px 10px;
        gap: 5px;
        font-size: 10px;
    }

    .fault-toggle-icon {
        width: 18px;
        height: 18px;
        font-size: 13px;
    }

    .fault-table,
    .fault-table tbody,
    .fault-table tr,
    .fault-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .fault-table thead {
        display: none;
    }

    .fault-table tbody tr {
        padding: 11px 12px 10px;
        border-bottom: 1px solid #e7eef4;
    }

    .fault-table tbody tr:last-child {
        border-bottom: 0;
    }

    .fault-table td {
        padding: 4px 0;
        border: 0;
        font-size: 13px;
        background: transparent !important;
    }

    .fault-table td.fault-code-cell {
        width: auto;
        padding-bottom: 7px;
        text-align: right;
        border: 0;
    }

    .fault-table .fault-code {
        min-width: 54px;
        padding: 6px 9px;
    }

    .fault-table td:nth-child(2)::before {
        display: block;
        margin-bottom: 2px;
        color: #0789e8;
        content: 'السبب';
        font-size: 10px;
        font-weight: 800;
    }

    .fault-table td:nth-child(3)::before {
        display: block;
        margin-bottom: 2px;
        color: #7b8d9c;
        content: 'ملاحظات';
        font-size: 10px;
        font-weight: 800;
    }

    .fault-table td:nth-child(3):empty {
        display: none;
    }
}

@media (max-width: 430px) {
    .fault-table-head {
        align-items: flex-start;
    }

    .fault-table-title {
        flex: 1 1 auto;
    }

    .fault-accordion-toggle {
        padding: 7px 8px 7px 9px;
        font-size: 9px;
    }
}
