/* Traxx IT — Google-style review widgets (scatter, slider, sidebar) */

.traxx-google-reviews-widget {
  --traxx-g-star: #fbbc04;
  --traxx-g-text: #3c4043;
  --traxx-g-muted: #5f6368;
  --traxx-g-border: #dadce0;
  --traxx-g-card-bg: #ffffff;
  --traxx-g-shadow: 0 1px 6px rgba(32, 33, 36, 0.18);
  --traxx-g-shadow-hover: 0 8px 24px rgba(32, 33, 36, 0.22);
  font-family: Roboto, "Segoe UI", Arial, sans-serif;
  color: var(--traxx-g-text);
}

/* Summary block */
.traxx-google-summary {
  text-align: center;
  margin-bottom: 24px;
}

.traxx-google-summary-score {
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 400;
  line-height: 1;
  color: var(--traxx-g-text);
  margin-bottom: 6px;
}

.traxx-google-summary-count {
  margin: 6px 0 4px;
  font-size: 14px;
  color: var(--traxx-g-muted);
}

.traxx-google-summary-filter {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--traxx-g-muted);
}

.traxx-google-write-btn {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid var(--traxx-g-border);
  border-radius: 4px;
  color: #1a73e8;
  text-decoration: none;
  background: #fff;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.traxx-google-write-btn:hover {
  background: #f8f9fa;
  box-shadow: var(--traxx-g-shadow);
}

/* Stars */
.traxx-google-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  vertical-align: middle;
}

.traxx-google-stars img {
  display: block;
  width: 17px;
  height: 17px;
}

/* Review card base */
.traxx-google-review-card {
  --scatter-x: 0px;
  --scatter-y: 0px;
  --scatter-rotate: 0deg;
  --scatter-hover-rotate: 0deg;
  background: var(--traxx-g-card-bg);
  border: 1px solid var(--traxx-g-border);
  border-radius: 8px;
  box-shadow: var(--traxx-g-shadow);
  padding: 16px;
  width: min(280px, 42vw);
  max-width: 280px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.traxx-google-review-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.traxx-google-review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #e8eaed;
}

.traxx-google-review-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  color: var(--traxx-g-muted);
}

.traxx-google-review-author-block {
  flex: 1;
  min-width: 0;
}

.traxx-google-review-author {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--traxx-g-text);
  line-height: 1.3;
}

.traxx-google-review-date {
  font-size: 12px;
  color: var(--traxx-g-muted);
}

.traxx-google-icon {
  flex-shrink: 0;
  opacity: 0.9;
}

.traxx-google-review-stars-row {
  margin-bottom: 8px;
}

.traxx-google-review-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--traxx-g-text);
}

.traxx-google-review-text-wrap {
  position: relative;
}

.traxx-google-review-text-full {
  display: none !important;
}

.traxx-google-review-expand {
  display: inline-block;
  margin-top: 4px;
  padding: 0 4px;
  border: none;
  background: none;
  color: #1a73e8;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}

.traxx-google-review-expand:hover {
  text-decoration: underline;
}

/* Review detail modal — mounted on body via JS */
.traxx-google-review-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.traxx-google-review-modal.is-open {
  display: flex;
}

.traxx-google-review-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.traxx-google-review-modal-dialog {
  position: relative;
  width: min(520px, 100%);
  max-height: min(80vh, 640px);
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  padding: 20px 24px 24px;
  z-index: 1;
  color: #202124;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.25s ease;
}

.traxx-google-review-modal.is-open .traxx-google-review-modal-dialog {
  transform: translateY(0) scale(1);
}

.traxx-google-review-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #5f6368;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.traxx-google-review-modal-close:hover,
.traxx-google-review-modal-close:focus,
.traxx-google-review-modal-close:focus-visible {
  background: transparent;
  box-shadow: none;
  color: #202124;
  outline: none;
}

.traxx-google-review-modal-body .traxx-google-review-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-right: 44px;
}

.traxx-google-review-modal-body .traxx-google-review-author-block {
  flex: 1;
  min-width: 0;
}

.traxx-google-review-modal-body .traxx-google-review-author {
  color: #202124;
}

.traxx-google-review-modal-body .traxx-google-review-date {
  color: #5f6368;
}

