/* ==========================================================================
   SportXAPI Support Widget — 1000% sx.com UI Form Particles
   Zero-Scroll Compact Layout with Proper Circular Chat Icon Button
   ========================================================================== */

:root {
  --sx-bg: color(srgb 0.0962452 0.0962615 0.0962566);
  --sx-card: #181818;
  --sx-card-fg: #f4f4ee;
  --sx-muted-fg: #8c8c8c;
  --sx-border: rgba(255, 255, 255, 0.06);
  --sx-input-border: rgba(255, 255, 255, 0.08);
  --sx-input-bg: rgba(255, 255, 255, 0.0256);
  --sx-primary: #f4f4ee;
  --sx-primary-fg: #121316;
  --sx-radius-2xl: 16px;
  --sx-radius-xl: 14px;
  --sx-radius-lg: 10px;
}

.sx-support-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99999;
  font-family: 'Geist', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: #f4f4ee;
  -webkit-font-smoothing: antialiased;
}

/* --- Proper Circular Chat Icon Button (No Text) --- */
.sx-support-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #181818;
  color: #f4f4ee;
  cursor: pointer;
  outline: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s ease,
              border-color 0.2s ease,
              background-color 0.2s ease;
}

.sx-support-toggle:hover {
  transform: translateY(-2px) scale(1.04);
  border-color: rgba(255, 255, 255, 0.22);
  background: #222222;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.sx-support-toggle:active {
  transform: translateY(0) scale(0.98);
}

.sx-support-toggle .sx-chat-icon {
  width: 22px;
  height: 22px;
  display: block;
  color: #f4f4ee;
  transition: transform 0.22s ease, opacity 0.2s ease;
}

.sx-support-toggle .sx-close-icon {
  position: absolute;
  width: 20px;
  height: 20px;
  display: block;
  color: #f4f4ee;
  opacity: 0;
  transform: rotate(-90deg) scale(0.7);
  transition: transform 0.22s ease, opacity 0.2s ease;
}

.sx-support-widget.is-open .sx-support-toggle .sx-chat-icon {
  opacity: 0;
  transform: rotate(90deg) scale(0.7);
}

.sx-support-widget.is-open .sx-support-toggle .sx-close-icon {
  opacity: 1;
  transform: rotate(0) scale(1);
}



/* --- sx.com UI Framed Card Panel ([data-slot="card"]) — ZERO SCROLL --- */
.sx-support-panel {
  position: absolute;
  right: 0;
  bottom: 60px;
  width: 376px;
  max-width: calc(100vw - 32px);
  border-radius: 16px; /* rounded-2xl */
  border: 1px solid rgba(255, 255, 255, 0.06);
  background-color: #181818;
  color: #f4f4ee;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04),
              0 24px 64px rgba(0, 0, 0, 0.8),
              0 1px 2px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden !important; /* ZERO SCROLL */
  transform: translateY(12px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.16s ease;
  transform-origin: bottom right;
}

/* Inset top bevel highlight from sx card: dark:before:shadow-[0_-1px_rgba(255,255,255,0.06)] */
.sx-support-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 15px;
  pointer-events: none;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.sx-support-widget.is-open .sx-support-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* Card Header (sx [data-slot="card-header"]) */
.sx-card-header {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 4px;
  padding: 16px 20px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sx-card-title {
  grid-column: 1;
  grid-row: 1;
  font-family: inherit;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.015em;
  color: #f4f4ee;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sx-card-description {
  grid-column: 1;
  grid-row: 2;
  font-size: 12.5px;
  line-height: 17px;
  color: #8c8c8c;
  margin: 0;
}

.sx-card-action {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-self: start;
  justify-self: end;
}

.sx-support-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: #8c8c8c;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.sx-support-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f4f4ee;
}

/* Card Body / Form (sx [data-slot="card-panel"] & [data-slot="form"]) */
.sx-card-body {
  padding: 13px 20px 16px;
}

.sx-sx-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Field (sx [data-slot="field"]) — exact uniform gap above and inside */
.sx-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Field Label (sx [data-slot="field-label"]) */
.sx-field-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 14px;
  color: #f4f4ee;
  letter-spacing: -0.01em;
  margin: 0;
  padding: 0;
}

