/* ══════════════════════════════════════════
   Rating Badge
   ══════════════════════════════════════════ */

.bn-rating-badge {
    display: flex;
    align-items: center;
}

.bn-badge-stars {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.bn-badge-star {
    line-height: 1;
}

.bn-badge-star-half {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.bn-badge-count {
    font-size: 14px;
    line-height: 1;
}

/* ══════════════════════════════════════════
   Birdnest Product Reviews
   ══════════════════════════════════════════ */

.bn-reviews-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 0;
}

/* ── Header ── */
.bn-reviews-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 30px;
}

.bn-reviews-header {
    margin-bottom: 30px;
}

.bn-header-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.bn-write-review-btn {
    padding: 12px 28px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: opacity 0.2s;
}

.bn-write-review-btn:hover {
    opacity: 0.85;
}

/* ── Rating Summary ── */
.bn-reviews-summary {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    padding-bottom: 30px;
}

.bn-summary-left {
    flex-shrink: 0;
    text-align: center;
}

.bn-avg-number {
    display: block;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
}

.bn-avg-stars {
    margin-top: 6px;
    font-size: 22px;
}

.bn-summary-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 6px;
}

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

.bn-bar-label {
    width: 30px;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    flex-shrink: 0;
}

.bn-bar-track {
    flex: 1;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.bn-bar-fill {
    height: 100%;
    border-radius: 5px;
    min-width: 2px;
    transition: width 0.4s ease;
}

/* ── Stars ── */
.bn-star {
    font-size: inherit;
    line-height: 1;
}

.bn-star-half {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.bn-star-half::after {
    content: '\2734';
    position: absolute;
    left: 50%;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #c5cec8;
}

/* ── Reviews List ── */
.bn-reviews-list {
    margin-top: 10px;
}

.bn-no-reviews {
    text-align: center;
    padding: 40px 0;
    font-size: 16px;
    opacity: 0.7;
}

.bn-review-item {
    display: flex;
    gap: 40px;
    padding: 28px 0;
    border-top: 1px solid;
}

.bn-review-item:last-child {
    border-bottom: none;
    border-bottom-color: inherit;
}

.bn-review-left {
    flex-shrink: 0;
    width: 120px;
    padding-top: 4px;
}

.bn-review-author {
    font-size: 15px;
    font-weight: 600;
}

.bn-review-right {
    flex: 1;
    min-width: 0;
}

.bn-review-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.bn-review-stars {
    font-size: 18px;
}

.bn-review-date {
    font-size: 14px;
}

.bn-review-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
}

.bn-review-content {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 14px;
}

.bn-review-content p {
    margin: 0 0 8px;
}

.bn-review-content p:last-child {
    margin-bottom: 0;
}

.bn-review-meta {
    font-size: 14px;
    margin-bottom: 10px;
}

.bn-review-meta strong {
    margin-right: 6px;
}

.bn-recommends strong {
    margin-right: 6px;
}

/* ── Helpful Voting ── */
.bn-helpful-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    margin-bottom: 10px;
}

.bn-helpful-label {
    font-size: 14px;
    font-weight: 600;
}

.bn-helpful-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 5px 14px;
    border: 2px solid;
    border-radius: 20px;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.bn-helpful-btn:hover {
    background: rgba(26, 58, 42, 0.08);
}

.bn-helpful-btn.bn-voted {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

/* ── Load More ── */
.bn-reviews-pagination {
    text-align: center;
    padding: 30px 0;
}

.bn-load-more {
    padding: 12px 32px;
    border: 2px solid #1a3a2a;
    border-radius: 24px;
    background: transparent;
    color: #1a3a2a;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.bn-load-more:hover {
    background: #1a3a2a;
    color: #fff;
}

/* ══════════════════════════════════════════
   Modal
   ══════════════════════════════════════════ */
.bn-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: bn-fade-in 0.2s ease;
}

.bn-modal-content {
    position: relative;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: bn-slide-up 0.25s ease;
}

.bn-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    line-height: 1;
    padding: 0;
}

.bn-modal-close:hover {
    opacity: 1;
}

.bn-modal-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 24px;
}

/* ── Form ── */
.bn-review-form .bn-form-group {
    margin-bottom: 20px;
}

.bn-review-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.bn-review-form label .required {
    color: #d32f2f;
}

.bn-review-form input[type="text"],
.bn-review-form input[type="email"],
.bn-review-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.bn-review-form input:focus,
.bn-review-form textarea:focus {
    outline: none;
    border-color: #1a3a2a;
}

.bn-review-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* ── Star Picker ── */
.bn-star-select {
    display: flex;
    gap: 4px;
    font-size: 28px;
    cursor: pointer;
}

.bn-star-pick {
    color: #d0d0d0;
    transition: color 0.15s;
    user-select: none;
}

.bn-star-pick.active {
    color: #1a3a2a;
}

.bn-star-pick:hover,
.bn-star-pick:hover ~ .bn-star-pick {
    color: #d0d0d0;
}

.bn-star-select:hover .bn-star-pick {
    color: #1a3a2a;
}

.bn-star-select .bn-star-pick:hover ~ .bn-star-pick {
    color: #d0d0d0;
}

/* ── Radio Groups ── */
.bn-radio-group {
    display: flex;
    gap: 20px;
}

.bn-radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    cursor: pointer;
}

.bn-radio-group input[type="radio"] {
    accent-color: #1a3a2a;
}

/* ── Submit ── */
.bn-modal-submit {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 6px;
}

.bn-modal-submit:hover {
    opacity: 0.9;
}

.bn-modal-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Form Message ── */
.bn-form-message {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}

.bn-form-message.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.bn-form-message.error {
    background: #fbe9e7;
    color: #c62828;
}

/* ── Animations ── */
@keyframes bn-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes bn-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
    .bn-reviews-title {
        font-size: 24px;
    }

    .bn-header-top {
        justify-content: center;
    }

    .bn-write-review-btn {
        width: 100%;
        text-align: center;
    }

    .bn-reviews-summary {
        flex-direction: column;
        gap: 20px;
    }

    .bn-summary-left {
        display: flex;
        align-items: center;
        gap: 16px;
        text-align: left;
    }

    .bn-avg-number {
        font-size: 36px;
    }

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

    .bn-review-left {
        width: auto;
    }

    .bn-modal-content {
        padding: 24px;
    }
}
