﻿.concept-page {
    direction: rtl;
    padding: 2rem 0 4rem;
}

.concept-hero,
.concept-analysis-card,
.concept-result-card,
.concept-group {
    background: var(--bs-body-bg, #fff);
    border: 1px solid rgba(127,127,127,.18);
    box-shadow: 0 12px 34px rgba(0,0,0,.045);
}

.concept-hero {
    max-width: 1040px;
    margin: 0 auto 1.2rem;
    padding: 2rem;
    border-radius: 1.4rem;
    text-align: center;
}

.concept-kicker {
    display: inline-block;
    color: #987526;
    font-size: .78rem;
    font-weight: 800;
    margin-bottom: .35rem;
}

.concept-hero h1 {
    margin: .2rem 0 .65rem;
    font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.concept-hero p {
    max-width: 820px;
    margin: 0 auto 1.1rem;
    line-height: 1.9;
    opacity: .72;
}

.concept-query-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .55rem;
    max-width: 860px;
    margin: 0 auto;
}

.concept-query {
    min-height: 56px;
    border: 1px solid rgba(127,127,127,.27);
    border-radius: .9rem;
    background: inherit;
    color: inherit;
    padding: .7rem 1rem;
    font-size: 1rem;
}

.concept-search-button {
    border: 0;
    border-radius: .9rem;
    background: #173f35;
    color: #fff;
    padding: .7rem 1.3rem;
    font-weight: 800;
}

.concept-examples {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .85rem;
}

.concept-examples button {
    border: 1px solid rgba(152,117,38,.22);
    border-radius: 999px;
    background: rgba(152,117,38,.055);
    color: inherit;
    padding: .4rem .7rem;
    cursor: pointer;
    font-size: .75rem;
}

.concept-analysis-card {
    max-width: 1040px;
    margin: 0 auto 1.2rem;
    padding: 1.2rem;
    border-radius: 1.2rem;
}

.concept-section-head,
.concept-results-head,
.concept-group-head,
.concept-result-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.concept-section-head span,
.concept-results-head span,
.concept-group-head span {
    display: block;
    font-size: .75rem;
    opacity: .62;
}

.concept-section-head h2,
.concept-results-head h2,
.concept-group-head h3 {
    margin: .18rem 0 0;
}

.concept-model-note {
    font-size: .75rem;
    opacity: .7;
    direction: ltr;
}

.concept-chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .6rem;
    margin-top: 1rem;
}

.concept-chip-card {
    padding: .8rem;
    border-radius: .85rem;
    border: 1px solid rgba(152,117,38,.17);
    background: rgba(152,117,38,.045);
}

.concept-chip-card strong,
.concept-chip-card span {
    display: block;
}

.concept-chip-card span {
    margin-top: .25rem;
    font-size: .74rem;
    line-height: 1.65;
    opacity: .68;
}

.concept-disclaimer {
    margin-top: .8rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(127,127,127,.12);
    font-size: .75rem;
    opacity: .65;
}

.concept-results-head {
    max-width: 1040px;
    margin: 1.4rem auto .8rem;
}

.concept-view-switch {
    display: flex;
    gap: .35rem;
    padding: .25rem;
    border-radius: .8rem;
    background: rgba(127,127,127,.06);
}

.concept-view-switch button {
    border: 0;
    border-radius: .65rem;
    background: transparent;
    color: inherit;
    padding: .48rem .72rem;
    cursor: pointer;
    font-weight: 700;
    font-size: .77rem;
}

.concept-view-switch button.is-active {
    background: #173f35;
    color: #fff;
}

.concept-view-panel {
    display: none;
}

.concept-view-panel.is-active {
    display: block;
}

.concept-result-card {
    max-width: 1040px;
    margin: 0 auto .8rem;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
}

