/**
 * Spezialist Ratings - Frontend Styles
 *
 * @package Spezialist_Ratings
 * @since 1.0.0
 */

/* ====================
   Rating Badge (Listing Cards)
   ==================== */
.sr-rating-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sr-rating-badge:hover {
    transform: scale(1.05);
    text-decoration: none;
}

.sr-rating-badge.sr-filled {
    background: #FEF3C7;
    color: #92400E;
}

.sr-rating-badge.sr-filled .sr-star-icon {
    color: #F59E0B;
}

.sr-rating-badge.sr-empty {
    background: rgba(255, 255, 255, 0.95);
    color: #9CA3AF;
}

.sr-rating-badge.sr-empty .sr-star-icon {
    color: #9CA3AF;
}

.sr-rating-badge .sr-value {
    line-height: 1;
}

/* ====================
   Hero Rating Display
   ==================== */
.sr-hero-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(254, 243, 199, 0.9);
    border-radius: 12px;
    margin-left: 4px;
}

.sr-hero-rating .sr-star-icon {
    flex-shrink: 0;
}

.sr-hero-rating .sr-rating-value {
    font-weight: 600;
    color: #92400E;
    font-size: 14px;
    line-height: 1;
}

.sr-hero-rating .sr-rating-count {
    color: #78350F;
    font-size: 13px;
    opacity: 0.8;
    line-height: 1;
}

/* ====================
   Tab Badge
   ==================== */
.sr-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 6px;
    margin-left: 6px;
    background: #FEF3C7;
    color: #92400E;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* ====================
   Reviews Section (Tab Content)
   ==================== */
.sr-reviews-section {
    padding: 0;
}

/* Rating Summary */
.sr-reviews-summary {
    display: flex;
    justify-content: center;
    padding: 32px;
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border-radius: 12px;
    margin-bottom: 32px;
}

.sr-rating-large {
    text-align: center;
}

.sr-rating-number {
    font-size: 56px;
    font-weight: 700;
    color: #1F2937;
    line-height: 1;
}

.sr-rating-stars-large {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 12px 0;
}

.sr-rating-count-text {
    font-size: 14px;
    color: #6B7280;
}

/* ====================
   Form Section
   ==================== */
.sr-form-section {
    margin-bottom: 40px;
}

/* Login Prompt */
.sr-login-prompt {
    text-align: center;
    padding: 40px;
    background: #F9FAFB;
    border: 2px dashed #E5E7EB;
    border-radius: 12px;
}

.sr-prompt-icon {
    margin-bottom: 16px;
}

.sr-login-prompt h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #1F2937;
}

.sr-login-prompt p {
    margin: 0 0 20px 0;
    color: #6B7280;
}

/* Owner Notice */
.sr-owner-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #F3F4F6;
    border-radius: 8px;
    color: #4B5563;
}

.sr-owner-notice p {
    margin: 0;
}

/* Your Rating (Already Rated) */
.sr-your-rating {
    padding: 24px;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: 12px;
}

.sr-your-rating h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #065F46;
}

.sr-your-rating-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sr-your-rating-value {
    font-weight: 600;
    color: #1F2937;
}

.sr-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.sr-status-pending {
    background: #FEF3C7;
    color: #92400E;
}

.sr-your-comment {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
}

.sr-your-comment p {
    margin: 0;
    color: #374151;
}

.sr-rating-date {
    font-size: 13px;
    color: #6B7280;
    margin-top: 12px;
}

/* ====================
   Rating Form
   ==================== */
.sr-rating-form-container {
    padding: 24px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
}

.sr-rating-form-container h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #1F2937;
}

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

.sr-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.sr-form-group label .required {
    color: #DC2626;
}

/* Star Input */
.sr-star-input-group {
    margin-bottom: 24px;
}

.sr-star-input {
    display: flex;
    gap: 8px;
}

.sr-star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: transform 0.15s ease;
}

.sr-star-btn svg {
    display: block;
    fill: #D1D5DB;
    transition: fill 0.15s ease;
}

.sr-star-btn:hover {
    transform: scale(1.1);
}

.sr-star-btn:hover svg,
.sr-star-btn.hover svg {
    fill: #FCD34D;
}

.sr-star-btn.active svg {
    fill: #F59E0B;
}

.sr-rating-text {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #6B7280;
    min-height: 20px;
}

/* Comment Textarea */
.sr-rating-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sr-rating-form textarea:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sr-field-hint {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #9CA3AF;
}

/* Submit Button */
.sr-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sr-btn-loading {
    display: flex;
    align-items: center;
}

.sr-spinner {
    animation: sr-spin 1s linear infinite;
}

