/* =====================================================================
   Seller Review - storefront styles
   Account page ("My Seller Reviews") + seller profile reviews block
   ===================================================================== */

/* ---------- Account page container ---------- */
.seller-review-account {
    margin: 0 0 32px;
    color: #333;
}

/* Each logical section (eligible / submitted) is spaced apart */
.seller-review-account .seller-review-section {
    margin-bottom: 28px;
}

.seller-review-account .seller-review-section:last-child {
    margin-bottom: 0;
}

/* Section headings with clear vertical rhythm and a divider */
.seller-review-account .seller-review-heading {
    margin: 36px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e2e2;
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 600;
    color: #41362f;
}

.seller-review-account .seller-review-heading:first-child {
    margin-top: 8px;
}

/* Empty-state message: readable, spaced, not cramped under the heading */
.seller-review-account .seller-review-empty {
    margin: 0 0 24px;
    padding: 16px 18px;
    background: #f7f6f4;
    border: 1px solid #ececec;
    border-radius: 6px;
    color: #6a6a6a;
    font-style: normal;
    font-size: 0.95rem;
}

/* ---------- Tables (eligible + submitted) ---------- */
.seller-review-account table.data.table {
    width: 100%;
    margin: 0 0 24px;
    border-collapse: collapse;
    table-layout: auto;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.seller-review-account table.data.table thead th {
    padding: 12px 14px;
    background: #f5f3f1;
    border-bottom: 2px solid #e2e2e2;
    color: #41362f;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: left;
    white-space: nowrap;
}

.seller-review-account table.data.table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #efefef;
    vertical-align: middle;
    text-align: left;
    font-size: 0.95rem;
}

.seller-review-account table.data.table tbody tr:last-child td {
    border-bottom: 0;
}

.seller-review-account table.data.table tbody tr:nth-child(even) td {
    background: #faf9f8;
}

.seller-review-account table.data.table tbody tr:hover td {
    background: #f3f0ed;
}

/* Actions column: keep it tight, right-aligned, button never clipped */
.seller-review-account table.seller-review-eligible th:last-child,
.seller-review-account table.seller-review-eligible td.col.actions {
    text-align: right;
    white-space: nowrap;
    width: 1%;
}

.seller-review-account td.col.actions .action.primary {
    display: inline-block;
    width: auto;
    min-width: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 8px 18px;
    line-height: 1.4;
    height: auto;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    text-align: center;
    vertical-align: middle;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 4px;
    color: #ffffff;
    text-decoration: none;
}

.seller-review-account td.col.actions .action.primary:visited {
    color: #ffffff;
}

.seller-review-account td.col.actions .action.primary:hover,
.seller-review-account td.col.actions .action.primary:focus,
.seller-review-account td.col.actions .action.primary:active {
    color: #ffffff;
    text-decoration: none;
}

/* Rating cell */
.seller-review-rating-num {
    margin-left: 4px;
    color: #777;
    font-size: 0.85em;
}

/* Review text should wrap, not stretch the row */
.seller-review-account table.seller-review-mine td[data-th="Review"] {
    max-width: 420px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.5;
}

/* Status pill */
.seller-review-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.5;
    text-transform: capitalize;
    white-space: nowrap;
}

.seller-review-status-pending {
    background: #fff3cd;
    color: #856404;
}

.seller-review-status-approved {
    background: #d4edda;
    color: #155724;
}

.seller-review-status-rejected {
    background: #f8d7da;
    color: #721c24;
}

/* ---------- Review submission form (Website Theme) ---------- */
.seller-review-form-wrap {
    max-width: 820px;
    margin: 0 0 40px;
}

/* Top subtitle and back navigation bar */
.seller-review-top-bar {
    margin: 0 0 22px;
}

.seller-review-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #771D1D;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.seller-review-back-link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    transition: transform 0.2s ease;
}

.seller-review-back-link:hover {
    color: #500d0d;
    text-decoration: none;
    transform: translateX(-3px);
}

.seller-review-back-link:hover svg {
    transform: translateX(-2px);
}

.seller-review-form-subtitle {
    font-size: 14px;
    color: #666666;
    margin: 4px 0 0;
    line-height: 1.5;
}