.concept-result-reference {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.concept-result-reference strong,
.concept-result-reference span {
    display: block;
}

.concept-result-reference span {
    font-size: .75rem;
    opacity: .62;
}

.concept-rank {
    display: inline-flex !important;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(152,117,38,.09);
    color: #987526;
    font-weight: 800;
    opacity: 1 !important;
}

.concept-score {
    text-align: left;
}

.concept-score span {
    display: block;
    font-size: .72rem;
    opacity: .62;
}

.concept-score strong {
    color: #987526;
    font-size: 1.05rem;
}

.concept-quran-text {
    font-family: "HafsSmart_08", "HafsSmart08", "KFGQPC Hafs Smart", serif !important;
    font-size: 1.8rem;
    line-height: 2.15;
    direction: rtl;
    text-align: right;
    font-weight: normal !important;
    font-style: normal !important;
    font-synthesis: none;
    letter-spacing: 0 !important;
    word-spacing: 0 !important;
    margin: .8rem 0;
}

.concept-evidence {
    padding: .75rem;
    border-radius: .8rem;
    background: rgba(127,127,127,.035);
}

.concept-evidence-title {
    display: block;
    font-size: .72rem;
    opacity: .62;
    margin-bottom: .45rem;
}

.concept-hit-list {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.concept-hit {
    display: inline-flex;
    padding: .34rem .55rem;
    border-radius: 999px;
    background: rgba(23,63,53,.075);
    color: #173f35;
    font-size: .73rem;
    font-weight: 700;
}

.concept-result-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: .55rem;
    font-size: .7rem;
    opacity: .62;
}

.concept-result-actions {
    margin-top: .7rem;
}

.concept-result-actions a {
    display: inline-block;
    text-decoration: none;
    border: 1px solid rgba(127,127,127,.22);
    border-radius: .65rem;
    color: inherit;
    padding: .4rem .65rem;
    font-size: .77rem;
    font-weight: 700;
}

.concept-group {
    max-width: 1080px;
    margin: 0 auto 1rem;
    padding: .85rem;
    border-radius: 1.15rem;
}

.concept-group-head {
    padding: .25rem .3rem .75rem;
    border-bottom: 1px solid rgba(127,127,127,.12);
    margin-bottom: .8rem;
}

.concept-group-head > strong {
    color: #987526;
    font-size: .8rem;
}

.concept-message {
    max-width: 1040px;
    margin: 0 auto 1rem;
    padding: .85rem 1rem;
    border-radius: .85rem;
}

.concept-message-error {
    background: rgba(180,35,24,.08);
    border: 1px solid rgba(180,35,24,.2);
    color: #b42318;
}

@media (max-width: 760px) {
    .concept-query-box {
        grid-template-columns: 1fr;
    }

    .concept-hero {
        padding: 1.25rem;
    }

    .concept-section-head,
    .concept-results-head,
    .concept-result-top {
        align-items: stretch;
        flex-direction: column;
    }

    .concept-score {
        text-align: right;
    }

    .concept-view-switch {
        width: 100%;
    }

    .concept-view-switch button {
        flex: 1;
    }
}


/* Step 27.1 - Conceptual filters, unlimited result choice and pagination */
.concept-filter-card {
    max-width: 1040px;
    margin: 0 auto 1.2rem;
    padding: 1.1rem;
    border-radius: 1.15rem;
    background: var(--bs-body-bg, #fff);
    border: 1px solid rgba(127,127,127,.18);
    box-shadow: 0 10px 28px rgba(0,0,0,.04);
}

.concept-filter-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: .9rem;
}

.concept-filter-head span {
    display: block;
    font-size: .74rem;
    opacity: .62;
}

.concept-filter-head h2 {
    margin: .15rem 0 0;
}

.concept-filter-count {
    text-align: left;
}

.concept-filter-count strong {
    display: block;
    font-size: 1.35rem;
    color: #987526;
}

.concept-filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.4fr 1.6fr;
    gap: .7rem;
}

.concept-filter-field,
.concept-filter-check {
    border: 1px solid rgba(127,127,127,.13);
    border-radius: .85rem;
    padding: .7rem;
    background: rgba(127,127,127,.025);
}

.concept-filter-field {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.concept-filter-field > span,
.concept-filter-label {
    font-size: .72rem;
    font-weight: 700;
    opacity: .68;
}

.concept-filter-field select {
    min-height: 40px;
    border-radius: .65rem;
    border: 1px solid rgba(127,127,127,.22);
    background: var(--bs-body-bg,#fff);
    color: inherit;
    padding: .4rem .55rem;
}

.concept-score-control {
    display: flex;
    align-items: center;
    gap: .7rem;
}

.concept-score-control input {
    flex: 1;
    accent-color: #173f35;
}

.concept-score-control strong {
    min-width: 48px;
    direction: ltr;
    text-align: left;
}

.concept-filter-check {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    font-size: .78rem;
    font-weight: 700;
}

.concept-filter-check input {
    width: 17px;
    height: 17px;
    accent-color: #173f35;
}

.concept-filter-concepts {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
    margin-top: .8rem;
    padding-top: .8rem;
    border-top: 1px solid rgba(127,127,127,.1);
}

.concept-filter-concept-list {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.concept-filter-concept {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .34rem .55rem;
    border-radius: 999px;
    background: rgba(23,63,53,.055);
    border: 1px solid rgba(23,63,53,.12);
    font-size: .73rem;
    font-weight: 700;
    cursor: pointer;
}

.concept-filter-concept input {
    accent-color: #173f35;
}

.concept-filter-link,
.concept-filter-reset {
    border: 0;
    background: transparent;
    color: #987526;
    cursor: pointer;
    font-size: .73rem;
    font-weight: 700;
}

.concept-filter-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: .65rem;
}

.concept-filter-reset {
    border: 1px solid rgba(127,127,127,.2);
    color: inherit;
    border-radius: .65rem;
    padding: .4rem .65rem;
}

.concept-results-head small {
    display: block;
    margin-top: .3rem;
    opacity: .62;
}

.concept-result-card.is-filtered-out,
.concept-group.is-filtered-out {
    display: none !important;
}

.concept-pagination {
    max-width: 1040px;
    margin: 1rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .65rem;
}

.concept-pagination button {
    border: 1px solid rgba(127,127,127,.22);
    border-radius: .65rem;
    background: var(--bs-body-bg,#fff);
    color: inherit;
    padding: .48rem .8rem;
    cursor: pointer;
    font-weight: 700;
}

.concept-pagination button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.concept-pagination span {
    min-width: 130px;
    text-align: center;
    font-size: .78rem;
    font-weight: 700;
}

.concept-empty-filter {
    max-width: 1040px;
    margin: 1rem auto;
    padding: 1rem;
    border: 1px dashed rgba(152,117,38,.3);
    border-radius: .9rem;
    text-align: center;
    background: rgba(152,117,38,.045);
}

@media (max-width: 900px) {
    .concept-filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .concept-filter-head {
        align-items: stretch;
        flex-direction: column;
    }

    .concept-filter-count {
        text-align: right;
    }

    .concept-filter-grid {
        grid-template-columns: 1fr;
    }
}
