/* Amazon Rating Styles */

.amazon-rating-wrapper {
    position: relative;
}

.amazon-rating-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    width: fit-content;
}

.amazon-rating-trigger:hover {
    background-color: #f0f0f0;
}

.rating-info {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

.rating-count {
    font-size: 13px;
    font-weight: 400;
    color: #666666;
    order: 1;
    flex-shrink: 0;
}

.rating-stars-display {
    font-size: 14px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    line-height: 1;
    flex-shrink: 0;
    order: 2;
}

.stars-filled {
    color: #FF6200;
}

.stars-half {
    color: #FF6200;
    position: relative;
}

.stars-empty {
    color: #cccccc;
}

.rating-average {
    font-size: 13px;
    font-weight: 600;
    color: #0066cc;
    display: flex;
    align-items: center;
    gap: 4px;
    order: 3;
    flex-shrink: 0;
}

.rating-average::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
	margin-top: -5px;
    border: solid #0066cc;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    transition: none;
    flex-shrink: 0;
}

/* Modal Styles */
.amazon-rating-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.amazon-rating-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.amazon-rating-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.amazon-rating-modal-content {
    position: relative;
    background-color: white;
    border-radius: 8px;
    padding: 55px 25px;
    width: 96%;
    max-width: 380px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 10000;
}

.amazon-rating-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    color: #666666;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.amazon-rating-close:hover {
    background-color: #f0f0f0;
}

.amazon-rating-modal-header {
    margin-bottom: 24px;
    padding-right: 0;
}

.modal-stars {
    font-size: 25px;
    letter-spacing: 2px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    line-height: 1;
}

.modal-rating-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-average {
    font-size: 16px;
    font-weight: 700;
    color: #111111;
    line-height: 1.2;
}

.modal-total-count {
    font-size: 14px;
    color: #666666;
    line-height: 1.7;
}

/* Distribution Section */
.amazon-rating-distribution {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rating-distribution-row {
    display: flex;
    align-items: center;
    gap: 0px;
    line-height: 1;
}

.rating-label {
    font-size: 12px;
    color: #0066cc;
    font-weight: 500;
    min-width: 50px;
    text-align: right;
    flex-shrink: 0;
}

.rating-bar-container {
    flex: 1;
    height: 8px;
    background-color: #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    min-width: 100px;
}

.rating-bar-fill {
    height: 100%;
    background-color: #FF6200;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.rating-percent {
    font-size: 12px;
    color: #666666;
    font-weight: 500;
    min-width: 30px;
    text-align: left;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 480px) {
    .amazon-rating-modal-content {
        width: 95%;
        max-width: 100%;
        padding: 55px 24px;
    }
    
    .rating-label {
        font-size: 12px;
        min-width: 60px;
    }
    
    .rating-bar-container {
        height: 6px;
    }

    .rating-info {
        gap: 6px;
    }

    .rating-average,
    .rating-count {
        font-size: 12px;
    }

    .rating-stars-display {
        font-size: 13px;
    }
}