/* Feedback widget — shared across the tool pages (Image Compressor, QR Generator,
   CV Builder). Deliberately neutral colors so it looks consistent regardless of
   each page's own accent color. Submissions are admin-only, never shown publicly. */

.reviews-widget {
  max-width: 640px;
  margin: 40px auto 0;
  padding: 22px 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.reviews-widget-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: #171717;
}

.reviews-widget-sub {
  margin: 0 0 16px;
  font-size: 13px;
  color: #5b5b5b;
  line-height: 1.5;
}

.reviews-widget-stars {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.reviews-star {
  border: 0;
  background: none;
  padding: 0;
  font-size: 26px;
  line-height: 1;
  color: #d8dad2;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}

.reviews-star:hover,
.reviews-star:focus-visible {
  transform: scale(1.1);
}

.reviews-star.is-filled {
  color: #f5a623;
}

.reviews-widget-comment {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  border: 1px solid rgba(17, 17, 17, 0.15);
  border-radius: 10px;
  padding: 10px 12px;
  font: 500 14px/1.5 "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #171717;
  background: #fff;
  box-sizing: border-box;
}

.reviews-widget-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.reviews-widget-row input {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(17, 17, 17, 0.15);
  border-radius: 10px;
  padding: 0 12px;
  font: 500 14px/1 "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #171717;
  background: #fff;
  box-sizing: border-box;
}

.reviews-widget-hp {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.reviews-widget-submit {
  margin-top: 14px;
  border: 0;
  border-radius: 10px;
  padding: 11px 18px;
  background: #171717;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.reviews-widget-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.reviews-widget-submit:hover:not(:disabled) {
  filter: brightness(1.1);
}

.reviews-widget-status {
  min-height: 18px;
  margin: 10px 0 0;
  font-size: 13px;
}

.reviews-widget-status.is-success { color: #2f8f36; }
.reviews-widget-status.is-error { color: #ca2845; }

@media (max-width: 480px) {
  .reviews-widget { padding: 18px 16px; }
  .reviews-widget-row { grid-template-columns: 1fr; }
}

/* Popup mode — triggered via SDReviews.maybeShowPopup(tool) once the visitor
   has finished using the tool (e.g. right after a download). */
.reviews-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
  animation: reviews-popup-fade 0.18s ease;
}

@keyframes reviews-popup-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reviews-popup-box {
  position: relative;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
}

.reviews-popup-box .reviews-widget {
  margin: 0;
}

.reviews-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(17, 17, 17, 0.08);
  color: #171717;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.reviews-popup-close:hover {
  background: rgba(17, 17, 17, 0.16);
}