/* Seller & Order Context Summary Card */
.seller-review-context-card {
    background: #FAF8F5;
    border: 1px solid #EADBCC;
    border-left: 4px solid #771D1D;
    border-radius: 8px;
    padding: 18px 22px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.seller-review-seller-profile {
    display: flex;
    align-items: center;
    gap: 14px;
}

.seller-review-seller-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #771D1D 0%, #a82e2e 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', 'Domine', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(119, 29, 29, 0.25);
}

.seller-review-seller-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.seller-review-seller-tag {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #8c7662;
}

.seller-review-seller-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #41362f;
    font-family: 'Playfair Display', 'Domine', Georgia, serif;
    line-height: 1.3;
}

.seller-review-order-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.seller-review-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid #e2ddd5;
    border-radius: 20px;
    font-size: 14px;
    color: #4b4b4b;
    line-height: 1.3;
}

.seller-review-chip svg {
    width: 14px;
    height: 14px;
    color: #8c7662;
    flex-shrink: 0;
}

.seller-review-chip-verified {
    background: #e8f5e9;
    border-color: #c8e6c9;
    color: #1b5e20;
    font-weight: 600;
}

.seller-review-chip-verified svg {
    color: #2e7d32;
}

/* Fallback list compatibility */
.seller-review-context {
    list-style: none;
    padding: 14px 16px;
    margin: 0 0 20px;
    background: #f7f6f4;
    border: 1px solid #ececec;
    border-radius: 6px;
}

.seller-review-context li {
    margin-bottom: 6px;
}

.seller-review-context li:last-child {
    margin-bottom: 0;
}

/* Form Container Card */
.seller-review-form-card {
    background: #ffffff;
    border: 1px solid #e8e2d8;
    border-radius: 10px;
    padding: 28px 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.seller-review-form .field {
    margin-bottom: 24px;
}

.seller-review-form .field:last-child {
    margin-bottom: 0;
}

.seller-review-field-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #41362f;
    margin-bottom: 4px;
}

.seller-review-field-label .required-mark {
    color: #e02b27;
    margin-left: 2px;
    font-weight: 700;
}

.seller-review-field-label .optional-mark {
    font-size: 12px;
    font-weight: 400;
    color: #777;
    margin-left: 4px;
}

.seller-review-field-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Interactive Star Rating Widget */
.seller-rating-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin: 6px 0;
}

.seller-star-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.seller-star-rating input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    margin: 0;
}

.seller-star-rating .seller-star-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border-radius: 4px;
    color: #dcd7cf;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
}

.seller-star-rating .seller-star-label .star-icon {
    width: 34px;
    height: 34px;
    transition: transform 0.15s ease;
}

.seller-star-rating .seller-star-label.is-active,
.seller-star-rating .seller-star-label.is-hovered {
    color: #f59e0b !important;
}

.seller-star-rating .seller-star-label:hover {
    transform: scale(1.15);
}

.seller-star-rating input[type="radio"]:focus + .seller-star-label {
    outline: 2px solid #771D1D;
    outline-offset: 2px;
}

/* Star feedback badge */
.seller-rating-feedback {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    background: #f4f3f0;
    color: #666;
    min-width: 120px;
    text-align: center;
    transition: all 0.2s ease;
}

.seller-rating-feedback[data-rating="1"] {
    background: #fee2e2;
    color: #991b1b;
}

.seller-rating-feedback[data-rating="2"] {
    background: #ffedd5;
    color: #9a3412;
}

.seller-rating-feedback[data-rating="3"] {
    background: #fef3c7;
    color: #92400e;
}

.seller-rating-feedback[data-rating="4"] {
    background: #ecfccb;
    color: #3f6212;
}

.seller-rating-feedback[data-rating="5"] {
    background: #d1fae5;
    color: #065f46;
}

/* Rating error validation message */
#rating-error-custom {
    color: #e02b27;
    font-size: 14px;
    margin-top: 6px;
    font-weight: 500;
}

/* Review Textarea Field */
.seller-review-textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 130px;
    border: 1px solid #d8c5a3;
    border-radius: 6px;
    padding: 14px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    color: #333333;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
}

.seller-review-textarea:focus {
    border-color: #771D1D;
    box-shadow: 0 0 0 3px rgba(119, 29, 29, 0.12);
    outline: none;
}

.seller-review-textarea::placeholder {
    color: #999999;
}

