/* ===========================================
   EasySite Reviews - Frontend Styles
   =========================================== */

/* Review Section */
.esr-reviews-section {
    padding: 60px 24px;
}

.esr-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.esr-reviews-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1d1d1f;
}

.esr-reviews-subtitle {
    font-size: 16px;
    color: #86868b;
    margin: 0;
}

/* Reviews Grid */
.esr-reviews-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Review Card */
.esr-review-card {
    background: #f9f9f9;
    border-radius: 16px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.esr-review-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

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

.esr-review-stars {
    color: #ffc107;
    font-size: 18px;
    letter-spacing: 1px;
}

.esr-google-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: white;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #5f6368;
    border: 1px solid #e8eaed;
    flex-shrink: 0;
}

.esr-google-badge img {
    width: 14px;
    height: 14px;
}

.esr-review-author {
    font-size: 16px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 2px;
}

.esr-review-meta {
    font-size: 13px;
    color: #86868b;
    margin: 0 0 8px;
}

.esr-review-date {
    font-size: 12px;
    color: #86868b;
    margin-bottom: 16px;
}

.esr-review-text {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    margin: 0 0 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.esr-owner-reply {
    margin-top: auto;
    padding: 14px 16px;
    background: rgba(0,0,0,0.03);
    border-radius: 10px;
    border-left: 3px solid #2563eb;
}

.esr-owner-reply-label {
    font-size: 12px;
    font-weight: 700;
    color: #666;
    margin-bottom: 6px;
}

.esr-owner-reply-text {
    font-size: 13px;
    line-height: 1.6;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Google link */
.esr-google-link {
    text-align: center;
    margin-top: 36px;
}

.esr-google-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: 2px solid #2563eb;
    border-radius: 50px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

.esr-google-link a:hover {
    background: #2563eb;
    color: white;
}

/* ===========================================
   Inline Badge (shortcode)
   =========================================== */
.esr-badge-inline {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: white;
    border-radius: 12px;
    padding: 12px 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
}

.esr-badge-avg {
    font-size: 22px;
    font-weight: 800;
    color: #1d1d1f;
    line-height: 1;
}

.esr-badge-stars {
    color: #fbbf24;
    font-size: 14px;
    letter-spacing: -1px;
    line-height: 1;
}

.esr-badge-count {
    font-size: 10px;
    color: #888;
    line-height: 1.2;
    white-space: nowrap;
}

.esr-badge-google {
    margin-top: 2px;
    line-height: 0;
}

/* ===========================================
   Floating Badge
   =========================================== */
.esr-floating-badge {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 9990;
    cursor: pointer;
}

.esr-floating-badge-inner {
    background: white;
    border-radius: 12px 0 0 12px;
    padding: 12px 16px;
    box-shadow: -2px 2px 16px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: 1px solid #e8e8e8;
    border-right: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.esr-floating-badge:hover .esr-floating-badge-inner {
    transform: translateX(-4px);
    box-shadow: -4px 2px 20px rgba(0,0,0,0.18);
}

.esr-floating-badge-avg {
    font-size: 20px;
    font-weight: 800;
    color: #1d1d1f;
    line-height: 1;
}

.esr-floating-badge-stars {
    color: #fbbf24;
    font-size: 14px;
    letter-spacing: -1px;
    line-height: 1;
}

.esr-floating-badge-count {
    font-size: 10px;
    color: #888;
    line-height: 1.2;
    white-space: nowrap;
}

.esr-floating-badge-google {
    margin-top: 2px;
    line-height: 0;
}

/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 1024px) {
    .esr-reviews-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .esr-reviews-section {
        padding: 40px 16px;
    }

    .esr-reviews-title {
        font-size: 24px;
    }

    .esr-reviews-grid {
        grid-template-columns: 1fr !important;
    }

    .esr-review-card {
        padding: 22px;
    }

    /* Floating badge: bottom bar on mobile */
    .esr-floating-badge {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        transform: none;
    }

    .esr-floating-badge-inner {
        flex-direction: row;
        border-radius: 12px 12px 0 0;
        border: 1px solid #e8e8e8;
        border-bottom: none;
        justify-content: center;
        gap: 10px;
        padding: 10px 20px;
    }

    .esr-floating-badge:hover .esr-floating-badge-inner {
        transform: none;
    }
}