.traxx-google-review-modal-body .traxx-google-review-stars-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.traxx-google-review-modal-body .traxx-google-review-stars-row .traxx-google-icon {
  flex-shrink: 0;
}

.traxx-google-review-modal-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffc400 0%, #ffd84d 100%);
  color: #1a1a1a;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(255, 196, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.traxx-google-review-modal-cta:hover,
.traxx-google-review-modal-cta:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 8px 22px rgba(255, 196, 0, 0.5);
  color: #000000;
  text-decoration: none;
}

.traxx-google-review-modal-cta span {
  transition: transform 0.2s ease;
}

.traxx-google-review-modal-cta:hover span {
  transform: translateX(3px);
}

.traxx-google-review-modal-body .traxx-google-review-text,
.traxx-google-review-text-modal {
  font-size: 15px;
  line-height: 1.65;
  color: #202124;
}

body.traxx-google-review-modal-open {
  overflow: hidden;
}

/* White scatter section with edge fades */
.traxx-google-reviews-section {
  position: relative;
  background: #ffffff;
  padding: 56px 24px 64px;
  margin-top: -1px;
  overflow: visible;
}

.traxx-google-reviews-widget,
.traxx-google-scatter-field {
  overflow: visible;
}

.traxx-google-reviews-section::before,
.traxx-google-reviews-section::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 100px;
  pointer-events: none;
  z-index: 1;
}

.traxx-google-reviews-section::before {
  top: 0;
  background: linear-gradient(to bottom, #000000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
}

.traxx-google-reviews-section::after {
  bottom: 0;
  background: linear-gradient(to top, #000000 0%, rgba(0, 0, 0, 0.45) 45%, transparent 100%);
}

.traxx-google-reviews-section .traxx-google-section-header {
  text-align: center;
  max-width: 720px;
  margin: -52px auto 12px;
  padding-top: 20px;
  position: relative;
  z-index: 5;
}

.traxx-google-reviews-section .traxx-google-reviews-widget {
  position: relative;
  z-index: 4;
}

.traxx-google-reviews-section .traxx-google-section-header h2 {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.traxx-google-reviews-section .traxx-google-section-divider {
  width: 60px;
  height: 4px;
  margin: 0 auto;
  border-radius: 2px;
}

/* Centered scatter collage */
.traxx-google-scatter-field {
  position: relative;
  max-width: 1100px;
  margin: -56px auto -40px;
  z-index: 4;
}

.traxx-google-scatter-field .traxx-google-review-card {
  position: absolute;
  left: 50%;
  top: 22%;
  z-index: 4;
  transform: translate(calc(-50% + var(--scatter-x)), var(--scatter-y)) rotate(var(--scatter-rotate));
  will-change: transform;
}

.traxx-google-scatter-field .traxx-google-review-card:hover {
  transform: translate(calc(-50% + var(--scatter-x)), calc(var(--scatter-y) - 14px)) rotate(var(--scatter-hover-rotate)) scale(1.03);
  box-shadow: var(--traxx-g-shadow-hover);
  z-index: 12;
}

.traxx-google-layout-scatter .traxx-google-summary {
  margin-bottom: 8px;
  position: relative;
  z-index: 4;
}

.traxx-google-scatter-see-all-mobile {
  display: none;
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 500;
  color: #1a73e8;
  text-decoration: none;
  position: relative;
  z-index: 4;
}

.traxx-google-scatter-see-all-mobile:hover {
  text-decoration: underline;
}

/* Slider layout */
.traxx-google-slider-wrap {
  position: relative;
  max-width: 100%;
}

.traxx-google-slider {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 8px 4px 16px;
  scrollbar-width: thin;
  scrollbar-color: #dadce0 transparent;
}

.traxx-google-slider::-webkit-scrollbar {
  height: 6px;
}

.traxx-google-slider::-webkit-scrollbar-thumb {
  background: #dadce0;
  border-radius: 3px;
}

.traxx-google-slider .traxx-google-review-card {
  flex: 0 0 min(320px, 85vw);
  scroll-snap-align: start;
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  max-width: min(320px, 85vw);
}

.traxx-google-slider-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.traxx-google-slider-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--traxx-g-border);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--traxx-g-muted);
  transition: background 0.2s, color 0.2s;
}

.traxx-google-slider-btn:hover {
  background: #f1f3f4;
  color: var(--traxx-g-text);
}