.seller-review-text-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 14px;
    color: #777777;
    flex-wrap: wrap;
    gap: 8px;
}

.seller-review-char-counter {
    font-weight: 600;
    color: #888888;
}

.seller-review-char-counter .near-limit {
    color: #d97706;
}

.seller-review-char-counter .over-limit {
    color: #dc2626;
    font-weight: 700;
}

/* Helpful Tips Box */
.seller-review-tips {
    background: #fbf9f6;
    border: 1px dashed #d8c5a3;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 22px 0 26px;
}

.seller-review-tips-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #41362f;
    margin: 0 0 8px;
}

.seller-review-tips-title svg {
    width: 16px;
    height: 16px;
    color: #771D1D;
    flex-shrink: 0;
}

.seller-review-tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.seller-review-tips-list li {
    position: relative;
    padding-left: 16px;
    font-size: 14px;
    color: #555555;
    line-height: 1.45;
}

.seller-review-tips-list li::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: #771D1D;
    font-weight: bold;
}

/* Actions Toolbar */
.seller-review-form-card .actions-toolbar {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid #f0eae1;
    display: flex;
    align-items: center;
    gap: 14px;
}

.seller-review-form-card .action.submit.primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #771D1D !important;
    border: 1px solid #771D1D !important;
    border-radius: 4px;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 32px;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(119, 29, 29, 0.25);
    text-decoration: none;
}

.seller-review-form-card .action.submit.primary svg {
    width: 16px;
    height: 16px;
    stroke: #ffffff;
    transition: transform 0.2s ease;
}

.seller-review-form-card .action.submit.primary:hover,
.seller-review-form-card .action.submit.primary:focus {
    background: #500d0d !important;
    border-color: #500d0d !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(119, 29, 29, 0.35);
    transform: translateY(-1px);
    text-decoration: none;
}

.seller-review-form-card .action.submit.primary:hover svg {
    transform: translateX(2px);
}

.seller-review-form-card .action.submit.primary:active {
    transform: translateY(0);
}

.seller-review-form-card .action.cancel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #d8c5a3;
    border-radius: 4px;
    color: #41362f;
    font-size: 14px;
    font-weight: 600;
    padding: 11px 24px;
    line-height: 1.4;
    text-decoration: none;
    transition: all 0.2s ease;
}

.seller-review-form-card .action.cancel-btn:hover {
    background: #f7f6f4;
    border-color: #771D1D;
    color: #771D1D;
    text-decoration: none;
}

/* Empty State Card (Ineligible or missing combo) */
.seller-review-empty-card {
    background: #ffffff;
    border: 1px solid #e8e2d8;
    border-radius: 10px;
    padding: 48px 30px;
    text-align: center;
    max-width: 600px;
    margin: 20px auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.seller-review-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f5f2eb;
    color: #771D1D;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.seller-review-empty-icon svg {
    width: 32px;
    height: 32px;
}

.seller-review-empty-title {
    font-family: 'Playfair Display', 'Domine', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #41362f;
    margin: 0 0 10px;
}

.seller-review-empty-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 24px;
}

.seller-review-empty-card .action.primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #771D1D;
    border: 1px solid #771D1D;
    border-radius: 4px;
    color: #ffffff;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.seller-review-empty-card .action.primary:hover {
    background: #500d0d;
    border-color: #500d0d;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Mobile Responsiveness for Write Review page */