/* Input Control Shell (sx [data-slot="input-control"]) */
.sx-input-control {
  position: relative;
  display: inline-flex;
  width: 100%;
  height: 30px;
  border-radius: 10px; /* rounded-lg */
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-color: rgba(255, 255, 255, 0.0256);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.sx-input-control::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9px;
  pointer-events: none;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.06);
}

/* No glow when selected */
.sx-input-control:focus-within {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: none !important;
  outline: none !important;
}

/* Raw Input (sx [data-slot="input"]) */
.sx-input-control input {
  height: 28px;
  width: 100%;
  border: none;
  outline: none !important;
  background: transparent;
  color: #f4f4ee;
  font-family: inherit;
  font-size: 13px;
  line-height: 28px;
  padding: 0 10px;
  border-radius: inherit;
  box-sizing: border-box;
  box-shadow: none !important;
}

.sx-input-control input::placeholder {
  color: rgba(140, 140, 140, 0.72);
}

/* Textarea Control Shell (sx [data-slot="textarea-control"]) */
.sx-textarea-control {
  position: relative;
  display: inline-grid;
  width: 100%;
  border-radius: 10px; /* rounded-lg */
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-color: rgba(255, 255, 255, 0.0256);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.sx-textarea-control::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9px;
  pointer-events: none;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.06);
}

/* No glow when selected */
.sx-textarea-control:focus-within {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: none !important;
  outline: none !important;
}

/* Raw Textarea (sx [data-slot="textarea"]) */
.sx-textarea-control textarea {
  width: 100%;
  min-height: 52px;
  height: 52px;
  border: none;
  outline: none !important;
  background: transparent;
  color: #f4f4ee;
  font-family: inherit;
  font-size: 13px;
  line-height: 17px;
  padding: 6px 10px;
  border-radius: inherit;
  resize: vertical;
  box-sizing: border-box;
  box-shadow: none !important;
}

.sx-textarea-control textarea::placeholder {
  color: rgba(140, 140, 140, 0.72);
}

/* ==========================================================================
   SportX Upload Dropzone Component (sportxapi.com)
   Compact Zero-Scroll Height: 72px, Corner: 10px, Theme: Dark
   ========================================================================== */

.sx-sx-upload-dropzone {
  width: 100%;
  font-family: inherit;
  color: #f4f4ee;
  user-select: none;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  --upl-r: 10px; /* EXACT SAME 10px CORNER ROUNDING AS OTHERS */
  --upl-spring: cubic-bezier(0.3, 1.9, 0.4, 1);
}

.sx-sx-upload-dropzone .upl-zone-wrap {
  position: relative;
  width: 100%;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.sx-sx-upload-dropzone .upl-zone {
  position: relative;
  width: 100%;
  height: 72px;
  border-radius: 10px; /* EXACT SAME 10px AS OTHER BOXES */
  background: rgba(255, 255, 255, 0.0256);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 14px;
  cursor: pointer;
  overflow: hidden;
  box-sizing: border-box;
  transition: transform 0.42s var(--upl-spring),
              border-color 0.22s ease,
              background-color 0.22s ease;
}

.sx-sx-upload-dropzone .upl-zone:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.008);
}

.sx-sx-upload-dropzone .upl-zone[data-over="true"] {
  transform: scale(1.018);
  background: rgba(255, 255, 255, 0.07);
  border-color: #f4f4ee;
  border-style: solid;
}

.sx-sx-upload-dropzone .upl-zone[data-gulp="true"] {
  animation: upl-gulp 0.46s cubic-bezier(0.3, 1.2, 0.4, 1) 1 normal both;
}

@keyframes upl-gulp {
  0% { transform: scale(1.018); }
  35% { transform: scale(0.988); }
  70% { transform: scale(1.005); }
  100% { transform: scale(1); }
}

.sx-sx-upload-dropzone .upl-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  display: grid;
  place-items: center;
  transition: transform 0.42s var(--upl-spring), background-color 0.22s, color 0.22s;
  pointer-events: none;
}

