/**
 * Strategy Rating and Review Styles
 */

/* Star Rating Display */
.star-rating-display {
    display: inline-flex;
    gap: 2px;
}

.star {
    display: inline-block;
    line-height: 1;
}

.star-small {
    font-size: 14px;
}

.star-medium {
    font-size: 20px;
}

.star-large {
    font-size: 32px;
}

.star-filled {
    color: #ffc107;
}

.star-half {
    color: #ffc107;
    opacity: 0.5;
}

.star-empty {
    color: #e0e0e0;
}

.star-interactive {
    cursor: pointer;
    transition: all 0.2s;
}

.star-interactive:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 3px rgba(255, 193, 7, 0.8));
}

/* Rating Summary - Compact Version */
.rating-summary-compact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.rating-summary-compact .rating-score {
    font-weight: bold;
    font-size: 1rem;
    color: #333;
}

.rating-summary-compact .rating-count {
    font-size: 0.85rem;
    color: #666;
}

/* Rating Summary - Full Version */
.rating-summary {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.rating-overview {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.rating-average {
    text-align: center;
    min-width: 150px;
}

.rating-number {
    font-size: 3rem;
    font-weight: bold;
    color: #333;
    line-height: 1;
    margin-bottom: 10px;
}

.rating-text {
    font-size: 0.9rem;
    color: #666;
    margin-top: 8px;
}

.rating-breakdown {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-bar-label {
    font-size: 0.9rem;
    color: #666;
    min-width: 35px;
}

.rating-bar-container {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffc107, #ff9800);
    transition: width 0.3s ease;
}

.rating-bar-count {
    font-size: 0.85rem;
    color: #666;
    min-width: 30px;
    text-align: right;
}

.rating-summary-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}

/* Review Form */
.review-form {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.review-form h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.2rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #6c757d;
}

.btn-submit-review {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit-review:hover {
    background: #5568d3;
}

.btn-submit-review:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Review Submitted State */
.review-submitted {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.review-submitted-message {
    font-weight: 500;
    color: #2e7d32;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

/* Reviews List */
.reviews-section {
    margin-top: 30px;
}

.reviews-section h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.2rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.review-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    transition: box-shadow 0.2s;
}

.review-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-name {
    font-weight: 500;
    color: #333;
    font-size: 1rem;
}

.review-date {
    font-size: 0.85rem;
    color: #999;
}

.review-text {
    color: #555;
    line-height: 1.6;
    margin-top: 10px;
}

.reviews-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}

/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.alert-info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    color: #1565c0;
}

.alert-warning {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    color: #e65100;
}

.alert-success {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

/* Rating Input Container */
.star-rating-input {
    display: inline-flex;
    gap: 5px;
    font-size: 32px;
}

/* Rating Modal */
.rating-modal-content {
    max-width: 700px;
}

.rating-modal-content h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.5rem;
}

/* Strategy Card Rating Badge */
.strategy-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    margin-top: 8px;
}

.strategy-rating-badge .rating-value {
    font-weight: bold;
    color: #333;
}

.strategy-rating-badge .rating-stars {
    color: #ffc107;
}

.strategy-rating-badge .rating-count {
    color: #666;
    font-size: 0.85rem;
}

.view-reviews-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 5px;
    display: inline-block;
    cursor: pointer;
    transition: color 0.2s;
}

.view-reviews-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rating-overview {
        flex-direction: column;
        gap: 20px;
    }

    .rating-average {
        width: 100%;
    }

    .rating-number {
        font-size: 2.5rem;
    }

    .star-large {
        font-size: 24px;
    }

    .review-header {
        flex-direction: column;
        gap: 8px;
    }

    .review-author {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}