/* =====================================================================
   WP Content Rater — Public Styles
   ===================================================================== */

/* ── Widget container ────────────────────────────────────────────── */
.wpcr-widget {
    margin: 1.5em 0;
    font-family: inherit;
    line-height: 1.4;
}

/* ── Prompt text ─────────────────────────────────────────────────── */
.wpcr-prompt {
    margin: 0 0 0.4em;
    font-size: 0.95em;
    color: #555;
}

/* ── Icon row ────────────────────────────────────────────────────── */
.wpcr-icons {
    display: flex;
    gap: 0.15em;
    flex-wrap: wrap;
    cursor: pointer;
    user-select: none;
}

.wpcr-icon {
    font-size: 2em;
    line-height: 1;
    transition: transform 0.12s ease, color 0.12s ease;
    cursor: pointer;
}

.wpcr-icon:hover,
.wpcr-icon.wpcr-hover {
    transform: scale(1.2);
}

/* ── Results (read-only) icons ──────────────────────────────────── */
.wpcr-result-icons {
    display: flex;
    gap: 0.12em;
    flex-wrap: wrap;
}

.wpcr-result-icon {
    font-size: 1.5em;
    line-height: 1;
}

/* ── Summary line ────────────────────────────────────────────────── */
.wpcr-summary {
    margin-top: 0.35em;
    font-size: 0.85em;
    color: #666;
}

/* ── Message (feedback after vote) ──────────────────────────────── */
.wpcr-message {
    margin-top: 0.4em;
    font-size: 0.9em;
    font-weight: 600;
    min-height: 1.2em;
    transition: opacity 0.3s ease;
}

.wpcr-message.wpcr-success { color: #2e7d32; }
.wpcr-message.wpcr-error   { color: #c62828; }

/* ── Results prefix label ────────────────────────────────────────── */
.wpcr-results-prefix {
    font-weight: 600;
    margin-right: 0.25em;
}

/* ── Top-rated list (shortcode) ──────────────────────────────────── */
.wpcr-top-rated-shortcode,
.wpcr-top-rated-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wpcr-top-rated-shortcode li,
.wpcr-top-rated-list li {
    padding: 0.3em 0;
    border-bottom: 1px solid #eee;
}

.wpcr-top-rated-shortcode li:last-child,
.wpcr-top-rated-list li:last-child {
    border-bottom: none;
}

.wpcr-inline-rating,
.wpcr-widget-rating {
    font-size: 0.82em;
    color: #888;
    margin-left: 0.3em;
}

/* ── Voted state (icons become non-interactive) ──────────────────── */
.wpcr-rating-widget.wpcr-voted .wpcr-icons {
    cursor: default;
    pointer-events: none;
}

/* ── Feedback form (appears after voting) ────────────────────────── */
.wpcr-feedback-form {
    margin-top: 1em;
    padding: 1em;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.wpcr-fb-prompt {
    margin: 0 0 0.6em;
    font-weight: 600;
    font-size: 0.95em;
}

.wpcr-feedback-form input[type="text"],
.wpcr-feedback-form input[type="email"] {
    display: block;
    width: 100%;
    margin-bottom: 0.5em;
    padding: 0.4em 0.6em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
    box-sizing: border-box;
}

.wpcr-fb-text {
    display: block;
    width: 100%;
    padding: 0.4em 0.6em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.wpcr-fb-footer {
    display: flex;
    gap: 0.5em;
    margin-top: 0.6em;
    align-items: center;
}

.wpcr-fb-submit {
    padding: 0.4em 1em;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.15s;
}

.wpcr-fb-submit:hover { background: #005177; }
.wpcr-fb-submit:disabled { opacity: 0.6; cursor: default; }

.wpcr-fb-skip {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.85em;
    padding: 0;
    text-decoration: underline;
}

.wpcr-fb-skip:hover { color: #555; }

.wpcr-fb-message {
    margin-top: 0.5em;
    font-size: 0.9em;
    min-height: 1.2em;
}

.wpcr-fb-message.wpcr-success { color: #2e7d32; font-weight: 600; }
.wpcr-fb-message.wpcr-error   { color: #c62828; }

/* ── [wpcr_feedback] shortcode output ────────────────────────────── */
.wpcr-feedback-list {
    margin: 1em 0;
}

.wpcr-feedback-item {
    padding: 0.8em 0;
    border-bottom: 1px solid #eee;
}

.wpcr-feedback-item:last-child {
    border-bottom: none;
}

.wpcr-feedback-header {
    display: flex;
    align-items: center;
    gap: 0.75em;
    margin-bottom: 0.3em;
    flex-wrap: wrap;
}

.wpcr-feedback-author {
    font-weight: 600;
    font-size: 0.9em;
}

.wpcr-feedback-date {
    font-size: 0.8em;
    color: #999;
}

.wpcr-feedback-stars {
    font-size: 1.1em;
    line-height: 1;
    margin-bottom: 0.3em;
}

.wpcr-feedback-star {
    margin-right: 1px;
}

.wpcr-feedback-text {
    font-size: 0.95em;
    line-height: 1.6;
    color: #333;
}

.wpcr-no-feedback {
    color: #888;
    font-style: italic;
}

.wpcr-feedback-pagination {
    margin-top: 1em;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .wpcr-icon {
        font-size: 1.6em;
    }
}
