/* =========================================
   TOOL REVIEWS
   Star ratings + written reviews on tool pages.
   Uses the shared --hero-* design tokens from hero.css.
   ========================================= */

.ckr-reviews {
    max-width: 900px;
    margin: 0 auto;
    padding: 56px 40px 8px;
    border-top: 1px solid var(--hero-border);
}

.ckr-reviews-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.ckr-reviews-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--hero-text-heading);
    letter-spacing: -0.3px;
    margin: 0;
}

/* ─── Average summary ─── */
.ckr-reviews-summary {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ckr-reviews-average {
    font-size: 34px;
    font-weight: 800;
    color: var(--hero-text-heading);
    line-height: 1;
}

.ckr-reviews-summary-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ckr-reviews-count {
    font-size: 13px;
    color: var(--hero-text-muted);
}

/* ─── Static star display ─── */
.ckr-stars {
    display: inline-flex;
    gap: 2px;
    font-size: 18px;
    line-height: 1;
    letter-spacing: 1px;
}

.ckr-stars .ckr-star {
    color: #d1d5db;
}

.ckr-stars .ckr-star.is-filled {
    color: #f5b400;
}

/* ─── Notices ─── */
.ckr-review-notice {
    padding: 14px 18px;
    border-radius: var(--hero-radius);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 28px;
}

.ckr-review-notice.is-ok {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.ckr-review-notice.is-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* ─── Review list ─── */
.ckr-review-list {
    list-style: none;
    margin: 0 0 40px;
    padding: 0;
    display: grid;
    gap: 16px;
}

.ckr-review-item {
    padding: 20px;
    background: var(--hero-surface);
    border: 1px solid var(--hero-border);
    border-radius: var(--hero-radius);
}

.ckr-review-item-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.ckr-review-author {
    font-weight: 700;
    font-size: 15px;
    color: var(--hero-text-heading);
}

.ckr-review-date {
    font-size: 13px;
    color: var(--hero-text-muted);
    margin-left: auto;
}

.ckr-review-content {
    font-size: 15px;
    line-height: 1.7;
    color: var(--hero-text);
}

.ckr-reviews-empty {
    font-size: 15px;
    color: var(--hero-text-muted);
    margin-bottom: 36px;
}

/* ─── Form ─── */
.ckr-review-form-wrap {
    background: var(--hero-surface);
    border: 1px solid var(--hero-border);
    border-radius: var(--hero-radius-lg, 16px);
    padding: 28px;
}

.ckr-review-form-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--hero-text-heading);
    margin: 0 0 4px;
}

.ckr-review-form-sub {
    font-size: 14px;
    color: var(--hero-text-muted);
    margin: 0 0 22px;
}

.ckr-field {
    margin-bottom: 18px;
}

.ckr-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--hero-text-heading);
    margin-bottom: 7px;
}

.ckr-field .ckr-optional {
    font-weight: 400;
    color: var(--hero-text-muted);
}

.ckr-field input[type="text"],
.ckr-field input[type="email"],
.ckr-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--hero-border);
    border-radius: var(--hero-radius);
    font-size: 15px;
    font-family: inherit;
    color: var(--hero-text);
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ckr-field input:focus,
.ckr-field textarea:focus {
    outline: none;
    border-color: var(--hero-primary);
    box-shadow: 0 0 0 3px var(--hero-primary-light);
}

.ckr-field textarea {
    resize: vertical;
    min-height: 110px;
}

.ckr-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ─── Interactive star input (CSS-only) ─── */
.ckr-star-input {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.ckr-star-input input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.ckr-star-input label {
    font-size: 34px;
    line-height: 1;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.12s, transform 0.12s;
    margin: 0;
}

.ckr-star-input label:hover,
.ckr-star-input label:hover ~ label,
.ckr-star-input input:checked ~ label {
    color: #f5b400;
}

.ckr-star-input label:hover {
    transform: scale(1.12);
}

.ckr-star-input input:focus-visible + label {
    outline: 2px solid var(--hero-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Honeypot — hidden from humans, visible to bots */
.ckr-hp {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.ckr-review-submit {
    display: inline-block;
    padding: 13px 30px;
    background: var(--hero-primary);
    color: #fff;
    border: none;
    border-radius: var(--hero-radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

.ckr-review-submit:hover {
    background: var(--hero-primary-hover);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .ckr-reviews {
        padding: 44px 20px 8px;
    }

    .ckr-review-form-wrap {
        padding: 20px;
    }

    .ckr-field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .ckr-reviews-head {
        gap: 12px;
    }
}
