/* ================================================================
 * Phrason Reading
 * Estilos exclusivos dos cinco exercícios de Reading.
 * ================================================================ */

.ph-rd-head,
.ph-rd-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.ph-rd-level {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .08);
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.ph-rd-passage,
.ph-comp-main,
.ph-flip-text,
.ph-error-card p {
    font-size: 1rem;
    line-height: 1.68;
}

.ph-rd-passage,
.ph-comp-main {
    padding: 14px;
    margin-bottom: 14px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 10px;
    background: rgba(255, 255, 255, .72);
}

.ph-rd-feedback,
.ph-error-result {
    margin-top: 12px;
    padding: 11px 12px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .78);
    line-height: 1.55;
}

.ph-rd-feedback.is-correct,
.ph-error-card.is-correct {
    border-left: 4px solid #2f7d5b;
}

.ph-rd-feedback.is-wrong,
.ph-error-card.is-wrong {
    border-left: 4px solid #9a4d47;
}

.ph-rd-empty {
    padding: 24px;
    text-align: center;
    line-height: 1.6;
}

.ph-rd-next,
.ph-cohesion-check,
.ph-error-check {
    padding: 9px 13px;
    border: 1px solid rgba(0, 0, 0, .16);
    border-radius: 8px;
    cursor: pointer;
}

.ph-flip-ref {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .08);
    font-weight: 700;
}

.ph-flip-text {
    margin-bottom: 14px;
}

.ph-flip-blank {
    display: inline-block;
    min-width: 72px;
    padding: 0 5px;
    border-bottom: 2px solid currentColor;
    font-weight: 700;
}

.ph-flip-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ph-flip-opt {
    padding: 11px 13px;
    border: 1px solid rgba(0, 0, 0, .16);
    border-radius: 9px;
    cursor: pointer;
}

.ph-flip-opt.correct,
.ph-qz-opt.correct,
.ph-comp-opt.correct {
    outline: 2px solid #2f7d5b;
}

.ph-flip-opt.wrong,
.ph-qz-opt.wrong,
.ph-comp-opt.wrong {
    outline: 2px solid #9a4d47;
}

.ph-cohesion-help,
.ph-error-help {
    margin-bottom: 14px;
    line-height: 1.55;
}

.ph-cohesion-passage,
.ph-error-card {
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 10px;
    background: rgba(255, 255, 255, .6);
}

.ph-cohesion-passage h4,
.ph-error-card h4 {
    margin: 0 0 10px;
}

.ph-cohesion-card {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    margin-bottom: 8px;
    padding: 9px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .9);
}

.ph-cohesion-card.is-fixed {
    background: rgba(0, 0, 0, .07);
}

.ph-cohesion-number {
    font-weight: 700;
    text-align: center;
}

.ph-cohesion-sentence {
    line-height: 1.5;
}

.ph-cohesion-controls {
    display: flex;
    gap: 4px;
}

.ph-cohesion-controls button {
    min-width: 30px;
    min-height: 30px;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: 6px;
    cursor: pointer;
}

.ph-error-card label {
    display: block;
    margin-top: 10px;
    font-size: .9rem;
    font-weight: 700;
}

.ph-error-card input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin-top: 5px;
    padding: 9px 10px;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 7px;
    font: inherit;
}

@media (max-width: 640px) {
    .ph-flip-options {
        grid-template-columns: 1fr;
    }

    .ph-cohesion-card {
        grid-template-columns: 26px minmax(0, 1fr);
    }

    .ph-cohesion-controls {
        grid-column: 2;
    }
}


.ph-rd-local-score {
    display: flex;
    gap: 16px;
    margin: -4px 0 14px;
    padding: 8px 11px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .055);
    font-size: .88rem;
}

.ph-rd-local-score strong {
    font-size: 1rem;
}

.ph-rd-feedback.is-correct {
    background: rgba(47, 125, 91, .11);
}

.ph-rd-feedback.is-wrong {
    background: rgba(154, 77, 71, .11);
}
