/* FOA Article Rating Component Styles */

.foa-article-rating-wrapper {
    margin: 32px 0;
}

.foa-article-rating {
    display: flex;
    align-items: center;
    gap: 16px;
}

.foa-rating-question {
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    color: #202020;
}

.foa-rating-stars {
    display: flex;
    gap: 0px;
    position: relative;
}

.foa-star {
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    line-height: 16px;
    padding: 0;
    outline: 0 !important;
}

.foa-star:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.foa-star i.fa-circle-check {
    font-size: 14px;
    color: #459B5A !important;
    font-family: "Font Awesome 7 Pro", "Font Awesome 6 Pro", "Font Awesome 5 Pro";
    font-style: normal;
    font-weight: 900;
    line-height: 16px;
    transition: color 0.2s ease;
}

/* SVG Star styling */
.foa-star svg.star-icon {
    width: 33px;
    height: 33px;
    display: block;
}

.foa-star svg.star-icon .star-fill {
    fill: #B1B1B1;
    transition: fill 0.2s ease;
}

/* Hide borders by default */
.foa-star svg.star-icon .white-border,
.foa-star svg.star-icon .blue-border {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.foa-star svg .white-border {
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(0.94);
}

/* Selected state - orange stars */
.foa-star.selected svg.star-icon .star-fill {
    fill: #FFA400;
}

/* Focus state - show borders */
.foa-star:focus {
    outline: 0;
}

.foa-star:focus-visible svg.star-icon .white-border,
.foa-star:focus-visible svg.star-icon .blue-border {
    opacity: 1;
}

/* Individual star tooltip */
.foa-star-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 7px;
    display: flex;
    padding: 0 8px;
    height: 30px;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    border-radius: 4px;
    background-color: #FFFFFF;
    color: #202020;
    font-size: 14px;
    font-weight: 325;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.16);
}

/* Tooltip arrow - matches mockup SVG (12x6 triangle) */
.foa-star-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #FFFFFF;
}

/* Green arrow for "Thank you!" tooltip */
.foa-star-tooltip.thank-you-label::after {
    border-top-color: #FFFFFF;
}

/* Show tooltip on hover (only if no rating selected) */
.foa-star:hover .foa-star-tooltip.hover-label {
    opacity: 1;
}

/* Hide hover tooltips completely when any star is selected */
.foa-rating-stars.has-selection .foa-star:hover .foa-star-tooltip.hover-label {
    opacity: 0;
}

/* Always show "Thank you!" tooltip on the selected star */
.foa-star.selected .foa-star-tooltip.thank-you-label {
    opacity: 1;
}

/* Selected state - yellow stars */
.foa-star.selected i {
    color: #FFA400;
}

/* Focus state */
.foa-star:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Rating label - used only for error messages now */
.foa-rating-label {
    min-height: 24px;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    transition: opacity 0.2s ease;
    text-align: center;
}

.foa-rating-label:empty {
    min-height: auto;
    position: absolute;
}

/* Responsive */
@media (max-width: 767px) {
    .foa-article-rating {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .foa-rating-question {
        font-size: 16px;
    }
}

/* Animation for star selection */
@keyframes starPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.foa-star.animate-select {
    animation: starPulse 0.3s ease;
}
