/* TD Post Star Rating - front-end styles */
.td-psr {
    --td-psr-gold: #f5a623;
    --td-psr-gold-soft: #fff7e6;
    --td-psr-text: #1f2937;
    --td-psr-muted: #6b7280;
    --td-psr-border: #e5e7eb;

    box-sizing: border-box;
    width: 100%;
    max-width: 680px;
    margin: 30px auto 18px;
    padding: 22px 24px;
    border: 1px solid var(--td-psr-border);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fffdf8 100%);
    box-shadow: 0 8px 28px rgba(17, 24, 39, 0.07);
    text-align: center;
    color: var(--td-psr-text);
    font: inherit;
}

.td-psr *,
.td-psr *::before,
.td-psr *::after {
    box-sizing: border-box;
}

.td-psr__title {
    margin: 0 0 12px;
    font-size: clamp(17px, 2.4vw, 21px);
    font-weight: 700;
    line-height: 1.45;
    color: var(--td-psr-text);
}

.td-psr__stars {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 2px 0 9px;
    padding: 4px;
}

.td-psr__star {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #d1d5db;
    font-family: Arial, sans-serif;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
    transition: transform .16s ease, color .16s ease, background-color .16s ease, opacity .16s ease;
}

.td-psr__star:hover,
.td-psr__star:focus-visible,
.td-psr__star.is-preview,
.td-psr__star.is-selected {
    color: var(--td-psr-gold);
    background: var(--td-psr-gold-soft);
    transform: translateY(-2px) scale(1.05);
    outline: none;
}

.td-psr__star:focus-visible {
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.25);
}

.td-psr__star:disabled {
    cursor: wait;
    opacity: .58;
    transform: none;
}

.td-psr__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin-top: 2px;
    color: var(--td-psr-muted);
    font-size: 14px;
    line-height: 1.5;
}

.td-psr__average {
    color: var(--td-psr-text);
    font-size: 16px;
    font-weight: 800;
}

.td-psr__message {
    min-height: 22px;
    margin-top: 8px;
    color: #15803d;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.td-psr__message.is-error {
    color: #b91c1c;
}

@media (max-width: 520px) {
    .td-psr {
        margin: 24px auto 14px;
        padding: 18px 14px;
        border-radius: 14px;
    }

    .td-psr__stars {
        gap: 1px;
    }

    .td-psr__star {
        width: 39px;
        height: 42px;
        font-size: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .td-psr__star {
        transition: none;
    }
}