@media (max-width: 639px) {
    .seller-review-form-header .seller-review-title {
        font-size: 1.5rem;
    }

    .seller-review-context-card {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .seller-review-form-card {
        padding: 20px 16px;
    }

    .seller-review-form-card .actions-toolbar {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .seller-review-form-card .actions-toolbar .primary,
    .seller-review-form-card .actions-toolbar .secondary {
        width: 100%;
    }

    .seller-review-form-card .action.submit.primary,
    .seller-review-form-card .action.cancel-btn {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        justify-content: center;
    }

    .seller-star-rating .seller-star-label .star-icon {
        width: 34px;
        height: 34px;
    }

    .seller-rating-control {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}


/* ---------- Seller profile reviews block ---------- */
.custom-seller-reviews {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e2e2e2;
}

.custom-seller-reviews .seller-reviews-title {
    margin: 0 0 12px;
    font-size: 1.35rem;
    font-weight: 600;
    color: #41362f;
}

.custom-seller-reviews .seller-reviews-aggregate {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 18px;
    font-size: 1.05rem;
}

.custom-seller-reviews .seller-reviews-count {
    color: #777;
    font-size: 0.9rem;
}

.custom-seller-reviews .seller-review-item {
    padding: 16px 0;
    border-top: 1px solid #ececec;
}

.custom-seller-reviews .seller-review-item:first-of-type {
    border-top: 0;
}

.custom-seller-reviews .seller-review-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}

.custom-seller-reviews .seller-review-stars {
    color: #f0a30a;
    font-size: 1.05rem;
    letter-spacing: 2px;
}

.custom-seller-reviews .seller-review-verified {
    display: inline-block;
    padding: 2px 8px;
    background: #d4edda;
    color: #155724;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.custom-seller-reviews .seller-review-text {
    margin: 6px 0;
    line-height: 1.6;
    color: #444;
}

.custom-seller-reviews .seller-review-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    color: #888;
    font-size: 0.85rem;
    margin-top: 6px;
}

/* ---------- Responsive: stack table cells on small screens ---------- */
@media (max-width: 639px) {

    .seller-review-account table.data.table,
    .seller-review-account table.data.table tbody,
    .seller-review-account table.data.table tbody tr,
    .seller-review-account table.data.table tbody td {
        display: block;
        width: 100%;
    }

    .seller-review-account table.data.table thead {
        display: none;
    }

    .seller-review-account table.data.table tbody tr {
        margin-bottom: 14px;
        border: 1px solid #e6e6e6;
        border-radius: 6px;
        overflow: hidden;
    }

    .seller-review-account table.data.table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        text-align: right;
        border-bottom: 1px solid #efefef;
    }

    .seller-review-account table.data.table tbody td::before {
        content: attr(data-th);
        font-weight: 600;
        color: #41362f;
        text-align: left;
    }

    .seller-review-account table.seller-review-eligible td.col.actions {
        width: auto;
        justify-content: flex-end;
    }

    .seller-review-account td.col.actions .action.primary {
        width: 100%;
        text-align: center;
    }
}

/* Larger, readable base text for the account listing */
.seller-review-account {
    font-size: 14px;
    line-height: 1.5;
}

.seller-review-account table.data.table thead th {
    font-size: 14px;
}

.seller-review-account table.data.table tbody td {
    font-size: 14px;
}

/* Buyer-facing rejection reason (shown only when rejected) */
.seller-review-reject-reason {
    display: block;
    margin-top: 6px;
    padding: 6px 10px;
    background: #fdf0f0;
    border-left: 3px solid #d9534f;
    border-radius: 3px;
    color: #a33;
    font-size: 13px;
    line-height: 1.45;
}

.seller-review-reject-reason strong {
    color: #822;
}

/* Seller dashboard "My Seller Reviews" summary */
.seller-review-seller-dashboard .seller-review-dashboard-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 8px 0 20px;
    padding: 14px 16px;
    background: #f7f6f4;
    border: 1px solid #ececec;
    border-radius: 6px;
}

.seller-review-seller-dashboard .seller-review-dashboard-rating strong {
    font-size: 16px;
    color: #41362f;
}

.seller-review-seller-dashboard .seller-review-dashboard-count {
    color: #777;
    font-size: 14px;
}

.seller-review-seller-dashboard .seller-review-stars {
    color: #f0a30a;
    letter-spacing: 2px;
}

/* Seller-panel nav "Seller Review" count badge */
.sr-nav-badge {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    border-radius: 9px;
    background: #c0392b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    vertical-align: middle;
}

/* Long review text: compact preview + View-in-modal */
.seller-review-account .seller-review-text-cell {
    max-width: 360px;
}

.seller-review-account .seller-review-preview {
    display: inline;
    line-height: 1.5;
    word-break: break-word;
}

.seller-review-account .seller-review-viewbtn {
    display: inline-block;
    margin-left: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: #8a1f11;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    white-space: nowrap;
}

.seller-review-account .seller-review-viewbtn:hover {
    color: #611609;
}

.seller-review-modal-popup .seller-review-modal-text {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
    font-size: 14px;
    color: #333;
    max-height: 60vh;
    overflow-y: auto;
}