/* Trust Plugin Styles */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-600: #475569;
    --gray-800: #1e293b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
}

.trust-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* Centered header for write-review */
.page-header.centered {
    display: block;
    text-align: center;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.page-subtitle {
    color: var(--gray-600);
    margin-top: 8px;
}

/* Grids */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-size: 0.95rem;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    background: var(--gray-200);
    color: var(--gray-600);
    cursor: not-allowed;
}

.btn-outline {
    border: 1px solid var(--gray-200);
    background: white;
    color: var(--gray-600);
}

.btn-outline:hover {
    background: var(--gray-50);
}

/* Trust Score Display (Dashboard) */
.score-display {
    text-align: center;
    padding: 30px;
}

.score-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    /* Gradient set inline usually, but base provided here */
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
}

.score-inner {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-number {
    font-size: 2.5rem;
    font-weight: 700;
}

.score-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
}

.tier-badge i {
    font-size: 1.25rem;
}

/* Breakdown List */
.breakdown-list {
    list-style: none;
}

.breakdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.breakdown-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.breakdown-value {
    font-weight: 600;
}

/* Pending Deals */
.deal-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 12px;
    margin-bottom: 12px;
}

.deal-item:last-child {
    margin-bottom: 0;
}

.deal-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--gray-200);
}

.deal-info {
    flex: 1;
}

.deal-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.deal-meta {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.deal-action {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.deal-action.primary {
    background: var(--primary);
    color: white;
}

.deal-action.success {
    background: var(--success);
    color: white;
}

/* Reviews General */
.review-stars {
    display: flex;
    gap: 4px;
}

.review-stars i {
    color: var(--warning);
}

.review-stars i.empty {
    color: var(--gray-200);
}

.review-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-100);
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    align-items: flex-start;
}

.review-author {
    font-weight: 600;
}

.review-date {
    font-size: 0.875rem;
    color: var(--gray-600);
    white-space: nowrap;
}

.review-content {
    color: var(--gray-600);
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--success);
    background: #dcfce7;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--gray-600);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* Write Review Specific */
.user-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: 12px;
    margin-bottom: 24px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.user-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.user-role {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Rating Form */
.rating-section {
    text-align: center;
    margin-bottom: 30px;
}

.rating-label {
    font-weight: 600;
    margin-bottom: 16px;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 8px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 2.5rem;
    color: var(--gray-200);
    transition: all 0.2s;
}

.star-rating label:hover,
.star-rating label:hover~label,
.star-rating input:checked~label {
    color: var(--warning);
}

.rating-text {
    margin-top: 12px;
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 6px;
}

/* Quick Tags */
.quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.quick-tag {
    padding: 8px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    background: white;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.quick-tag.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Success State */
.success-state {
    display: none;
    text-align: center;
    padding: 40px;
}

.success-state.show {
    display: block;
}

.success-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success), #16a34a);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 3rem;
}

.success-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.success-message {
    color: var(--gray-600);
    margin-bottom: 24px;
}

/* Verified Notice (Write Review) */
.verified-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #dcfce7;
    border-radius: 12px;
    margin-bottom: 24px;
    color: #166534;
}

.verified-notice i {
    font-size: 1.5rem;
}

/* My Reviews Specific */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--gray-100);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    color: var(--gray-600);
    transition: all 0.2s;
}

.tab.active {
    background: white;
    color: var(--gray-800);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.summary-box {
    display: flex;
    gap: 30px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    /* Added for mobile responsiveness */
}

.summary-score {
    text-align: center;
    padding-right: 30px;
    border-right: 1px solid var(--gray-200);
}

.summary-number {
    font-size: 3rem;
    font-weight: 700;
}

.summary-count {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 4px;
}

.summary-bars {
    flex: 1;
    min-width: 250px;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.bar-label {
    width: 100px;
    font-size: 0.875rem;
    display: flex;
    gap: 4px;
}

.bar-track {
    flex: 1;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
}

.bar-fill {
    height: 100%;
    background: var(--warning);
    border-radius: 4px;
}

.bar-count {
    width: 30px;
    font-size: 0.875rem;
    color: var(--gray-600);
    text-align: right;
}

.stats-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.stat-box {
    flex: 1;
    text-align: center;
    padding: 16px;
    border-radius: 12px;
}

.stat-box.success {
    background: #dcfce7;
    color: var(--success);
}

.stat-box.warning {
    background: #fef3c7;
    color: var(--warning);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.review-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.review-name {
    font-weight: 600;
}

.review-listing {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--gray-50);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.helpful-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    background: white;
    font-size: 0.875rem;
    cursor: pointer;
    color: var(--gray-600);
}

.helpful-btn:hover {
    background: var(--gray-50);
}

/* Page Icon (Confirm Purchase) */
.page-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success), #16a34a);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    font-size: 2rem;
}

/* Listing Preview (Confirm & Mark Sold) */
.listing-preview {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 12px;
    margin-bottom: 20px;
}

.listing-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--gray-200);
}

/* Adjust for Mark Sold larger thumb */
.listing-preview .listing-thumb.large {
    width: 100px;
    height: 100px;
}

.listing-info {
    flex: 1;
}

.listing-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.listing-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.listing-seller,
.listing-meta {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Confirm Box */
.confirm-box {
    text-align: center;
    padding: 30px 20px;
}

.confirm-question {
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.confirm-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 2px solid var(--danger);
}

.btn-danger:hover {
    background: #fef2f2;
}

/* Info Box */
.info-box {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #fef3c7;
    border-radius: 12px;
    color: #92400e;
    font-size: 0.875rem;
}

.info-box i {
    font-size: 1.25rem;
}

/* Expiry Notice */
.expiry-notice {
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 16px;
}

.expiry-time {
    font-weight: 600;
    color: var(--warning);
}

/* Mark Sold Specific */
.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--gray-600);
}

.chatter-list {
    list-style: none;
}

.chatter-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.chatter-item:hover {
    border-color: var(--primary);
    background: #f0f0ff;
}

.chatter-item.selected {
    border-color: var(--success);
    background: #dcfce7;
}

.chatter-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
}

.chatter-info {
    flex: 1;
}

.chatter-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.chatter-meta {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.chatter-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatter-item.selected .chatter-check {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.other-buyer-form {
    display: none;
    padding: 20px;
    background: var(--gray-50);
    border-radius: 12px;
    margin-top: 16px;
}

.other-buyer-form.show {
    display: block;
}

/* Compact Seller Badges */
.seller-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.75rem !important;
    /* Force smaller size */
    font-weight: 600;
    line-height: 1.2;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    white-space: nowrap;
}

.seller-badge i {
    font-size: 0.85rem;
}

.seller-badge.trust {
    background: #eff6ff;
    color: var(--primary);
    border-color: #bfdbfe;
}

.seller-badge.verified {
    background: #dcfce7;
    color: var(--success);
    border-color: #bbf7d0;
}

.seller-name-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    overflow: hidden;
    /* Prevent spill */
    max-width: 100%;
}

.seller-name {
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
    /* Keep name visible */
}

/* Ensure badges container also flows if needed, though they are direct children */