/* Reviews page — V2 layout (Arial, aligned with SchoolV2 / InstructorV2) */
body.apr-light,
body.apr-dark {
    font-family: Arial, sans-serif;
}

.apr-reviews-lead {
    margin: 0 0 16px 10px;
    max-width: 920px;
    color: var(--muted);
    line-height: 1.5;
    font-size: 15px;
}

.apr-reviews-lead a {
    color: var(--primary2);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.apr-reviews-page .apr-section__head h1 {
    margin: 0 0 0 10px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
}

.apr-reviews-summary__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 15px;
}

.apr-reviews-summary__rate {
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    color: var(--text);
    letter-spacing: -0.02em;
}

.apr-reviews-summary__verify {
    display: inline-flex;
    align-items: center;
}

.apr-reviews-summary__verify img {
    width: 28px;
    height: 28px;
}

.apr-reviews-dist {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.apr-reviews-dist__row {
    display: grid;
    grid-template-columns: 150px 1fr 36px;
    align-items: center;
    gap: 10px;
}

.apr-reviews-dist__stars.rating-result {
    width: auto;
    margin: 0;
}

.apr-reviews-dist__stars.rating-result span {
    font-size: 18px;
    margin: 0 1px;
}

.apr-reviews-dist__count {
    text-align: right;
    font-weight: 700;
    color: var(--text);
}

.apr-reviews-form-card p {
    margin-bottom: 8px;
    color: var(--muted);
}

.apr-reviews-form-card a {
    color: var(--primary2);
}

.apr-review-thread-list {
    display: grid;
    gap: 14px;
}

.apr-review-item {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--soft-panel);
    padding: 14px 16px;
}

body.apr-light .apr-review-item {
    background: rgba(255, 255, 255, 0.72);
}

.apr-review-item .apr-review-user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.apr-review-item .apr-review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.apr-review-body {
    margin-top: 10px;
}

.apr-review-body .rev-body {
    white-space: pre-line;
    word-break: break-word;
    line-height: 1.45;
    color: var(--text);
}

.apr-review-body .revtime {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    font-style: italic;
    color: var(--muted);
    text-align: right;
}

.apr-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.apr-review-actions .awe-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--chip-bg);
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
}

.apr-review-actions .awe-link:hover {
    background: var(--chip-bg-hover);
    color: var(--text);
}

.apr-review-replies {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.remessage {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: flex-start;
    margin: 0 0 0 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.12);
    color: var(--text);
}

body.apr-light .remessage {
    background: rgba(59, 130, 246, 0.08);
}

.remessage.mymessage {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.12);
}

body.apr-light .remessage.mymessage {
    background: rgba(34, 197, 94, 0.08);
}

.remessage .rerevtime {
    font-size: 12px;
    color: var(--muted);
    font-style: italic;
}

.remessage .rerev-body {
    flex: 1 1 100%;
    white-space: pre-line;
    line-height: 1.4;
}

.remessage .formbtns {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.remessage .awe-link {
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
}

.remessage .awe-link.remove-rereview {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

#rereview {
    margin: 8px 0;
    font-weight: 700;
    color: var(--primary2);
}

.note-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.note-wrap .area-btns {
    display: flex;
    justify-content: flex-end;
}

.note-text {
    min-height: 110px;
    max-height: 280px;
    overflow: auto;
    box-sizing: border-box;
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    line-height: 1.35;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    resize: vertical;
}

body.apr-light .note-text {
    background: #fff;
}

.note-text:focus {
    outline: none;
    border-color: rgba(124, 58, 237, 0.55);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.message-block .send-msg {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.95), rgba(124, 58, 237, 0.78));
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.message-block .send-msg img {
    width: 22px;
    height: 22px;
}

.message-block .send-msg:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.review-footer .rating-area {
    display: block;
    line-height: 1;
    width: 225px;
    height: 45px;
    margin: 10px 0;
}

.review-footer .rating-area:not(:checked) > label {
    width: 45px !important;
    font-size: 45px !important;
    line-height: 45px !important;
}

.rating-area {
    overflow: hidden;
    width: 225px;
    margin: 10px 0;
}

.rating-area:not(:checked) > input {
    display: none;
}

.rating-area:not(:checked) > label {
    float: right;
    width: 45px;
    padding: 0;
    cursor: pointer;
    font-size: 45px;
    line-height: 45px;
    color: lightgrey;
    text-shadow: 1px 1px #bbb;
}

.rating-area:not(:checked) > label:before {
    content: '★';
}

.rating-area > input:checked ~ label {
    color: gold;
    text-shadow: 1px 1px #c60;
}

.rating-area:not(:checked) > label:hover,
.rating-area:not(:checked) > label:hover ~ label {
    color: #ffdb70;
}

.rating-result {
    width: auto;
    margin: 0;
    display: inline-flex;
    white-space: nowrap;
}

.rating-result span {
    padding: 0;
    font-size: 32px;
    margin: 0 3px;
    line-height: 1;
    color: lightgrey;
    text-shadow: 1px 1px #bbb;
}

.rating-result > span:before {
    content: '★';
}

.rating-result > span.active,
.rating-result > span.partnerstar.active {
    color: gold;
    text-shadow: 1px 1px #c60;
}

.hide {
    display: none !important;
}

.apr-reviews-empty {
    color: var(--muted);
    margin: 0;
}

.apr-topbar--reviews .apr-topbar__inner {
    flex-wrap: wrap;
    gap: 10px;
}

.apr-topbar--reviews .apr-brand {
    min-width: 0;
    flex: 1 1 auto;
}

.apr-topbar--reviews .apr-topbar__actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 10px;
    flex: 1 1 220px;
    min-width: 0;
    max-width: 100%;
    justify-content: stretch;
}

.apr-topbar--reviews .apr-topbar__actions .apr-btn-cta-primary {
    flex: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.25;
    box-sizing: border-box;
    overflow: hidden;
}

.apr-topbar--reviews .apr-topbar__actions .apr-btn-cta-primary__label {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    text-align: center;
}

.apr-topbar--reviews .apr-topbar__actions .apr-btn-cta-primary__icon {
    flex-shrink: 0;
}

.apr-topbar__actions .apr-btn-cta-primary {
    min-width: 0;
}

.apr-topbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

@media (max-width: 640px) {
    .apr-topbar--reviews .apr-topbar__actions {
        flex-basis: 100%;
        grid-template-columns: 1fr;
    }

    .apr-topbar--reviews .apr-topbar__actions .apr-btn-cta-primary {
        padding: 10px 12px;
        font-size: 13px;
    }

    .apr-reviews-dist__row {
        grid-template-columns: 120px 1fr 28px;
        gap: 8px;
    }

    .apr-reviews-summary__rate {
        font-size: 34px;
    }
}
