/* ==========================================================================
   WQRI Modern Frontend Reviews CSS
   ========================================================================== */

.wqri-reviews-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #2c3e50;
    line-height: 1.6;
}

/* STATS CARD */
.wqri-stats-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 30px;
    gap: 25px;
}

.wqri-stats-score-box {
    text-align: center;
    flex: 0 0 160px;
}

.wqri-big-rating {
    font-size: 54px;
    font-weight: 800;
    color: #1a202c;
    line-height: 1;
    margin-bottom: 6px;
}

.wqri-stars-display {
    color: #f59e0b;
    font-size: 22px;
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.wqri-total-count {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

/* BREAKDOWN PROGRESS BARS */
.wqri-breakdown-box {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wqri-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #4a5568;
}

.wqri-bar-stars {
    width: 35px;
    font-weight: 600;
    color: #f59e0b;
}

.wqri-progress-track {
    flex: 1;
    height: 9px;
    background: #edf2f7;
    border-radius: 6px;
    overflow: hidden;
}

.wqri-progress-fill {
    height: 100%;
    background: #f59e0b;
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.wqri-bar-num {
    width: 28px;
    text-align: right;
    font-weight: 600;
    color: #a0aec0;
}

/* ACTION BUTTON */
.wqri-action-box {
    flex: 0 0 auto;
}

.wqri-btn-write-review {
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wqri-btn-write-review:hover {
    background: #2d3748;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* SUBMISSION FORM */
.wqri-form-wrapper {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 35px;
    animation: wqriFadeDown 0.3s ease;
}

@keyframes wqriFadeDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.wqri-frontend-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.wqri-form-row {
    display: flex;
    gap: 20px;
}

.wqri-form-row .wqri-form-field {
    flex: 1;
}

.wqri-form-field {
    margin-bottom: 18px;
}

.wqri-form-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.wqri-form-field label .required {
    color: #ef4444;
}

.wqri-form-field input[type="text"],
.wqri-form-field input[type="email"],
.wqri-form-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.wqri-form-field input:focus,
.wqri-form-field textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* STAR PICKER */
.wqri-star-picker {
    display: inline-flex;
    gap: 6px;
    font-size: 28px;
    cursor: pointer;
}

.wqri-picker-star {
    color: #cbd5e1;
    transition: color 0.15s, transform 0.15s;
}

.wqri-picker-star.hovered,
.wqri-picker-star.active {
    color: #f59e0b;
}

.wqri-picker-star:hover {
    transform: scale(1.15);
}

.wqri-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.wqri-btn-submit {
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.wqri-btn-submit:hover {
    background: #1d4ed8;
}

.wqri-btn-cancel {
    background: transparent;
    color: #64748b;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    cursor: pointer;
}

.wqri-btn-cancel:hover {
    background: #e2e8f0;
}

.wqri-form-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.wqri-form-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.wqri-form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* REVIEWS LIST & CARDS (2 COLUMNS ON DESKTOP) */
.wqri-reviews-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.wqri-review-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.2s, transform 0.2s;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* PAGINATION CONTROLS */
.wqri-pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 35px;
    padding: 15px 0;
    flex-wrap: wrap;
    width: 100%;
}

.wqri-page-btn,
.wqri-page-num {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    line-height: 1;
}

.wqri-page-numbers {
    display: flex;
    gap: 6px;
    align-items: center;
}

.wqri-page-btn:hover:not(:disabled),
.wqri-page-num:hover:not(.active) {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.wqri-page-num.active {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
    cursor: default;
}

.wqri-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8fafc;
}


.wqri-review-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.wqri-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 14px;
}

.wqri-avatar-letter {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wqri-user-meta {
    flex: 1;
}

.wqri-author-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wqri-verified-badge {
    background: #ecfdf5;
    color: #059669;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 12px;
    border: 1px solid #a7f3d0;
}

.wqri-card-date {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

.wqri-card-rating {
    color: #f59e0b;
    font-size: 16px;
    letter-spacing: 1px;
}

.wqri-card-body p {
    margin: 0;
    color: #334155;
    font-size: 14px;
    line-height: 1.6;
}

.wqri-no-reviews {
    text-align: center;
    padding: 40px;
    background: #f8fafc;
    border-radius: 12px;
    color: #64748b;
    font-size: 15px;
}

/* RESPONSIVE */
@media (max-width: 850px) {
    .wqri-reviews-list {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .wqri-stats-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .wqri-stats-score-box {
        flex: 1 1 100%;
    }

    .wqri-breakdown-box {
        width: 100%;
    }

    .wqri-action-box {
        width: 100%;
    }

    .wqri-btn-write-review {
        width: 100%;
        justify-content: center;
    }

    .wqri-form-row {
        flex-direction: column;
        gap: 0;
    }

    .wqri-card-header {
        flex-wrap: wrap;
    }

    .wqri-card-rating {
        width: 100%;
        margin-top: 4px;
    }
}
