/* ==========================================================================
   Help Modal/Form Styles
   ========================================================================== */

.help-modal {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 48px);
  background-color: var(--color-white);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  pointer-events: none;
  display: none;
}

.help-modal.active {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Modal Header */
.help-modal-header {
  padding: var(--space-20);
  border-bottom: 1px solid var(--color-border-darkest);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.help-modal-title {
  font-family: "DM Sans", sans-serif;
  font-weight: var(--font-light);
  font-size: var(--fs-h2);
  margin: 0;
  color: var(--color-black);
}

.help-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-text-secondary);
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.help-modal-close:hover {
  background-color: var(--color-bg-secondary);
}

.help-modal-close svg {
  width: 20px;
  height: 20px;
}

/* Modal Body */
.help-modal-body {
  padding: var(--space-20);
}

.help-modal-intro {
  font-family: "DM Sans", sans-serif;
  font-size: var(--fs-body);
  color: var(--color-gray-dark);
  margin: 0 0 var(--space-20) 0;
  line-height: 1.5;
}

/* Form Elements */
.help-form {
  display: flex;
  flex-direction: column;
}

.help-form-group {
  margin-bottom: var(--space-10);
}

.help-form-label {
  display: block;
  font-family: "DM Sans", sans-serif;
  font-weight: var(--font-light);
  font-size: var(--fs-body);
  color: var(--color-black);
  margin-bottom: 8px;
}

.help-form-input,
.help-form-textarea {
  width: 100%;
  padding: var(--space-10);
  border: 1px solid var(--color-border-light);
  border-radius: var(--border-radius-sm);
  font-family: "DM Sans", sans-serif;
  font-size: var(--fs-body);
  font-weight: var(--font-light);
  background-color: var(--color-white);
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.help-form-input:focus,
.help-form-textarea:focus {
  outline: none;
  border-color: var(--color-black);
}

.help-form-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

/* Form Footer */
.help-form-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--color-border-darkest);
}

.help-form-note {
  font-family: "DM Sans", sans-serif;
  font-size: var(--fs-small);
  color: var(--color-gray-light);
  margin: 8px 0 0 0;
}

/* Submit Button */
.help-form-submit {
  padding: var(--space-10) 24px 8px 24px;
  border-radius: var(--border-radius-sm);
  font-family: "DM Sans", sans-serif;
  font-size: var(--fs-body);
  font-weight: var(--font-medium);
  cursor: pointer;
  background: var(--color-black);
  color: var(--color-white);
  border: none;
  transition: all 0.2s ease;
  min-height: var(--touch-target-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.help-form-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.help-form-submit:active {
  transform: translateY(0);
}

.help-form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.help-form-submit.loading {
  position: relative;
  color: transparent;
}

.help-form-submit.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid var(--color-white);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* Success/Error Messages */
.help-message {
  padding: var(--space-10);
  border-radius: var(--border-radius-sm);
  margin-bottom: var(--space-10);
  font-family: "DM Sans", sans-serif;
  font-size: var(--fs-body);
  display: none;
}

.help-message.active {
  display: block;
}

.help-message.success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.help-message.error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .help-modal {
    bottom: 80px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
  }

  .help-modal-header {
    padding: var(--space-16);
  }

  .help-modal-body {
    padding: var(--space-16);
  }

  .help-modal-title {
    font-size: var(--fs-subhead);
  }

  .help-form-submit {
    width: 100%;
  }
}