/*
 * APS Reviews — flat, inherits theme font/colors/dark mode
 */
 
 

.aps-stars { display:inline-flex; align-items:center; gap:1px; line-height:1; }
.aps-star  { font-size:18px; color:var(--cs-layout-border,#ddd); }
.aps-star--filled { color:#f59e0b; }
.aps-stars--sm .aps-star { font-size:13px; }
.aps-stars--lg .aps-star { font-size:28px; }

.aps-star-input { display:inline-flex; flex-direction:row-reverse; gap:4px; padding:4px 0; }
.aps-star-input input[type="radio"] { position:absolute; opacity:0; width:0; height:0; pointer-events:none; }
.aps-star-input label {
    color: var(--cs-layout-border, #ddd);
    cursor: pointer;
    transition: color .1s;
    line-height: 1;
    margin: 0; padding: 2px 1px;
    display: inline-flex;
    font-weight: normal;
}
.aps-star-input label svg { display: block; pointer-events: none; }
.aps-star-input label:hover,
.aps-star-input label:hover ~ label { color: #f59e0b; }
.aps-star-input input:checked ~ label { color: #f59e0b; }

.aps-form-message {
    display: none;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    margin: 10px 0;
    line-height: 1.5;
}
.aps-form-message.aps-msg--success { background:#ecfdf5; color:#065f46; border:1px solid #a7f3d0; }
.aps-form-message.aps-msg--error   { background:#fef2f2; color:#991b1b; border:1px solid #fca5a5; }
.aps-word-counter { display:block; font-size:11px; text-align:right; margin-top:3px; color:var(--cs-color-meta,#aaa); }
.aps-word-counter--over { color:#dc2626; }

.aps-rv-box { margin: 30px 0; }

.aps-rv-hd {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.aps-rv-hd__title {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--cs-color-heading, #111);
    margin: 0;
    line-height: 1.4;
    border: none;
    padding: 0;
}
.aps-rv-hd__n {
    font-size: 13px;
    color: var(--cs-color-meta, #aaa);
    font-weight: 400;
}
.aps-rv-hd__avg {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--cs-color-meta, #888);
    font-size: 13px;
    font-weight: 600;
}

/* write area */
.aps-rv-write { margin-bottom: 8px; }

.aps-rv-write__fake {
    display: block;
    width: 100%;
    padding: 11px 16px;
    border: 1px solid var(--cs-layout-border, #e0e0e0);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--cs-color-meta, #aaa);
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: border-color .15s;
    box-sizing: border-box;
}
.aps-rv-write__fake:hover { border-color: var(--cs-light-accent-color); }

.aps-rv-login-panel {
    margin-top: 12px;
    padding: 18px;
    border: 1px solid var(--cs-layout-border, #e8e8e8);
    border-radius: 8px;
    text-align: center;
}
.aps-rv-login-panel p {
    font-size: 14px;
    color: var(--cs-color-text, #555);
    margin: 0 0 12px;
    line-height: 1.5;
}
.aps-rv-login-label { margin-bottom: 20px !important; }
#aps-google-onetap-btn { display: none; }

.aps-rv-google-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    background: transparent;
    border: 1.5px solid var(--cs-layout-border, #dadce0);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: var(--cs-color-text, #3c4043);
    cursor: pointer;
    transition: opacity .12s;
}
.aps-rv-google-btn:hover { opacity: .7; }

/* identity bar */
.aps-rv-identity {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--cs-color-meta, #666);
    margin-bottom: 10px;
}
.aps-rv-identity img { width:22px; height:22px; border-radius:50%; object-fit:cover; }

/* form */
.aps-rv-form { display: flex; flex-direction: column; gap: 10px; }
.aps-rv-form__stars { display: flex; align-items: center; gap: 8px; }
.aps-rv-form__stars span { font-size: 13px; color: var(--cs-color-meta, #666); }
.aps-rv-form__ta {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--cs-layout-border, #e0e0e0);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background: transparent;
    color: var(--cs-color-text, #333);
    resize: vertical;
    box-sizing: border-box;
    transition: border-color .15s;
    line-height: 1.6;
    min-height: 90px;
}
.aps-rv-form__ta:focus {
    outline: none;
    border-color: var(--cs-light-accent-color);
}
.aps-rv-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: var(--cs-light-accent-color);
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity .15s;
    -webkit-appearance: none;
    align-self: flex-start;
}
.aps-rv-submit:hover { opacity: .85; }
.aps-rv-submit:disabled { opacity: .5; cursor: not-allowed; }

/* review list */
.aps-rv-list { list-style: none; margin: 0; padding: 0; }
.aps-rv-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--cs-layout-border, #e9ecef);
}
.aps-rv-item:first-child { border-top: 1px solid var(--cs-layout-border, #e9ecef); }
.aps-rv-item__avt {
    flex-shrink: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--cs-layout-border, #eee);
}
.aps-rv-item__avt img { width:100%; height:100%; object-fit:cover; display:block; }
.aps-rv-item__body { flex: 1; min-width: 0; }
.aps-rv-item__top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.aps-rv-item__name { font-size: 14px; font-weight: 600; color: var(--cs-color-heading, #111); }
.aps-rv-item__date { font-size: 12px; color: var(--cs-color-meta, #aaa); }
.aps-rv-item__rating {
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245,158,11,0.1);
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
}
.aps-rv-item__text {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.65;
    color: var(--cs-color-heading, #111);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* footer button */
.aps-rv-foot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 9px 18px;
    border: 1.5px solid var(--cs-light-accent-color);
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cs-light-accent-color);
    text-decoration: none;
    transition: background .15s, color .15s;
    background: transparent;
}
.aps-rv-foot:hover {
    background: var(--cs-light-accent-color);
    color: #fff;
    text-decoration: none;
}
.aps-rv-foot svg { flex-shrink: 0; }

.aps-rv-empty {
    font-size: 14px;
    color: var(--cs-color-meta, #aaa);
    padding: 12px 0;
}

[data-scheme=dark] .aps-rv-item,
[data-scheme=dark] .aps-rv-item:first-child { border-color: rgba(255,255,255,0.08); }
[data-scheme=dark] .aps-rv-item__name { color: #e8e8e8; }
[data-scheme=dark] .aps-rv-item__text { color: #ccc; }
[data-scheme=dark] .aps-rv-hd__title { color: #e8e8e8; }
[data-scheme=dark] .aps-rv-login-panel p { color: #ccc; }
[data-scheme=dark] .aps-rv-write__fake,
[data-scheme=dark] .aps-rv-form__ta { border-color: rgba(255,255,255,0.12); color: #ccc; }
[data-scheme=dark] .aps-rv-login-panel { border-color: rgba(255,255,255,0.08); }
[data-scheme=dark] .aps-form-message.aps-msg--success { background:#052e16; color:#6ee7b7; border-color:#065f46; }
[data-scheme=dark] .aps-form-message.aps-msg--error   { background:#450a0a; color:#fca5a5; border-color:#991b1b; }

.aps-rp {
    padding-bottom: 48px;
}

/* product header */
.aps-rp__product {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}
.aps-rp__product-img {
    width: 56px; height: 56px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--cs-layout-border, #f5f5f5);
    flex-shrink: 0;
}
.aps-rp__product-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--cs-color-heading, #111);
    margin: 0;
    line-height: 1.3;
}

/* aggregate */
.aps-rp__summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--cs-layout-border, #ebebeb);
    border-bottom: 1px solid var(--cs-layout-border, #ebebeb);
    margin-bottom: 28px;
}
.aps-rp__avg {
    font-size: 44px;
    font-weight: 800;
    line-height: 1;
    color: var(--cs-color-heading, #111);
}
.aps-rp__summary-sub { font-size: 13px; color: var(--cs-color-meta, #aaa); margin-top: 4px; }

/* list */
.aps-rp__list { list-style: none; margin: 0; padding: 0; }
.aps-rp__item {
    display: flex;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid var(--cs-layout-border, #e9ecef);
}
.aps-rp__avt {
    flex-shrink: 0;
    width: 42px; height: 42px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--cs-layout-border, #eee);
}
.aps-rp__avt img { width:100%; height:100%; object-fit:cover; display:block; }
.aps-rp__body { flex: 1; min-width: 0; }
.aps-rp__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.aps-rp__author { font-size: 14px; font-weight: 700; color: var(--cs-color-heading, #111); }
.aps-rp__date   { font-size: 12px; color: var(--cs-color-meta, #aaa); }
.aps-rp__rating {
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245,158,11,0.1);
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
}
.aps-rp__title  { font-size: 16px;
    line-height: 1.65;
    color: var(--cs-color-heading, #111);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden; }
.aps-rp__text   { font-size: 16px; font-weight: 500; line-height: 1.65; color: var(--cs-color-text, #555); margin: 0; }

/* write section */
.aps-rp__write {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--cs-layout-border, #e9ecef);
}
.aps-rp__write-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--cs-color-heading, #111);
    margin: 0 0 18px;
}

/* gate */
.aps-rp__gate { padding: 8px 0 16px; text-align: center; }
.aps-rp__gate p { font-size: 14px; color: var(--cs-color-text, #666); margin: 0 0 14px; }
.aps-rp__google-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: transparent;
    border: 1.5px solid var(--cs-layout-border, #dadce0);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: var(--cs-color-text, #3c4043);
    cursor: pointer;
    transition: opacity .12s;
}
.aps-rp__google-btn:hover { opacity: .8; }

/* logged-in bar */
.aps-rp__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--cs-color-meta, #666);
    margin-bottom: 14px;
}
.aps-rp__bar img { width:24px; height:24px; border-radius:50%; object-fit:cover; }

/* form */
.aps-rp__form { display: flex; flex-direction: column; gap: 14px; }
.aps-rp__form-stars { display: flex; align-items: center; gap: 8px; }
.aps-rp__form-stars span { font-size: 13px; color: var(--cs-color-meta, #666); }
.aps-rp__form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--cs-layout-border, #e0e0e0);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background: transparent;
    color: var(--cs-color-text, #333);
    resize: vertical;
    min-height: 120px;
    box-sizing: border-box;
    transition: border-color .15s;
    line-height: 1.6;
}
.aps-rp__form textarea:focus { outline: none; border-color: var(--cs-light-accent-color); }
.aps-rp__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 28px;
    background: var(--cs-light-accent-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity .15s;
    -webkit-appearance: none;
    align-self: flex-start;
}
.aps-rp__submit:hover { opacity: .85; }
.aps-rp__submit:disabled { opacity: .5; cursor: not-allowed; }


#aps-reviews-loading { text-align: center; padding: 16px; font-size: 14px; color: var(--cs-color-meta, #aaa); }
.aps-rp__empty { font-size: 15px; color: var(--cs-color-meta, #aaa); padding: 24px 0; }

[data-scheme=dark] .aps-rp__summary { border-color: rgba(255,255,255,0.08); }
[data-scheme=dark] .aps-rp__item { border-bottom-color: rgba(255,255,255,0.08); }
[data-scheme=dark] .aps-rp__author { color: #e8e8e8; }
[data-scheme=dark] .aps-rp__title { color: #e8e8e8; }
[data-scheme=dark] .aps-rp__text { color: #ccc; }
[data-scheme=dark] .aps-rp__product-name { color: #e8e8e8; }
[data-scheme=dark] .aps-rp__avg { color: #e8e8e8; }
[data-scheme=dark] .aps-rp__write-title { color: #e8e8e8; }
[data-scheme=dark] .aps-rp__write { border-top-color: rgba(255,255,255,0.08); }
[data-scheme=dark] .aps-rp__form textarea { border-color: rgba(255,255,255,0.12); color: #ccc; }
[data-scheme=dark] .aps-rp__gate p { color: #ccc; }

.aps-hidden { display: none !important; }
.aps-scroll-sentinel { height: 2px; margin: 8px 0; }
#aps-comments-loading { text-align: center; padding: 16px; font-size: 14px; color: var(--cs-color-meta, #aaa); }
.aps-rp__back-link { font-size: 13px; color: var(--cs-color-meta, #aaa); text-decoration: none; }
.aps-rp__back-link:hover { text-decoration: underline; }

/* Post context card (TLDR) on post-comments page */
.aps-rp__tldr { overflow: hidden; margin-bottom: 20px; padding: 0; }
.aps-rp__tldr-img-wrap { display: block; }
.aps-rp__tldr-img { width: 100%; max-height: 200px; object-fit: cover; display: block; }
.aps-rp__tldr-body { padding: 14px 18px 16px; }
.aps-rp__tldr-title { display: block; font-size: 15px; font-weight: 700; color: var(--cs-color-heading, #111); text-decoration: none; line-height: 1.4; margin-bottom: 6px; }
.aps-rp__tldr-title:hover { color: var(--cs-light-accent-color); }
.aps-rp__tldr-excerpt { font-size: 13px; color: var(--cs-color-meta, #888); line-height: 1.6; margin: 0 !important; }
[data-scheme=dark] .aps-rp__tldr-title { color: #e8e8e8; }
[data-scheme=dark] .aps-rp__tldr-excerpt { color: #999; }

/* VS card on post-comments page */
.aps-rp__vs-card { margin-bottom: 8px; }

/* Similar comparisons list */
.aps-rp__similar { margin: 4px 0 24px; }
.aps-rp__similar-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--cs-color-meta, #aaa); margin: 0 0 10px !important; }
.aps-rp__sim-item { display: flex; align-items: center; gap: 12px; background: var(--cs-layout-surface, #fff); border: 1px solid var(--cs-layout-border, #e8e8e8); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; text-decoration: none; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.aps-rp__sim-item:hover { border-color: var(--cs-light-accent-color); }
.aps-rp__sim-imgs { display: flex; align-items: center; flex-shrink: 0; }
.aps-rp__sim-img { width: 52px; height: 52px; border-radius: 8px; background: var(--cs-layout-background, #f8f8f8); border: 1px solid var(--cs-layout-border, #e8e8e8); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.aps-rp__sim-img img { width: 100%; height: 100%; object-fit: contain; }
.aps-rp__sim-vs { width: 22px; height: 22px; border-radius: 50%; background: #04a21a; display: flex; align-items: center; justify-content: center; margin: 0 -3px; z-index: 1; flex-shrink: 0; color: #fff; font-size: 0.45rem; font-weight: 800; box-shadow: 0 1px 4px rgba(4,162,26,0.4); }
.aps-rp__sim-name { font-size: 0.8125rem; font-weight: 600; color: var(--cs-color-text, #333); line-height: 1.35; flex: 1; }
.aps-rp__sim-item svg { color: var(--cs-color-meta, #aaa); flex-shrink: 0; }

[data-scheme=dark] .aps-rp__sim-item { background: var(--cs-layout-surface); border-color: rgba(255,255,255,0.08); }
[data-scheme=dark] .aps-rp__sim-img { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08); }
[data-scheme=dark] .aps-rp__sim-name { color: #e0e0e0; }
