.service-rating { border: 0; padding: 0; margin: 0; min-width: 0; }
.service-rating legend { font-size: 13px; line-height: 1.5; margin-bottom: 6px; }
.service-stars { display: flex; gap: 6px; }
.service-stars label { position: relative; cursor: pointer; color: #b1bac8; }
.service-stars input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.service-stars span { display: grid; place-items: center; font-size: 36px; width: 46px; height: 46px; border-radius: 8px; transition: color .12s; }
.service-stars label:has(input:checked), .service-stars label:has(~ label input:checked) { color: #d18a00; }
.service-stars:has(label:hover) label { color: #b1bac8; }
.service-stars label:hover, .service-stars label:has(~ label:hover) { color: #d18a00 !important; }
.service-stars input:focus-visible + span { outline: 2px solid #2563eb; outline-offset: 2px; }
.feedback-btn { position: fixed; right: 18px; left: auto; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 850; border: 1px solid #dbe1e8; border-radius: 24px; background: #fff; color: #243047; padding: 12px 18px; box-shadow: 0 6px 22px #18253a20; cursor: pointer; }
#feedbackModal.feedback-modal, #feedbackOverlay.overlay, #sellerContactOverlay.overlay {
  position: fixed; inset: auto 16px max(16px, env(safe-area-inset-bottom)) auto;
  width: min(390px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
  z-index: 1100; overflow: visible; align-items: stretch; justify-content: stretch;
}
#feedbackModal.hidden { display: none; }
#feedbackOverlay:not(.show), #sellerContactOverlay:not(.show) { visibility: hidden; }
#feedbackModal .feedback-box, #feedbackOverlay .feedback-panel, #sellerContactOverlay .feedback-panel {
  box-sizing: border-box; display: grid; gap: 12px; width: 100%; padding: 20px;
  max-height: calc(100dvh - 32px); overflow-y: auto; background: #fff; color: #243047;
  border: 1px solid #dbe1e8; border-radius: 18px; box-shadow: 0 12px 48px #18253a30;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
#feedbackOverlay .feedback-panel::before, #sellerContactOverlay .feedback-panel::before { display: none; }
.feedback-box p, .feedback-panel p { margin: 0; font-size: 13px; line-height: 1.5; }
.feedback-box textarea { box-sizing: border-box; width: 100%; min-height: 100px; padding: 10px; font: inherit; border: 1px solid #cbd5e1; border-radius: 10px; }
.feedback-actions { display: flex; justify-content: flex-end; gap: 10px; }
.feedback-actions button { cursor: pointer; padding: 10px 14px; border-radius: 10px; }
.feedback-actions #feedbackSendBtn, #sellerChatSendBtn { border: 0; background: #2563eb; color: #fff; font-weight: 600; }
.feedback-actions #feedbackCancelBtn { border: 1px solid #dbe1e8; background: #f4f6f9; color: #243047; }
.embedded-body .feedback-btn { display: none; }
.seller-chat-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.seller-chat-heading button { flex: none; padding: 8px; background: transparent; color: inherit; border: 0; font-size: 24px; cursor: pointer; }
#sellerChatMessages { display: flex; flex-direction: column; gap: 10px; height: min(300px, 38dvh); overflow-y: auto; overscroll-behavior: contain; padding: 4px; }
.seller-chat-message { align-self: flex-start; max-width: 90%; border-radius: 12px 12px 12px 3px; background: #f0f3f7; padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.seller-chat-message.buyer { align-self: flex-end; border-radius: 12px 12px 3px 12px; background: #e7efff; }
.seller-chat-message small { display: block; margin-top: 5px; color: #637087; font-size: 11px; }
#sellerChatForm { display: grid; gap: 8px; }
#sellerChatForm textarea { min-height: 72px; max-height: 150px; }
#sellerChatStatus { color: #637087; min-height: 20px; }
#sellerContactBtn.has-unread { box-shadow: 0 0 0 3px #e79c25; }

@media (max-width: 600px) {
  #sellerChatMessages { height: min(160px, 22dvh); }
  #sellerChatForm textarea { min-height: 60px; }
}

.feedback-btn { display:inline-flex; align-items:center; justify-content:center; gap:7px; padding:9px 12px; }
.feedback-btn svg { flex:none; }
#feedbackModal.feedback-modal, #feedbackOverlay.overlay { width:min(288px, calc(100vw - 24px)); }
#feedbackModal .feedback-box, #feedbackOverlay .feedback-panel { padding:16px; gap:10px; }
#feedbackModal textarea, #feedbackOverlay textarea { min-height:72px; }
.service-stars { gap:6px; }
.service-stars span { width:46px; }
@media(max-width:310px) { .service-stars { gap:2px; } .service-stars span { width:40px; } }

.service-feedback-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  max-width: calc(100% - 32px);
  min-height: 44px;
  margin: 24px auto 50px;
  padding: 10px 16px;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 12px;
  background: var(--surface, #fff);
  color: var(--text2, #374151);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}
.service-feedback-link svg {
  flex: 0 0 18px;
  color: var(--accent-dark, #2563eb);
}
@media (hover: hover) {
  .service-feedback-link:hover {
    background: var(--accent-soft, #eff6ff);
    border-color: var(--accent-border, #bfdbfe);
  }
}
.service-feedback-link:active { background: var(--accent-soft, #eff6ff); }
.service-feedback-link:focus-visible {
  outline: 2px solid var(--accent-dark, #2563eb);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .service-feedback-link { transition: none; }
}