.traxx-google-slider-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Sidebar layout */
.traxx-google-sidebar {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9990;
  font-size: 14px;
}

.traxx-google-sidebar-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 10px 12px 14px;
  background: #fff;
  border: 1px solid var(--traxx-g-border);
  border-right: none;
  border-radius: 8px 0 0 8px;
  box-shadow: var(--traxx-g-shadow);
  cursor: pointer;
  color: var(--traxx-g-text);
  font-weight: 500;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  min-height: 120px;
}

.traxx-google-sidebar-panel {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) translateX(100%);
  width: min(320px, calc(100vw - 24px));
  max-height: 85vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--traxx-g-border);
  border-right: none;
  border-radius: 8px 0 0 8px;
  box-shadow: var(--traxx-g-shadow-hover);
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
}

.traxx-google-sidebar.is-open .traxx-google-sidebar-panel {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  visibility: visible;
}

.traxx-google-sidebar.is-open .traxx-google-sidebar-tab {
  opacity: 0;
  pointer-events: none;
}

.traxx-google-sidebar-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  background: #f1f3f4;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: var(--traxx-g-muted);
}

.traxx-google-sidebar-close:hover {
  background: #e8eaed;
}

.traxx-google-sidebar .traxx-google-summary {
  margin-bottom: 16px;
  text-align: left;
}

.traxx-google-sidebar .traxx-google-review-card {
  margin-bottom: 12px;
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  max-width: none;
  width: auto;
}

.traxx-google-sidebar .traxx-google-review-card:last-child {
  margin-bottom: 0;
}

.traxx-google-sidebar-see-all {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
  color: #1a73e8;
  text-decoration: none;
}

.traxx-google-sidebar-see-all:hover {
  text-decoration: underline;
}

/* Admin hint */
.traxx-google-reviews-admin-hint {
  text-align: center;
  color: #5f6368;
  font-size: 14px;
  padding: 20px;
  border: 1px dashed #dadce0;
  border-radius: 8px;
  background: #f8f9fa;
}

/* Slider on dark pages */
.traxx-google-layout-slider {
  padding: 32px 16px;
  max-width: 1100px;
  margin: 0 auto;
}

.traxx-google-layout-slider .traxx-google-summary-score {
  color: #ffffff;
}

.traxx-google-layout-slider .traxx-google-summary-count,
.traxx-google-layout-slider .traxx-google-summary-filter {
  color: #bdc1c6;
}

/* Mobile scatter */
@media (max-width: 900px) {
  .traxx-google-scatter-field {
    min-height: auto !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 0 12px;
    margin-top: 0;
    margin-bottom: 0;
  }

  .traxx-google-reviews-section .traxx-google-section-header {
    margin-top: -24px;
    padding-top: 12px;
  }

  .traxx-google-reviews-section::before,
  .traxx-google-reviews-section::after {
    height: 64px;
  }

  .traxx-google-scatter-field .traxx-google-review-card {
    position: relative;
    left: auto;
    top: auto;
    width: min(320px, 100%);
    max-width: 320px;
    transform: none !important;
  }

  .traxx-google-scatter-field .traxx-google-review-card:hover {
    transform: translateY(-4px) !important;
  }

  .traxx-google-scatter-card--desktop-only {
    display: none !important;
  }

  .traxx-google-scatter-see-all-mobile {
    display: block;
  }
}

@media (max-width: 600px) {
  .traxx-google-reviews-section {
    padding: 32px 16px 48px;
  }

  .traxx-google-reviews-section::before,
  .traxx-google-reviews-section::after {
    height: 48px;
  }

  .traxx-google-review-modal-dialog {
    padding: 20px;
    max-height: 85vh;
  }

  .traxx-google-sidebar-tab {
    min-height: 100px;
    font-size: 12px;
  }
}

/* =================================================================
   Contact-page layout: inline summary + background card collage
   ================================================================= */

.traxx-google-contact-summary {
  margin: 28px 0 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #ffffff;
  text-align: left;
}

.traxx-google-contact-summary-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.traxx-google-contact-summary-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.traxx-google-contact-summary-meta .traxx-google-stars img {
  width: 20px;
  height: 20px;
}

.traxx-google-contact-summary-count {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: 0.3px;
}

