/* assets/support-search-bar.css
   Purpose: shared search and follow-up input bar styling. */

.support-search-shell {
  margin: 0 auto;
  max-width: 640px;
  width: 100%;
}

.support-search-form,
.ask-page .chat-form.support-search-form,
.chat-form.support-search-form,
.support-followup-search-form {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(11, 12, 14, 0.08);
  display: flex;
  gap: 8px;
  min-height: 56px;
  padding: 5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.support-search-form:focus-within,
.ask-page .chat-form.support-search-form:focus-within,
.chat-form.support-search-form:focus-within,
.support-followup-search-form:focus-within {
  border-color: #7CB1D9;
  box-shadow: 0 8px 24px rgba(124, 177, 217, 0.22);
}

.support-search-input,
.ask-page .chat-form.support-search-form .support-search-input,
.chat-form.support-search-form .support-search-input {
  background: transparent;
  border: 0;
  color: #0b0c0e;
  flex: 1 1 auto;
  font: inherit;
  font-size: 16px;
  min-height: 44px;
  min-width: 0;
  outline: 0;
  padding: 0 0 0 17px;
  width: auto;
}

.support-search-input::placeholder {
  color: #6b7280;
}

.support-tool-button,
.ask-page .chat-form.support-search-form .support-tool-button,
.chat-form.support-search-form .support-tool-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: #4b5563;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font: inherit;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  white-space: nowrap;
}

.support-tool-button:hover,
.ask-page .chat-form.support-search-form .support-tool-button:hover,
.chat-form.support-search-form .support-tool-button:hover {
  background: #f3f4f6;
  color: #0b0c0e;
}

.support-tool-button svg {
  height: 20px;
  width: 20px;
}

