.support-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 360;
  max-width: calc(100vw - 24px);
}

.support-widget.open .support-widget-fab {
  display: none;
}

.support-widget-panel {
  width: min(380px, calc(100vw - 28px));
  max-height: min(620px, calc(100vh - 110px));
  background: #fff;
  border: 1px solid #e2ece8;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(13, 31, 26, 0.16);
  overflow: hidden;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
}

.support-widget-panel[hidden] {
  display: none !important;
}

.support-widget-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0a7c5c;
  color: #fff;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  padding: 0;
  box-shadow: 0 18px 36px rgba(10, 124, 92, 0.26);
}

.support-widget-fab:hover {
  background: #0e9b72;
}

.support-widget-fab-icon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.support-widget-fab-icon svg,
.support-widget-close svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
}

.support-widget-fab-copy {
  display: none;
}

.support-widget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #edf5f2;
  background: linear-gradient(180deg, rgba(230, 244, 239, 0.72), rgba(255, 255, 255, 0.96));
}

.support-widget-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0d1f1a;
}

.support-widget-sub {
  font-size: 0.78rem;
  color: #6b8a7e;
  margin-top: 4px;
}

.support-widget-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #6b8a7e;
}

.support-widget-close:hover {
  background: rgba(13, 31, 26, 0.05);
  color: #0d1f1a;
}

.support-widget-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.support-widget-note,
.support-widget-response,
.support-widget-form {
  border: 1px solid #e2ece8;
  border-radius: 14px;
  background: #f7faf8;
}

.support-widget-note {
  padding: 12px 14px;
  font-size: 0.8rem;
  color: #3d5a50;
  line-height: 1.55;
}

.support-widget-topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.support-widget-topic {
  border: 1px solid #d8e8e2;
  background: #fff;
  color: #1a2e27;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  transition: all 0.18s ease;
}

.support-widget-topic:hover {
  border-color: #0a7c5c;
  color: #0a7c5c;
  background: #e6f4ef;
}

.support-widget-response {
  padding: 14px;
}

.support-widget-response-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: #0d1f1a;
}

.support-widget-response-copy {
  font-size: 0.8rem;
  color: #3d5a50;
  line-height: 1.6;
  margin-top: 8px;
}

.support-widget-response-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(10, 124, 92, 0.12);
  color: #0a7c5c;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 10px;
}

.support-widget-form {
  padding: 12px;
  margin: 12px 18px;
  flex-shrink: 0;
}

.support-widget-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: #1a2e27;
  margin-bottom: 8px;
}

.support-widget-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.support-widget-input {
  width: 100%;
  border: 1px solid #d8e8e2;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: #1a2e27;
  outline: none;
}

.support-widget-input:focus {
  border-color: #0a7c5c;
  box-shadow: 0 0 0 3px rgba(10, 124, 92, 0.1);
}

.support-widget-hint {
  font-size: 0.72rem;
  color: #6b8a7e;
  line-height: 1.5;
  margin-top: 10px;
}

.support-widget-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 18px 18px;
  flex-wrap: wrap;
  flex-shrink: 0;
  background: #fff;
}

.support-widget .crud-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid #d8e8e2;
  background: #fff;
  color: #1a2e27;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.support-widget .crud-btn.primary {
  background: #0a7c5c;
  border-color: #0a7c5c;
  color: #fff;
}

.support-widget .crud-btn:hover {
  border-color: #0a7c5c;
  color: #0a7c5c;
  background: #e6f4ef;
}

.support-widget .crud-btn.primary:hover {
  background: #0e9b72;
  border-color: #0e9b72;
  color: #fff;
}

.support-widget-actions .crud-btn.disabled,
.support-widget-actions .crud-btn[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

@media (max-width: 700px) {
  .support-widget {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    max-width: none;
  }

  .support-widget-panel {
    width: 100%;
    max-height: calc(100vh - 92px - env(safe-area-inset-bottom, 0px));
    margin-bottom: 10px;
    border-radius: 16px;
  }

  .support-widget-fab {
    width: 54px;
    height: 54px;
    margin-left: auto;
  }

  .support-widget-fab-icon {
    width: 100%;
    height: 100%;
  }

  .support-widget-head {
    padding: 15px 15px 12px;
  }

  .support-widget-body {
    padding: 14px 15px;
    gap: 12px;
  }

  .support-widget-form {
    margin: 0 15px 10px;
    padding: 10px;
    border-radius: 12px;
  }

  .support-widget-actions {
    padding: 0 15px 15px;
    flex-direction: column;
    align-items: stretch;
  }

  .support-widget-input-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .support-widget-label {
    font-size: 0.72rem;
    margin-bottom: 6px;
  }

  .support-widget-input {
    padding: 9px 11px;
    font-size: 0.78rem;
  }

  .support-widget-hint {
    font-size: 0.68rem;
    margin-top: 8px;
  }

  .support-widget-actions .crud-btn,
  .support-widget-input-row .crud-btn {
    width: 100%;
    justify-content: center;
    min-height: 34px;
    padding: 8px 12px;
    font-size: 0.76rem;
  }
}

@media (max-width: 480px) {
  .support-widget {
    right: 10px;
    left: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .support-widget-panel {
    border-radius: 14px;
  }

  .support-widget-title {
    font-size: 0.94rem;
  }

  .support-widget-sub,
  .support-widget-note,
  .support-widget-response-copy,
  .support-widget-hint {
    font-size: 0.76rem;
  }

  .support-widget-form {
    padding: 9px;
    margin: 0 12px 8px;
  }

  .support-widget-label {
    display: none;
  }

  .support-widget-input-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }

  .support-widget-input {
    min-width: 0;
    padding: 8px 10px;
    font-size: 0.76rem;
  }

  .support-widget-input-row .crud-btn {
    width: auto;
    min-width: 68px;
    padding: 8px 10px;
    min-height: 34px;
    flex-shrink: 0;
  }

  .support-widget-topic {
    width: 100%;
    justify-content: center;
    text-align: center;
    border-radius: 12px;
  }

  .support-widget-body {
    padding-bottom: 12px;
  }
}
