/**
 * Kiem Lai Wiki — Appreciation Rating Styles
 * MS-05F5: Interactive Star Rating on Public Wiki Detail
 */

.wiki-appreciation-widget {
    grid-row: 4;
    align-self: end;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: fit-content;
    max-width: 100%;
}

.wiki-appreciation-label {
    display: none;
}

.wiki-appreciation-body {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.wiki-appreciation-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.wiki-appreciation-stats {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 0.84rem;
    color: var(--bs-secondary-color, #94a3b8);
    white-space: nowrap;
}

.wiki-appreciation-score-line {
    display: inline-flex;
    align-items: baseline;
    gap: 0.25rem;
    line-height: 1.2;
}

.wiki-appreciation-average {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f59e0b;
    line-height: 1;
}

.wiki-appreciation-separator {
    font-size: 0.85rem;
    opacity: 0.65;
}

.wiki-appreciation-dot {
    display: inline;
    opacity: 0.6;
}

.wiki-appreciation-count {
    font-size: 0.82rem;
    line-height: 1.2;
    white-space: nowrap;
}

.wiki-star-slot {
    display: inline-flex;
    align-items: center;
    position: relative;
    width: 44px;
    height: 44px;
}

.wiki-star-slot--split {
    display: inline-flex;
    align-items: center;
    width: 44px;
    height: 44px;
}

.wiki-star-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: var(--border-color, #475569);
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    height: 44px;
    transition: transform 0.15s ease, color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.wiki-star-btn--full {
    width: 44px;
    min-width: 44px;
    justify-content: center;
    border-radius: 4px;
}

.wiki-star-btn--half-left {
    width: 22px;
    min-width: 22px;
    justify-content: flex-end;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.wiki-star-btn--half-right {
    width: 22px;
    min-width: 22px;
    justify-content: flex-start;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.wiki-star-btn:hover:not(:disabled) {
    color: #fbbf24;
}

.wiki-star-btn:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 1px;
    z-index: 2;
}

.wiki-star-btn.is-active {
    color: #f59e0b;
}

.wiki-star-btn.is-hover-preview {
    color: #fbbf24;
}

.wiki-star-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wiki-star-icon {
    pointer-events: none;
    fill: currentColor;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.wiki-star-icon--half-left {
    width: 11px;
    height: 22px;
}

.wiki-star-icon--half-right {
    width: 11px;
    height: 22px;
}

.wiki-appreciation-feedback {
    grid-row: 5;
    font-size: 0.8rem;
    min-height: 0;
    line-height: 1.2;
    color: var(--bs-danger, #ef4444);
    transition: opacity 0.2s ease;
}

.wiki-appreciation-feedback:empty {
    display: none;
}

.wiki-appreciation-feedback.is-success {
    color: var(--bs-success, #22c55e);
}

@media (max-width: 767.98px) {
    .wiki-appreciation-widget {
        width: 100%;
        max-width: 100%;
        margin-top: 10px;
        margin-bottom: 0;
        padding: 0;
        background: transparent;
        border: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 2px;
        box-sizing: border-box;
    }

    .wiki-appreciation-label {
        display: none;
    }

    .wiki-appreciation-body {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        width: 100%;
    }

    .wiki-appreciation-stars {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 3px;
        flex-shrink: 0;
    }

    .wiki-star-slot {
        width: 38px;
        height: 38px;
    }

    .wiki-star-slot--split {
        width: 38px;
        height: 38px;
    }

    .wiki-star-btn {
        min-height: 38px;
        height: 38px;
    }

    .wiki-star-btn--full {
        width: 38px;
        min-width: 38px;
    }

    .wiki-star-btn--half-left {
        width: 19px;
        min-width: 19px;
    }

    .wiki-star-btn--half-right {
        width: 19px;
        min-width: 19px;
    }

    .wiki-star-icon {
        width: 20px;
        height: 20px;
    }

    .wiki-star-icon--half-left {
        width: 10px;
        height: 20px;
    }

    .wiki-star-icon--half-right {
        width: 10px;
        height: 20px;
    }

    .wiki-appreciation-stats {
        display: inline-flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        justify-content: center;
        gap: 4px;
        font-size: 0.78rem;
        text-align: center;
        line-height: 1.2;
    }

    .wiki-appreciation-average {
        font-size: 0.95rem;
    }

    .wiki-appreciation-dot {
        display: inline;
        opacity: 0.6;
    }

    .wiki-appreciation-feedback {
        text-align: center;
        margin-top: 2px;
        font-size: 0.75rem;
        min-height: 0;
    }
}
