/* ======================================================================
   HamyarGPS Compatibility Table v1
   Native collapsible details • Fully scoped • RTL • Mobile aligned
   ====================================================================== */
#hgps-compatibility-table,
#hgps-compatibility-table * {
    box-sizing: border-box;
}

#hgps-compatibility-table {
    --hct-navy: #162451;
    --hct-navy-2: #1e3a78;
    --hct-blue: #2563eb;
    --hct-text: #26344d;
    --hct-muted: #536178;
    --hct-border: #dce5f1;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 30px auto;
    overflow: hidden;
    color: var(--hct-text);
    background: radial-gradient(circle at 100% 0, rgba(37, 99, 235, 0.1), transparent 34%), linear-gradient(145deg, #ffffff 0%, #f7f9fd 100%);
    border: 1px solid var(--hct-border);
    border-radius: 20px;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.09), 0 3px 9px rgba(15, 23, 42, 0.04);
    direction: rtl;
    font-family: inherit;
    line-height: 1.9;
    text-align: right;
}

#hgps-compatibility-table .hct-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 118px;
    padding: 22px 24px;
    cursor: pointer;
    list-style: none;
    outline: none;
    user-select: none;
}

#hgps-compatibility-table .hct-summary::-webkit-details-marker {
    display: none;
}

#hgps-compatibility-table .hct-summary::marker {
    display: none;
    content: "";
}

#hgps-compatibility-table .hct-summary-copy {
    display: block;
    min-width: 0;
    padding-right: 15px;
    border-right: 5px solid var(--hct-blue);
    text-align: right;
}

#hgps-compatibility-table .hct-kicker,
#hgps-compatibility-table .hct-title,
#hgps-compatibility-table .hct-subtitle {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: right;
}

#hgps-compatibility-table .hct-kicker {
    margin-bottom: 2px;
    color: var(--hct-blue);
    font-size: 0.73rem;
    font-weight: 850;
    line-height: 1.7;
}

#hgps-compatibility-table .hct-title {
    color: #101d38;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1.75;
}

#hgps-compatibility-table .hct-subtitle {
    margin-top: 3px;
    color: var(--hct-muted);
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.9;
}

#hgps-compatibility-table .hct-summary-side {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 132px;
    padding: 9px 13px;
    color: #ffffff;
    background: var(--hct-blue);
    border: 1px solid var(--hct-blue);
    border-radius: 11px;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.19);
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1.7;
    white-space: nowrap;
}

#hgps-compatibility-table .hct-toggle-text {
    display: block;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

#hgps-compatibility-table .hct-toggle-text--open {
    display: none;
}

#hgps-compatibility-table[open] .hct-toggle-text--closed {
    display: none;
}

#hgps-compatibility-table[open] .hct-toggle-text--open {
    display: block;
}

#hgps-compatibility-table .hct-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    transition: transform 0.22s ease;
}

#hgps-compatibility-table .hct-chevron svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

#hgps-compatibility-table[open] .hct-chevron {
    transform: rotate(180deg);
}

#hgps-compatibility-table .hct-summary:hover .hct-summary-side {
    background: #1749b0;
    border-color: #1749b0;
}

#hgps-compatibility-table .hct-summary:focus-visible {
    outline: 3px solid #ff9a55;
    outline-offset: -5px;
    border-radius: 18px;
}

#hgps-compatibility-table[open] .hct-summary {
    border-bottom: 1px solid var(--hct-border);
}

#hgps-compatibility-table .hct-body {
    padding: 22px 24px 24px;
}

#hgps-compatibility-table .hct-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 17px;
}

#hgps-compatibility-table .hct-meta > span {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 66px;
    padding: 10px 13px;
    color: #23416f;
    background: #edf4ff;
    border: 1px solid #d2e1f8;
    border-radius: 10px;
    text-align: right;
}

#hgps-compatibility-table .hct-meta strong,
#hgps-compatibility-table .hct-meta b {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: right;
}

#hgps-compatibility-table .hct-meta strong {
    color: #60708b;
    font-size: 0.69rem;
    font-weight: 650;
    line-height: 1.7;
}

#hgps-compatibility-table .hct-meta b {
    color: #153a76;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