.sx-sx-upload-dropzone .upl-zone:hover .upl-icon,
.sx-sx-upload-dropzone .upl-zone[data-over="true"] .upl-icon {
  color: #ffffff;
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}

.sx-sx-upload-dropzone .upl-zone[data-gulp="true"] .upl-icon {
  animation: upl-open 0.46s cubic-bezier(0.3, 1.4, 0.4, 1) 1 normal both;
}

@keyframes upl-open {
  40% { transform: scale(1.1); }
}

.sx-sx-upload-dropzone .upl-say {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  text-align: center;
  pointer-events: none;
}

.sx-sx-upload-dropzone .upl-say b {
  font-size: 12px;
  font-weight: 550;
  color: #f4f4ee;
  line-height: 14px;
}

.sx-sx-upload-dropzone .upl-say span {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 12px;
}

.sx-sx-upload-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
  outline: none !important;
}

/* SportX Uploaded State (.upl-now) */
.sx-sx-upload-dropzone .upl-now {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 0 12px;
  animation: upl-land 0.42s var(--upl-spring) both;
  box-sizing: border-box;
}

@keyframes upl-land {
  0% { opacity: 0; transform: translateY(6px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.sx-sx-upload-dropzone .upl-page {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
}

.sx-sx-upload-dropzone .upl-page-line {
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1.5px;
  fill: none;
}

.sx-sx-upload-dropzone .upl-page-ext {
  fill: #ffffff;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.sx-sx-upload-dropzone .upl-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.sx-sx-upload-dropzone .upl-name {
  font-size: 12px;
  font-weight: 550;
  color: #f4f4ee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 15px;
}

.sx-sx-upload-dropzone .upl-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.5);
  font-variant-numeric: tabular-nums;
  line-height: 13px;
}

.sx-sx-upload-dropzone .upl-pct {
  font-weight: 550;
  color: #f4f4ee;
  transition: color 0.2s ease;
}

.sx-sx-upload-dropzone .upl-track {
  position: relative;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 2px;
}

.sx-sx-upload-dropzone .upl-bar {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #f4f4ee;
  transform-origin: left center;
  transform: scaleX(0);
}

.sx-sx-upload-dropzone .upl-end {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sx-sx-upload-dropzone .upl-tick {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #15803d;
  color: #ffffff;
  display: none;
  place-items: center;
  animation: upl-pop 0.38s cubic-bezier(0.3, 1.6, 0.4, 1) both;
}

@keyframes upl-pop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

.sx-sx-upload-dropzone .upl-remove {
  position: relative;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.sx-sx-upload-dropzone .upl-remove:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

/* Primary Button (sx [data-slot="button"]) */
.sx-submit-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 32px;
  width: 100%;
  padding: 0 11px;
  margin-top: 2px;
  border-radius: 10px; /* rounded-lg */
  border: 1px solid #f4f4ee;
  background-color: #f4f4ee;
  color: #121316;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16),
              0 1px 2px rgba(244, 244, 238, 0.24);
  transition: background-color 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.sx-submit-btn:hover:not(:disabled) {
  background-color: rgba(244, 244, 238, 0.9);
  border-color: rgba(244, 244, 238, 0.9);
}

.sx-submit-btn:active:not(:disabled) {
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
}

.sx-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Security note right below Send Message button */
.sx-secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11px;
  color: #8c8c8c;
  line-height: 13px;
  margin-top: 5px;
  text-align: center;
}

.sx-secure-note svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  color: #8c8c8c;
}

/* Status message */
.sx-status-note {
  font-size: 11.5px;
  line-height: 1.35;
  color: #10b981;
  margin: 3px 0 0;
  text-align: center;
}

.sx-status-note:empty {
  display: none;
}

.sx-status-note.is-error {
  color: #f87171;
}

/* Mobile Responsive */
@media (max-width: 560px) {
  .sx-support-widget {
    right: 12px;
    bottom: 12px;
    z-index: 99999 !important;
  }
  .sx-support-panel {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 70px !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - 88px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    background-color: #161618 !important;
    z-index: 99999 !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.92), 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
  }
}
