/* =========================================================================
   Review-detector — stylesheet
   Web-2.0-era visual styling, vanilla CSS, single file.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Reset / base
   ------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { font-size: 12px; }

body {
  margin: 0;
  padding: 0;
  font-family: Verdana, Tahoma, Geneva, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #222;
  background-color: #e8e6dc;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 4px 4px;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: bold;
  margin: 0 0 0.5em;
  color: #1a3a6c;
}

h1 { font-size: 22px; }
h2 {
  font-size: 16px;
  border-bottom: 1px solid #d0d0c0;
  padding-bottom: 4px;
  margin-top: 1.2em;
}
h3 { font-size: 13px; color: #222; }

p { margin: 0 0 0.8em; }

a {
  color: #0855a8;
  text-decoration: underline;
}
a:visited { color: #6a3a8a; }
a:hover { color: #c2410c; }
a:focus { outline: 2px solid #ff9900; outline-offset: 2px; }

img { max-width: 100%; height: auto; }

/* -------------------------------------------------------------------------
   2. Layout
   ------------------------------------------------------------------------- */
.container {
  max-width: 960px;
  margin: 12px auto;
  background: #ffffff;
  border: 1px solid #c8c8b8;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.site-header {
  background: #2b5494;
  background-image: linear-gradient(#4a78b8, #2b5494);
  color: #ffffff;
  padding: 10px 16px;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  border-bottom: 1px solid #1a3a6c;
}

.site-header a { color: #ffffff; text-decoration: none; }
.site-header a:hover { text-decoration: underline; }
.site-header a:visited { color: #ffffff; }

.logo {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: bold;
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}
.logo-icon {
  color: #f3a900;
  margin-right: 4px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
}
.tagline {
  font-style: italic;
  font-size: 11px;
  color: #dde6f2;
  margin-top: 4px;
  max-width: 720px;
}

.primary-nav {
  background: #efeee0;
  background-image: linear-gradient(#fdfdfd, #d8d8c8);
  border-bottom: 1px solid #aaa;
  padding: 6px 16px;
}
.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.primary-nav a {
  color: #0855a8;
  text-decoration: underline;
  font-size: 11px;
  font-weight: bold;
}
.primary-nav a[aria-current="page"] {
  color: #222;
  text-decoration: none;
  cursor: default;
}

.content { padding: 14px 18px 22px; }

.site-footer {
  background: #ebebdc;
  background-image: linear-gradient(#f3f3e7, #e3e3d3);
  border-top: 1px solid #c8c8b8;
  padding: 10px 16px;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  font-size: 10px;
  color: #555;
  text-align: center;
}
.site-footer p { margin: 0 0 4px; }
.site-footer a { color: #0855a8; }

/* -------------------------------------------------------------------------
   3. Components
   ------------------------------------------------------------------------- */

/* Breadcrumb */
.breadcrumb {
  font-size: 11px;
  color: #666;
  margin: 0 0 12px;
}
.breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.breadcrumb li + li::before {
  content: "›";
  margin-right: 4px;
  color: #aaa;
}

/* Summary card */
.summary-card {
  background: #fffbf2;
  background-image: linear-gradient(#fffbf2, #f5edd6);
  border: 1px solid #e0d8b8;
  border-radius: 4px;
  padding: 14px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.summary-overall {
  flex: 0 0 200px;
  text-align: center;
}
.summary-overall .big-number {
  font-family: Georgia, serif;
  font-size: 48px;
  font-weight: bold;
  color: #1a3a6c;
  line-height: 1;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
}
.summary-overall .out-of {
  font-size: 11px;
  color: #777;
  margin: 2px 0 6px;
}
.summary-overall .review-count {
  font-size: 11px;
  color: #444;
  margin-top: 6px;
}

.summary-distribution { flex: 1 1 280px; }
.dist-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  margin-bottom: 4px;
}
.dist-label { flex: 0 0 56px; color: #444; }
.dist-bar {
  display: block;
  flex: 1 1 auto;
  height: 12px;
  background: #eeeae0;
  border: 1px solid #c8c0a8;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.08);
}
.dist-bar-fill {
  display: block;
  height: 100%;
  background: #f3a900;
  background-image: linear-gradient(#ffd048, #f3a900);
  border-right: 1px solid #b88300;
}
.dist-count {
  flex: 0 0 32px;
  text-align: right;
  color: #777;
}

/* Stars — discrete 5-star widget */
.rating {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 1px;
  line-height: 1;
  white-space: nowrap;
}
.rating .star { color: #b8b8a8; }
.rating .star.filled {
  color: #f3a900;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

/* Stars — partial average overlay */
.rating-partial {
  position: relative;
  display: inline-block;
  font-size: 22px;
  letter-spacing: 2px;
  line-height: 1;
  white-space: nowrap;
}
.rating-partial .empty { color: #b8b8a8; }
.rating-partial .filled {
  position: absolute;
  top: 0;
  left: 0;
  color: #f3a900;
  overflow: hidden;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

/* AI summary panel */
.ai-summary {
  background: #f6f9ff;
  background-image: linear-gradient(#f6f9ff, #e6efff);
  border: 1px solid #c0d0e8;
  border-radius: 4px;
  padding: 12px 14px;
  margin-bottom: 18px;
}
.ai-summary-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: bold;
  color: #1a3a6c;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.ai-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf50;
  box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.6);
  animation: ai-pulse 2s infinite;
}
@keyframes ai-pulse {
  0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(76, 175, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}
.ai-summary h3 {
  font-family: Verdana, sans-serif;
  font-size: 12px;
  color: #222;
  margin: 10px 0 3px;
}
.ai-summary ul {
  margin: 0 0 4px 0;
  padding-left: 22px;
}
.ai-summary li { margin-bottom: 2px; }
.ai-summary .disclaimer {
  font-size: 10px;
  color: #777;
  font-style: italic;
  margin: 10px 0 0;
  padding-top: 6px;
  border-top: 1px dashed #c0d0e8;
}

/* Reviews list */
.reviews-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.review {
  border: 1px solid #d8d8c8;
  background: #ffffff;
  background-image: linear-gradient(#ffffff, #f7f6ee);
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.review-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}
.avatar {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  color: #ffffff;
  font-family: Georgia, serif;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: inset 0 -4px 6px rgba(0, 0, 0, 0.1);
}
.review-meta { flex: 1 1 auto; min-width: 0; }
.review-meta .author {
  font-weight: bold;
  font-size: 12px;
  color: #1a3a6c;
}
.review-meta .date {
  display: block;
  font-size: 10px;
  color: #888;
}
.review-rating { flex: 0 0 auto; padding-top: 2px; }

.review-title {
  font-size: 13px;
  font-weight: bold;
  color: #222;
  margin: 4px 0 4px;
}
.review-body {
  font-size: 12px;
  color: #333;
  margin: 0 0 8px;
}
.review-empty {
  font-size: 11px;
  color: #999;
  font-style: italic;
  margin: 4px 0 8px;
}
.review-footer {
  font-size: 10px;
  color: #666;
  border-top: 1px dotted #d8d8c8;
  padding-top: 6px;
  margin-top: 4px;
}
.review-footer .helpful-count {
  font-weight: bold;
  color: #1a3a6c;
}

/* Pagination */
.pagination {
  margin: 18px 0 6px;
  text-align: center;
}
.pagination ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
}
.pagination a { color: #0855a8; text-decoration: underline; }
.pagination .current {
  font-weight: bold;
  color: #222;
}
.pagination .disabled { color: #999; }

/* Article (about / business prose) */
.prose p { font-size: 12px; line-height: 1.6; }
.prose h2 { margin-top: 1.4em; }
.prose ul, .prose ol { font-size: 12px; line-height: 1.6; }

/* Form (business.html) */
.appeal-form {
  background: #fbfaf3;
  background-image: linear-gradient(#fbfaf3, #f3f1e2);
  border: 1px solid #d8d8c8;
  border-radius: 4px;
  padding: 14px;
}
.form-group { margin-bottom: 10px; }
.form-group label {
  display: block;
  font-weight: bold;
  font-size: 11px;
  color: #333;
  margin-bottom: 3px;
}
.form-group .required { color: #b03030; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="file"],
.form-group textarea {
  width: 100%;
  max-width: 520px;
  padding: 5px 6px;
  border: 1px solid #999;
  background: #ffffff;
  background-image: linear-gradient(#f5f5f0, #ffffff);
  font-family: Verdana, sans-serif;
  font-size: 12px;
}
.form-group textarea { min-height: 110px; resize: vertical; }
.form-help {
  font-size: 10px;
  color: #777;
  margin-top: 2px;
}

.btn {
  display: inline-block;
  padding: 6px 16px;
  background: #efefe0;
  background-image: linear-gradient(#fdfdfd, #d8d8c8);
  border: 1px solid #999;
  border-radius: 4px;
  font-family: Verdana, sans-serif;
  font-size: 12px;
  font-weight: bold;
  color: #1a3a6c;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background-image: linear-gradient(#ffffff, #e8e8d8); }
.btn:focus { outline: 2px solid #ff9900; outline-offset: 2px; }

/* FAQ details */
details {
  border: 1px solid #d8d8c8;
  background: #ffffff;
  background-image: linear-gradient(#ffffff, #f7f6ee);
  border-radius: 3px;
  padding: 8px 12px;
  margin-bottom: 6px;
}
details summary {
  font-weight: bold;
  cursor: pointer;
  color: #1a3a6c;
  font-size: 12px;
}
details[open] summary { margin-bottom: 8px; }

/* Notice box */
.notice {
  border: 1px solid #d8c890;
  background: #fffbe0;
  background-image: linear-gradient(#fffbe0, #fff4c0);
  padding: 10px 12px;
  border-radius: 4px;
  margin: 12px 0 16px;
  font-size: 12px;
}
.notice strong { color: #8a5e00; }

/* Add-review section */
.add-review-section { margin-top: 22px; }
.review-form {
  background: #fbfaf3;
  background-image: linear-gradient(#fbfaf3, #f3f1e2);
  border: 1px solid #d8d8c8;
  border-radius: 4px;
  padding: 14px;
}

/* Star rating input */
.rating-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 12px;
}
.rating-fieldset legend {
  font-weight: bold;
  font-size: 11px;
  color: #333;
  margin-bottom: 4px;
  padding: 0;
}
.rating-input {
  display: inline-flex;
  gap: 2px;
  font-size: 28px;
  line-height: 1;
  user-select: none;
}
.rating-input input[type="radio"] {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.rating-input label {
  color: #b8b8a8;
  cursor: pointer;
  padding: 2px 1px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}
.rating-input:not(:hover) input[type="radio"]:checked + label,
.rating-input:not(:hover) label:has(~ input[type="radio"]:checked),
.rating-input label:hover,
.rating-input label:has(~ label:hover) {
  color: #f3a900;
}
.rating-input input[type="radio"]:focus + label {
  outline: 2px dotted #ff9900;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Checkbox-style label inside form-group */
.form-group .checkbox-label {
  display: block;
  font-weight: normal;
  font-size: 12px;
  color: #333;
}
.form-group .checkbox-label input[type="checkbox"] {
  margin-right: 6px;
  vertical-align: -2px;
}

/* Bottom CTA (link back to add-review on home) */
.bottom-cta {
  margin: 22px 0 6px;
  padding: 14px 16px;
  background: #fbfaf3;
  background-image: linear-gradient(#fbfaf3, #f3f1e2);
  border: 1px solid #d8d8c8;
  border-radius: 4px;
  text-align: center;
}
.bottom-cta p {
  margin: 0;
  font-size: 12px;
  color: #333;
}
.bottom-cta .btn {
  margin-left: 8px;
  vertical-align: baseline;
}

/* Success notice (after form submission) */
.notice-success {
  border-color: #b0d090;
  background: #f0fae0;
  background-image: linear-gradient(#f5fde8, #dff0c8);
}
.notice-success strong { color: #3d6a1d; }

/* Trust block */
.trust-block {
  margin: 26px 0 6px;
  background: #fbfaf2;
  background-image: linear-gradient(#ffffff, #f0eedb);
  border: 1px solid #d8d8c8;
  border-radius: 4px;
  padding: 18px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.trust-item {
  flex: 1 1 180px;
  text-align: center;
  padding: 8px 10px;
}
.trust-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 8px;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}
.trust-item h3 {
  font-family: Georgia, serif;
  color: #1a3a6c;
  font-size: 14px;
  margin: 0 0 6px;
}
.trust-item p {
  font-size: 11px;
  color: #555;
  margin: 0;
  line-height: 1.5;
}

/* -------------------------------------------------------------------------
   4. Utilities
   ------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: static;
  left: auto;
  width: auto;
  height: auto;
  background: #ff9900;
  color: #000000;
  padding: 6px 12px;
  text-decoration: underline;
  font-weight: bold;
  display: inline-block;
  margin: 6px;
  border-radius: 3px;
}

.text-muted { color: #777; }
.small { font-size: 10px; }

/* -------------------------------------------------------------------------
   5. Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .summary-card { flex-direction: column; gap: 12px; }
  .summary-overall { flex: 1 1 auto; }
  .container { margin: 4px; }
  .content { padding: 10px 12px 14px; }
  .primary-nav ul { gap: 6px 12px; }
  .review-header { flex-wrap: wrap; }
  .review-rating { width: 100%; }
}

/* -------------------------------------------------------------------------
   6. Reduced motion
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ai-dot { animation: none; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