#hgps-compatibility-table .hct-intro {
    margin: 0 0 17px;
    padding: 14px 16px;
    color: #46546b;
    background: #ffffff;
    border: 1px solid #e1e8f2;
    border-right: 4px solid var(--hct-blue);
    border-radius: 11px;
    font-size: 0.83rem;
    line-height: 2;
    text-align: right;
}

#hgps-compatibility-table .hct-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #ffffff;
    border: 1px solid #d9e3f0;
    border-radius: 15px;
    box-shadow: 0 7px 20px rgba(15, 23, 42, 0.05);
}

#hgps-compatibility-table .hct-table {
    width: 100%;
    min-width: 1040px;
    margin: 0;
    direction: rtl;
    table-layout: fixed;
    background: #ffffff;
    border: 0;
    border-spacing: 0;
    border-collapse: separate;
    color: var(--hct-text);
    font-family: inherit;
    font-size: 0.78rem;
    line-height: 1.95;
    text-align: right;
}

#hgps-compatibility-table .hct-table th,
#hgps-compatibility-table .hct-table td {
    padding: 16px 15px;
    direction: rtl;
    vertical-align: top;
    text-align: right;
    border: 0;
    border-bottom: 1px solid #e5ebf3;
    border-left: 1px solid #e5ebf3;
    line-height: 1.95;
}

#hgps-compatibility-table .hct-table th:last-child,
#hgps-compatibility-table .hct-table td:last-child {
    border-left: 0;
}

#hgps-compatibility-table .hct-table thead th {
    color: #ffffff;
    background: linear-gradient(135deg, var(--hct-navy), var(--hct-navy-2));
    border-bottom: 0;
    border-left-color: rgba(255, 255, 255, 0.14);
    font-size: 0.78rem;
    font-weight: 900;
    vertical-align: middle;
}

#hgps-compatibility-table .hct-table th:nth-child(1) { width: 17%; }
#hgps-compatibility-table .hct-table th:nth-child(2) { width: 18%; }
#hgps-compatibility-table .hct-table th:nth-child(3) { width: 21%; }
#hgps-compatibility-table .hct-table th:nth-child(4) { width: 20%; }
#hgps-compatibility-table .hct-table th:nth-child(5) { width: 24%; }

#hgps-compatibility-table .hct-table tbody tr {
    background: #ffffff;
    transition: background-color 0.2s ease;
}

#hgps-compatibility-table .hct-table tbody tr:nth-child(even) {
    background: #f7f9fd;
}

#hgps-compatibility-table .hct-table tbody tr:hover {
    background: #eef5ff;
}

#hgps-compatibility-table .hct-table tbody tr:last-child td {
    border-bottom: 0;
}

#hgps-compatibility-table .hct-feature {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 7px 10px;
    color: #16479d;
    background: #eaf2ff;
    border: 1px solid #cfe0ff;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 900;
    line-height: 1.75;
    text-align: right;
}

#hgps-compatibility-table .hct-version {
    display: block;
    width: 100%;
    margin: 0 0 5px;
    color: #183b77;
    font-weight: 900;
    line-height: 1.85;
    text-align: right;
}

#hgps-compatibility-table .hct-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    margin: 2px 0 0;
    padding: 4px 8px;
    border-radius: 7px;
    font-size: 0.67rem;
    font-weight: 850;
    line-height: 1.65;
    text-align: center;
    white-space: nowrap;
}

#hgps-compatibility-table .hct-status--documented {
    color: #17603a;
    background: #e9f8ef;
    border: 1px solid #c7ead5;
}

#hgps-compatibility-table .hct-status--conditional {
    color: #8a4b0f;
    background: #fff5e7;
    border: 1px solid #f5d9ae;
}

#hgps-compatibility-table .hct-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin: 18px 0 0;
    padding: 15px 17px;
    color: #34445d;
    background: linear-gradient(135deg, #edf6ff, #f5f9ff);
    border: 1px solid #cfe1f8;
    border-right: 5px solid var(--hct-blue);
    border-radius: 12px;
    font-size: 0.8rem;
    line-height: 1.95;
    text-align: right;
}