@keyframes sr-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Success Message */
.sr-success-message {
    text-align: center;
    padding: 32px;
}

.sr-success-message h4 {
    margin: 16px 0 8px 0;
    font-size: 20px;
    color: #065F46;
}

.sr-success-message p {
    margin: 0;
    color: #6B7280;
}

/* ====================
   Ratings List
   ==================== */
.sr-ratings-list {
    margin-top: 32px;
}

.sr-ratings-list h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #1F2937;
    padding-bottom: 12px;
    border-bottom: 1px solid #E5E7EB;
}

.sr-rating-item {
    padding: 20px 0;
    border-bottom: 1px solid #E5E7EB;
}

.sr-rating-item:last-child {
    border-bottom: none;
}

.sr-rating-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.sr-reviewer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sr-rating-meta {
    flex: 1;
}

.sr-reviewer-name {
    display: block;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 4px;
}

.sr-rating-stars {
    display: flex;
    gap: 2px;
    margin-bottom: 4px;
}

.sr-rating-date {
    font-size: 13px;
    color: #9CA3AF;
}

.sr-rating-content {
    margin-top: 12px;
    padding-left: 60px;
}

.sr-rating-content p {
    margin: 0;
    color: #4B5563;
    line-height: 1.6;
}

/* No Ratings */
.sr-no-ratings {
    text-align: center;
    padding: 48px 24px;
    color: #9CA3AF;
}

.sr-no-ratings p {
    margin: 16px 0 0 0;
}

/* ====================
   Star Components
   ==================== */
.sr-stars {
    display: inline-flex;
    gap: 2px;
}

.sr-star {
    display: block;
}

/* ====================
   Recent Reviews Feed
   ==================== */
.sr-recent-reviews {
    margin: 0;
}

.sr-recent-reviews-title {
    font-size: 20px;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #F3F4F6;
}

.sr-reviews-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sr-review-item {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.sr-review-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #D1D5DB;
}

.sr-review-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.sr-review-avatar {
    flex-shrink: 0;
}

.sr-review-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.sr-review-meta {
    flex: 1;
    min-width: 0;
}

.sr-review-user {
    font-weight: 600;
    color: #1F2937;
    font-size: 14px;
    margin-bottom: 4px;
}

.sr-review-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sr-review-info .sr-stars {
    display: inline-flex;
}

.sr-review-time {
    font-size: 12px;
    color: #9CA3AF;
}

.sr-review-content {
    margin-bottom: 12px;
}

.sr-review-content p {
    margin: 0;
    color: #4B5563;
    font-size: 14px;
    line-height: 1.6;
}

.sr-review-listing {
    padding-top: 12px;
    border-top: 1px solid #F3F4F6;
}

.sr-review-listing a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6B7280;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sr-review-listing a:hover {
    color: #F59E0B;
}

.sr-review-listing svg {
    flex-shrink: 0;
}

.sr-recent-reviews-empty {
    text-align: center;
    padding: 40px 20px;
    background: #F9FAFB;
    border: 2px dashed #E5E7EB;
    border-radius: 12px;
    color: #6B7280;
}

.sr-recent-reviews-empty p {
    margin: 0;
}

/* ====================
   Responsive
   ==================== */
@media (max-width: 640px) {
    .sr-reviews-summary {
        padding: 24px 16px;
    }

    .sr-rating-number {
        font-size: 42px;
    }

    .sr-rating-form-container {
        padding: 20px 16px;
    }

    .sr-star-btn svg {
        width: 28px;
        height: 28px;
    }

    .sr-rating-content {
        padding-left: 0;
        margin-top: 16px;
    }

    .sr-hero-rating {
        padding: 4px 8px;
        margin-left: 0;
        margin-top: 8px;
    }

    .sr-hero-rating .sr-rating-value {
        font-size: 13px;
    }

    .sr-hero-rating .sr-rating-count {
        font-size: 12px;
    }

    /* Recent Reviews Feed - Mobile */
    .sr-review-item {
        padding: 16px;
    }

    .sr-review-avatar img {
        width: 36px;
        height: 36px;
    }

    .sr-review-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* ====================
   Owner Response Display
   ==================== */
.sr-owner-response {
    margin-top: 16px;
    padding: 16px;
    background: #F9FAFB;
    border-radius: 8px;
    border-left: 3px solid #3B82F6;
}

.sr-response-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #4B5563;
}

.sr-response-header svg {
    flex-shrink: 0;
    color: #3B82F6;
}

.sr-response-label {
    font-weight: 600;
    font-size: 13px;
    color: #1F2937;
}

.sr-response-date {
    font-size: 12px;
    color: #9CA3AF;
}

.sr-response-content {
    padding-left: 24px;
}

.sr-response-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
}
