/* Q4L Forms — Frontend styles, matching the dark theme */

.q4l-form-wrap {
  width: 100%;
}

/* Honeypot — visible to bots, invisible to humans */
.q4l-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  tabindex: -1;
}

/* Fields */
.q4l-field,
.q4l-field--check {
  margin-bottom: 1.5rem;
}

/* Labels */
.q4l-label {
  display: block;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-gray, #8899aa);
  margin-bottom: 0.5rem;
}

.q4l-req {
  color: var(--c-cyan, #29b6f6);
  margin-left: 2px;
}

/* Inputs, Textarea, Select */
.q4l-input {
  display: block;
  width: 100%;
  background: rgba(13, 26, 39, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--c-white, #f0f4f8);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.q4l-input::placeholder {
  color: rgba(136, 153, 170, 0.5);
}

.q4l-input:focus {
  border-color: var(--c-cyan, #29b6f6);
  box-shadow: 0 0 0 3px rgba(41, 182, 246, 0.12);
}

.q4l-input.is-invalid {
  border-color: #ef4444;
}

.q4l-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Select arrow */
.q4l-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238899aa' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.q4l-select option {
  background: #0d1a27;
  color: #f0f4f8;
}

/* Field error */
.q4l-field-err {
  display: block;
  font-size: 0.8rem;
  color: #ef4444;
  margin-top: 0.375rem;
  min-height: 1.1em;
}

/* Checkbox */
.q4l-field--check .q4l-check-label {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  cursor: pointer;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.9rem;
  color: var(--c-gray, #8899aa);
  line-height: 1.5;
  user-select: none;
}

.q4l-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.q4l-check-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background: rgba(13, 26, 39, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  margin-top: 2px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.q4l-checkbox:checked + .q4l-check-box {
  background: var(--c-cyan, #29b6f6);
  border-color: var(--c-cyan, #29b6f6);
}

.q4l-checkbox:checked + .q4l-check-box::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #080d14;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

.q4l-checkbox:focus + .q4l-check-box {
  box-shadow: 0 0 0 3px rgba(41, 182, 246, 0.2);
}

/* Submit row */
.q4l-submit-row {
  margin-top: 2rem;
}

/* Loading state */
.q4l-form.is-loading .q4l-submit-btn {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Response messages */
.q4l-response {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 4px;
  font-size: 0.95rem;
  line-height: 1.6;
  display: none;
}

.q4l-response:not(:empty) {
  display: block;
}

.q4l-response--success {
  border-left: 3px solid var(--c-cyan, #29b6f6);
  background: rgba(41, 182, 246, 0.08);
  color: var(--c-white, #f0f4f8);
}

.q4l-response--error {
  border-left: 3px solid #ef4444;
  background: rgba(239, 68, 68, 0.08);
  color: var(--c-white, #f0f4f8);
}

/* Misc */
.q4l-form-error {
  color: var(--c-gray, #8899aa);
  font-style: italic;
}