#hgps-compatibility-table .hct-result p {
    margin: 0;
    padding: 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
    text-align: right;
}

#hgps-compatibility-table .hct-result strong {
    color: #153a76;
    font-weight: 900;
}

#hgps-compatibility-table .hct-result a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 13px;
    color: #ffffff !important;
    background: var(--hct-blue);
    border: 1px solid var(--hct-blue);
    border-radius: 9px;
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1.7;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
}

#hgps-compatibility-table .hct-result a:hover,
#hgps-compatibility-table .hct-result a:focus {
    color: #ffffff !important;
    background: #1749b0;
    border-color: #1749b0;
    text-decoration: none !important;
}

#hgps-compatibility-table .hct-note {
    margin: 13px 0 0 !important;
    padding: 12px 14px;
    color: #6a4a20;
    background: #fffaf1;
    border: 1px solid #f2dfbc;
    border-radius: 10px;
    font-size: 0.72rem;
    line-height: 1.95;
    text-align: right;
}

#hgps-compatibility-table .hct-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 767px) {
    #hgps-compatibility-table {
        margin: 24px auto;
        border-radius: 16px;
    }

    #hgps-compatibility-table .hct-summary {
        grid-template-columns: minmax(0, 1fr) 42px;
        gap: 10px;
        min-height: 0;
        padding: 15px;
    }

    #hgps-compatibility-table .hct-summary-copy {
        padding-right: 12px;
        border-right-width: 4px;
    }

    #hgps-compatibility-table .hct-kicker {
        font-size: 0.68rem;
    }

    #hgps-compatibility-table .hct-title {
        font-size: 1rem;
    }

    #hgps-compatibility-table .hct-subtitle {
        display: none;
    }

    #hgps-compatibility-table .hct-summary-side {
        width: 42px;
        min-width: 42px;
        height: 42px;
        min-height: 42px;
        padding: 0;
        border-radius: 10px;
    }

    #hgps-compatibility-table .hct-summary-side .hct-toggle-text {
        display: none;
    }

    #hgps-compatibility-table .hct-body {
        padding: 13px;
    }

    #hgps-compatibility-table .hct-meta {
        display: block;
        margin-bottom: 13px;
        overflow: hidden;
        background: #edf4ff;
        border: 1px solid #d2e1f8;
        border-radius: 11px;
    }

    #hgps-compatibility-table .hct-meta > span {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        align-items: center;
        min-height: 0;
        padding: 8px 10px;
        background: transparent;
        border: 0;
        border-bottom: 1px solid #d7e4f6;
        border-radius: 0;
    }

    #hgps-compatibility-table .hct-meta > span:last-child {
        border-bottom: 0;
    }

    #hgps-compatibility-table .hct-meta strong,
    #hgps-compatibility-table .hct-meta b {
        width: auto;
        min-width: 0;
        line-height: 1.65;
    }

    #hgps-compatibility-table .hct-meta strong {
        font-size: 0.66rem;
        text-align: right;
        white-space: nowrap;
    }

    #hgps-compatibility-table .hct-meta b {
        font-size: 0.73rem;
        text-align: left;
        white-space: nowrap;
    }

    #hgps-compatibility-table .hct-intro {
        margin-bottom: 13px;
        padding: 11px 12px;
        border-right-width: 4px;
        font-size: 0.74rem;
        line-height: 1.95;
    }

    #hgps-compatibility-table .hct-table-wrap {
        overflow: visible;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    #hgps-compatibility-table .hct-table {
        display: block;
        width: 100%;
        min-width: 0;
        background: transparent;
    }

    #hgps-compatibility-table .hct-table thead {
        display: none;
    }

    #hgps-compatibility-table .hct-table tbody,
    #hgps-compatibility-table .hct-table tr,
    #hgps-compatibility-table .hct-table td {
        display: block;
        width: 100%;
    }

    #hgps-compatibility-table .hct-table tbody tr {
        margin: 0 0 10px;
        overflow: hidden;
        background: #ffffff;
        border: 1px solid #dce5f1;
        border-radius: 13px;
        box-shadow: 0 5px 15px rgba(15, 23, 42, 0.055);
    }

    #hgps-compatibility-table .hct-table tbody tr:last-child {
        margin-bottom: 0;
    }

    #hgps-compatibility-table .hct-table tbody td {
        display: grid;
        grid-template-columns: minmax(88px, 29%) minmax(0, 1fr);
        column-gap: 10px;
        row-gap: 4px;
        align-items: start;
        min-width: 0;
        padding: 9px 10px;
        color: #3c4a61;
        background: #ffffff;
        border: 0;
        border-bottom: 1px solid #e5ebf3;
        font-size: 0.72rem;
        line-height: 1.85;
        text-align: right;
        overflow-wrap: anywhere;
    }

    #hgps-compatibility-table .hct-table tbody td:last-child {
        border-bottom: 0;
    }

    #hgps-compatibility-table .hct-table tbody td::before {
        content: attr(data-label);
        display: block;
        grid-column: 1;
        grid-row: 1 / span 3;
        width: auto;
        margin: 0;
        color: #60708b;
        font-size: 0.65rem;
        font-weight: 750;
        line-height: 1.7;
        text-align: right;
    }

    #hgps-compatibility-table .hct-table tbody td > * {
        grid-column: 2;
        min-width: 0;
    }

    #hgps-compatibility-table .hct-table tbody td:first-child {
        background: linear-gradient(135deg, #edf4ff, #f5f8ff);
    }

    #hgps-compatibility-table .hct-feature,
    #hgps-compatibility-table .hct-version,
    #hgps-compatibility-table .hct-status {
        text-align: right;
    }

    #hgps-compatibility-table .hct-feature {
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        font-size: 0.75rem;
        line-height: 1.75;
    }

    #hgps-compatibility-table .hct-version {
        width: auto;
        margin: 0;
        font-size: 0.73rem;
        line-height: 1.75;
    }

    #hgps-compatibility-table .hct-status {
        max-width: 100%;
        margin-top: 0;
        padding: 3px 7px;
        font-size: 0.63rem;
        white-space: nowrap;
    }

    #hgps-compatibility-table .hct-result {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        margin-top: 13px;
        padding: 11px 12px;
        border-right-width: 4px;
        font-size: 0.72rem;
    }

    #hgps-compatibility-table .hct-result a {
        min-height: 39px;
        padding: 7px 10px;
        font-size: 0.68rem;
        white-space: nowrap;
    }

    #hgps-compatibility-table .hct-note {
        margin-top: 10px !important;
        padding: 10px 11px;
        font-size: 0.66rem;
        line-height: 1.9;
    }
}