.support-photo-button {
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.support-photo-button.support-photo-button-attached,
.ask-page .chat-form.support-search-form .support-photo-button.support-photo-button-attached,
.chat-form.support-search-form .support-photo-button.support-photo-button-attached {
  background: #eef7fc;
  color: #0d527a;
}

.support-photo-button.support-photo-button-loading {
  cursor: progress;
  opacity: 0.7;
}

.support-search-button,
.ask-page .chat-form.support-search-form .support-search-button,
.chat-form.support-search-form .support-search-button,
.ask-page .support-search-form .chat-send.support-search-button {
  align-items: center;
  background: #7CB1D9;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  height: 44px;
  justify-content: center;
  margin: 0;
  padding: 0 26px;
  white-space: nowrap;
  width: auto;
}

.support-search-button:hover,
.ask-page .chat-form.support-search-form .support-search-button:hover,
.chat-form.support-search-form .support-search-button:hover {
  background: #5f9fcf;
}

.support-followup-bar-shell {
  background: #ffffff;
  border-top: 1px solid #edf2f7;
  padding: 12px 16px 16px;
}

.support-followup-search-form,
.ask-page .chat-form.support-search-form {
  border-top: 0;
  margin: 0;
  padding: 5px;
  width: 100%;
}

.chat-shell > .support-followup-search-form,
.ask-page .chat-shell > .chat-form.support-search-form {
  margin: 12px 16px 16px;
  width: auto;
}

.ask-page .chat-shell > .support-auth-status,
.chat-shell > .support-followup-bar-shell + .support-auth-status {
  margin: 8px 0 12px;
  padding: 0 20px;
}

body.ask-page .chat-shell[data-ai-chat] > .support-auth-status.support-auth-status {
  border-top: 0;
  margin: 12px 0 14px;
  padding: 0 22px;
}

.support-search-form .sr-only,
.chat-form.support-search-form .sr-only {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.support-mic-button[hidden] {
  display: none !important;
}

.support-mic-button {
  position: relative;
}

.support-mic-button.support-mic-button-listening,
.support-mic-button[aria-pressed="true"] {
  background: rgba(124, 177, 217, 0.18);
  box-shadow: inset 0 0 0 1px rgba(124, 177, 217, 0.38);
  color: #0d527a;
}

.support-mic-button.support-mic-button-listening::after {
  animation: supportVoicePulse 1.1s ease-in-out infinite;
  border: 1px solid rgba(13, 82, 122, 0.34);
  border-radius: 999px;
  content: "";
  inset: 4px;
  position: absolute;
}

.support-mic-button.support-mic-button-error {
  background: #fff7ed;
  box-shadow: inset 0 0 0 1px #fed7aa;
  color: #9a3412;
}

@keyframes supportVoicePulse {
  0% {
    opacity: 0.35;
    transform: scale(0.92);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0.35;
    transform: scale(0.92);
  }
}

body.support-home .support-search-shell,
.solution-search-shell {
  max-width: none;
}

.solution-search-block .support-search-shell {
  margin: 0;
}

.solution-search-block .support-search-form,
body.support-home .support-search-form {
  min-height: 64px;
  padding: 6px 8px 6px 22px;
}

.solution-search-block .support-search-input,
body.support-home .support-search-input {
  min-height: 50px;
  padding-left: 0;
}

.solution-search-block .support-search-button,
body.support-home .support-search-button {
  height: 50px;
  margin-right: 0;
  padding: 0 28px;
}

/* Photo attachment preview: always below the input bar, never inside the button row. */
.support-photo-attachment-panel,
.support-search-shell .support-photo-attachment-panel,
.support-followup-bar-shell .support-photo-attachment-panel,
.chat-shell .support-photo-attachment-panel {
  align-items: center;
  background: #f8fbfd;
  border: 1px solid #dbe7f1;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(11, 12, 14, 0.04);
  display: flex;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 10px;
  width: 100%;
}

.support-photo-attachment-panel[hidden],
.support-photo-error[hidden] {
  display: none !important;
}

.support-photo-thumb {
  border: 1px solid #dbe7f1;
  border-radius: 12px;
  flex: 0 0 auto;
  height: 46px;
  object-fit: cover;
  width: 46px;
}

.support-photo-preview-meta {
  color: #334155;
  display: grid;
  flex: 1 1 auto;
  font-size: 0.86rem;
  gap: 2px;
  min-width: 0;
}

.support-photo-preview-title {
  font-weight: 700;
}

.support-photo-preview-size {
  color: #64748b;
  font-size: 0.78rem;
}

.support-photo-remove {
  background: transparent;
  border: 0;
  color: #0d527a;
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 7px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.support-photo-error {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  color: #9a3412;
  font-size: 0.84rem;
  font-weight: 600;
  margin-top: 8px;
  padding: 8px 10px;
  width: 100%;
}

.support-search-shell .search-results {
  margin-top: 8px;
}

@media (max-width: 640px) {
  .support-followup-bar-shell {
    padding: 10px;
  }

  .support-search-form,
  .ask-page .chat-form.support-search-form,
  .chat-form.support-search-form,
  .support-followup-search-form,
  .solution-search-block .support-search-form,
  body.support-home .support-search-form {
    border-radius: 28px;
    flex-wrap: wrap;
    padding: 10px;
  }

  .support-search-input,
  .ask-page .chat-form.support-search-form .support-search-input,
  .chat-form.support-search-form .support-search-input,
  .solution-search-block .support-search-input,
  body.support-home .support-search-input {
    flex-basis: 100%;
    min-height: 44px;
    padding: 0 8px;
  }

  .support-photo-button,
  .ask-page .chat-form.support-search-form .support-photo-button,
  .chat-form.support-search-form .support-photo-button {
    flex: 1 1 auto;
  }

  .support-search-button,
  .ask-page .chat-form.support-search-form .support-search-button,
  .chat-form.support-search-form .support-search-button,
  .solution-search-block .support-search-button,
  body.support-home .support-search-button {
    flex: 1.4 1 auto;
    height: 44px;
    margin-right: 0;
    padding: 0 16px;
    width: auto;
  }

  .support-photo-attachment-panel {
    border-radius: 16px;
  }
}