.traxx-google-contact-summary-count-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.traxx-google-contact-summary-count-link:hover,
.traxx-google-contact-summary-count-link:focus-visible {
  color: #00d2ff;
  text-decoration: none;
  text-shadow: 0 0 12px rgba(0, 210, 255, 0.45);
  outline: none;
}

.traxx-google-contact-summary-count-link:active {
  color: #ffc400;
}

/* --- Electric pulse around the 5.0 rating --- */
.traxx-google-rating-glow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  flex-shrink: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 900;
  isolation: isolate;
}

.traxx-google-rating-glow::after {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: radial-gradient(circle, #050a18 0%, #000000 100%);
  z-index: 1;
  box-shadow:
    0 0 22px rgba(0, 210, 255, 0.55),
    inset 0 0 16px rgba(0, 210, 255, 0.35);
}

.traxx-google-rating-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(0, 210, 255, 0) 0deg,
    rgba(0, 210, 255, 0.95) 80deg,
    rgba(2, 132, 199, 0.85) 160deg,
    rgba(0, 210, 255, 0) 260deg,
    rgba(0, 210, 255, 0) 360deg
  );
  filter: blur(2px) drop-shadow(0 0 10px rgba(0, 210, 255, 0.6));
  animation: traxxGoogleRatingSpin 4.5s linear infinite;
  -webkit-mask: radial-gradient(circle, transparent 56%, #000 60%);
          mask: radial-gradient(circle, transparent 56%, #000 60%);
  z-index: 0;
}

.traxx-google-rating-number {
  position: relative;
  z-index: 2;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #0284c7 0%, #00d2ff 60%, #ffffff 130%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 0 18px rgba(0, 210, 255, 0.45);
}

@keyframes traxxGoogleRatingSpin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .traxx-google-rating-pulse {
    animation: none;
    background: radial-gradient(circle, rgba(0,210,255,0.55) 0%, rgba(0,210,255,0) 70%);
    filter: blur(4px);
  }
}

/* --- Background card collage layered over .contact-container ---
   Escapes the 1200px content cap so cards can extend into the viewport
   gutters on either side of the centered grid. The wrapper sits flush
   to the top of the contact-container (so cards never bleed into the
   site header) but can extend below into the footer area. */
.traxx-google-contact-collage {
  position: absolute;
  top: 0;
  bottom: -80px;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  pointer-events: none;
  z-index: 0;
}

.traxx-google-collage-card.traxx-google-review-card {
  position: absolute;
  top: var(--cy, 0);
  left: var(--cx, 0);
  width: 260px;
  max-width: 260px;
  pointer-events: auto;
  cursor: pointer;
  transform: rotate(var(--rotate, 0deg));
  transform-origin: center center;
  transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
  will-change: transform;
}

.traxx-google-collage-card--right {
  z-index: 1;
  opacity: 0.95;
}

.traxx-google-collage-card--right:hover {
  z-index: 12;
  opacity: 1;
  transform: rotate(0deg) scale(1.04) translateY(-6px);
  box-shadow: var(--traxx-g-shadow-hover);
}

.traxx-google-collage-card--left {
  z-index: 0;
  opacity: 0.22;
  filter: blur(0.4px) saturate(0.85);
}

.traxx-google-collage-card--left:hover {
  z-index: 12;
  opacity: 1;
  filter: none;
  transform: rotate(0deg) scale(1.04) translateY(-6px);
  box-shadow: var(--traxx-g-shadow-hover);
}

@media (max-width: 1100px) {
  .traxx-google-collage-card.traxx-google-review-card {
    width: 210px;
  }
}

@media (max-width: 900px) {
  .traxx-google-contact-collage {
    display: none;
  }

  .traxx-google-contact-summary {
    text-align: center;
    margin: 24px auto 0;
  }

  .traxx-google-contact-summary-row {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .traxx-google-rating-glow {
    width: 80px;
    height: 80px;
  }

  .traxx-google-rating-number {
    font-size: 32px;
  }

  .traxx-google-contact-summary-row {
    gap: 14px;
  }

  .traxx-google-contact-summary-meta {
    align-items: center;
  }

  .traxx-google-contact-summary-meta .traxx-google-stars img {
    width: 18px;
    height: 18px;
  }

  .traxx-google-review-modal-cta {
    width: 100%;
    justify-content: center;
  }
}