@media (max-width: 380px) {
    #hgps-compatibility-table .hct-summary,
    #hgps-compatibility-table .hct-body {
        padding: 11px;
    }

    #hgps-compatibility-table .hct-title {
        font-size: 0.94rem;
    }

    #hgps-compatibility-table .hct-table tbody td {
        grid-template-columns: minmax(82px, 31%) minmax(0, 1fr);
        column-gap: 8px;
        padding: 8px 9px;
    }

    #hgps-compatibility-table .hct-result {
        grid-template-columns: 1fr;
    }

    #hgps-compatibility-table .hct-result a {
        width: 100%;
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    #hgps-compatibility-table .hct-chevron,
    #hgps-compatibility-table .hct-table tbody tr {
        transition: none;
    }
}

/* v2.3 admin-controlled overrides */
#hgps-compatibility-table{background:var(--hct-background,#fff);border-color:var(--hct-border,#dce5f1);border-radius:var(--hct-radius,20px);color:var(--hct-text,#26344d)}
#hgps-compatibility-table .hct-title{font-size:var(--hct-title-size,18px)}
#hgps-compatibility-table .hct-body,#hgps-compatibility-table .hct-table,#hgps-compatibility-table .hct-intro{font-size:var(--hct-body-size,13px)}
#hgps-compatibility-table .hct-summary-side{min-height:var(--hct-toggle-height,42px);font-size:var(--hct-toggle-font-size,12px);background:var(--hct-blue,#2563eb);border-color:var(--hct-blue,#2563eb)}
@media(max-width:640px){#hgps-compatibility-table .hct-title{font-size:var(--hct-title-mobile-size,16px)}}
