/* ==========================================================================
   Ask anything about RCS - frontpage support box
   A chat-style textbox that opens the visitor's email app with the question
   prefilled (mailto: to support@sendrcs.eu). Pure CSS + a small inline script
   in index.html; no Tailwind rebuild needed. All rules are scoped to .ask-rcs.
   ========================================================================== */

.ask-rcs-wrap {
  position: relative;
  max-width: 760px;
  margin: 3rem auto 0;
}

/* Soft glow behind the card */
.ask-rcs-glow {
  position: absolute;
  inset: -40px -60px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 70% at 20% 30%, rgba(233, 30, 140, 0.28), transparent 70%),
    radial-gradient(55% 65% at 80% 70%, rgba(124, 58, 237, 0.30), transparent 70%),
    radial-gradient(40% 50% at 55% 10%, rgba(34, 211, 238, 0.14), transparent 70%);
  filter: blur(30px);
  opacity: 0.7;
  transition: opacity 0.4s;
}

.ask-rcs-wrap:focus-within .ask-rcs-glow {
  opacity: 1;
}

/* Card with rotating gradient border */
.ask-rcs-card {
  position: relative;
  z-index: 1;
  padding: 1.5px;
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.ask-rcs-border {
  position: absolute;
  inset: -200%;
  z-index: -1;
  background: conic-gradient(
    from 0deg,
    rgba(233, 30, 140, 0.15),
    #e91e8c,
    #7c3aed,
    #22d3ee,
    rgba(233, 30, 140, 0.15),
    #7c3aed,
    #e91e8c,
    rgba(233, 30, 140, 0.15)
  );
  animation: ask-rcs-spin 9s linear infinite;
  opacity: 0.75;
  transition: opacity 0.3s;
}

.ask-rcs-wrap:focus-within .ask-rcs-border {
  opacity: 1;
}

@keyframes ask-rcs-spin {
  to { transform: rotate(360deg); }
}

.ask-rcs-box {
  position: relative;
  border-radius: 22.5px;
  background: linear-gradient(180deg, #11151b 0%, #0b0e12 100%);
  padding: 18px 20px 14px;
}

/* Label row: sparkle + title + status */
.ask-rcs-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ask-rcs-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #cbd5e1;
  cursor: text;
}

.ask-rcs-sparkle {
  width: 18px;
  height: 18px;
  color: #e91e8c;
  flex-shrink: 0;
  animation: ask-rcs-twinkle 2.6s ease-in-out infinite;
}

@keyframes ask-rcs-twinkle {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.82); opacity: 0.65; }
}

.ask-rcs-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #9ca3af;
  white-space: nowrap;
}

.ask-rcs-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: ask-rcs-pulse 2s ease-out infinite;
  flex-shrink: 0;
}

@keyframes ask-rcs-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* The textbox itself */
.ask-rcs-input {
  display: block;
  width: 100%;
  min-height: 88px;
  max-height: 240px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 17px;
  line-height: 1.55;
  padding: 6px 0;
  caret-color: #e91e8c;
}

.ask-rcs-input::placeholder {
  color: #6b7280;
}

.ask-rcs-input:focus::placeholder {
  color: #4b5563;
}

.ask-rcs-input::-webkit-scrollbar {
  width: 6px;
}

.ask-rcs-input::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

/* Bottom row: hint + send button */
.ask-rcs-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.ask-rcs-hint {
  font-size: 12px;
  color: #6b7280;
}

.ask-rcs-hint kbd {
  font: inherit;
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #9ca3af;
}

.ask-rcs-send {
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px 11px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #e91e8c 0%, #7c3aed 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(233, 30, 140, 0.35);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
  flex-shrink: 0;
}

.ask-rcs-send svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s;
}

.ask-rcs-send:hover {
  filter: brightness(1.1);
  box-shadow: 0 10px 30px rgba(233, 30, 140, 0.5);
}

.ask-rcs-send:hover svg {
  transform: translateX(3px);
}

.ask-rcs-send:active {
  transform: scale(0.97);
}

.ask-rcs-send:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 3px;
}

/* Example-question chips */
.ask-rcs-chips {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.ask-rcs-chip {
  font: inherit;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #d1d5db;
  font-size: 14px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.ask-rcs-chip:hover {
  background: rgba(233, 30, 140, 0.12);
  border-color: rgba(233, 30, 140, 0.5);
  color: #fff;
}

.ask-rcs-chip:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
}

/* Fallback line under the box */
.ask-rcs-alt {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  color: #9ca3af;
}

.ask-rcs-alt a {
  color: #e91e8c;
  font-weight: 500;
  text-decoration: none;
}

.ask-rcs-alt a:hover {
  text-decoration: underline;
}

/* Empty-submit nudge */
.ask-rcs-card.is-shake {
  animation: ask-rcs-shake 0.4s ease-in-out;
}

@keyframes ask-rcs-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Responsive */
@media (max-width: 480px) {
  .ask-rcs-box {
    padding: 14px 14px 12px;
  }

  .ask-rcs-top {
    flex-wrap: wrap;
  }

  .ask-rcs-input {
    font-size: 16px; /* prevents iOS zoom on focus */
  }

  .ask-rcs-hint {
    display: none;
  }

  .ask-rcs-send {
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ask-rcs-border,
  .ask-rcs-sparkle,
  .ask-rcs-dot,
  .ask-rcs-card.is-shake {
    animation: none;
  }

  .ask-rcs-border {
    background: linear-gradient(135deg, #e91e8c, #7c3aed, #22d3ee);
  }

  .ask-rcs-send,
  .ask-rcs-send svg {
    transition: none;
  }
}
