/* AfroLex Connect — modern generated forms */

.afrolex-connect-form-wrap {
  --al-primary: #1a7f4b;
  --al-primary-dark: #15663c;
  --al-primary-soft: #e6f4ea;
  --al-border: #e5e7eb;
  --al-text: #111827;
  --al-muted: #6b7280;
  --al-radius: 14px;
  --al-shadow: 0 12px 40px rgba(17, 24, 39, 0.08);

  max-width: 620px;
  margin: 2rem auto;
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
}

.afrolex-connect-form-wrap.afrolex-form-width-wide {
  max-width: 920px;
}

.afrolex-connect-form-wrap.afrolex-form-width-full {
  max-width: none;
  width: 100%;
}

.afrolex-form-card {
  background: linear-gradient(180deg, #ffffff 0%, #fafdfb 100%);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius);
  box-shadow: var(--al-shadow);
  overflow: hidden;
}

.afrolex-form-header {
  padding: 1.5rem 1.75rem 0.5rem;
  border-bottom: 1px solid #f0f2f1;
  background: linear-gradient(135deg, rgba(26, 127, 75, 0.06) 0%, transparent 60%);
}

.afrolex-form-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--al-primary);
  background: var(--al-primary-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.afrolex-form-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--al-text);
  line-height: 1.3;
}

.afrolex-form-desc {
  margin: 0 0 0.5rem;
  color: var(--al-muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.afrolex-connect-form {
  padding: 1.5rem 1.75rem 1.75rem;
}

.afrolex-form-fields {
  display: grid;
  gap: 1.15rem;
}

.afrolex-form-fields--2col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem 1.25rem;
}

.afrolex-form-fields--2col .afrolex-form-field--full {
  grid-column: 1 / -1;
}

.afrolex-form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
}

.afrolex-required {
  color: #dc2626;
  margin-left: 3px;
}

.afrolex-form-field--lex .afrolex-form-input,
.afrolex-form-field--lex textarea {
  border-color: #b7dfc4;
  background: #fcfffd;
}

.afrolex-form-input,
.afrolex-connect-form textarea,
.afrolex-connect-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--al-border);
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--al-text);
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.afrolex-select-wrap {
  position: relative;
}

.afrolex-form-input:focus,
.afrolex-connect-form textarea:focus,
.afrolex-connect-form select:focus {
  outline: none;
  border-color: var(--al-primary);
  box-shadow: 0 0 0 4px rgba(26, 127, 75, 0.12);
}

.afrolex-hp {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  opacity: 0;
}

.afrolex-form-actions {
  margin-top: 1.5rem;
}

.afrolex-form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  background: linear-gradient(135deg, var(--al-primary) 0%, var(--al-primary-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0 24px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(26, 127, 75, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.afrolex-form-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(26, 127, 75, 0.4);
}

.afrolex-form-submit:active {
  transform: translateY(0);
}

.afrolex-form-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.afrolex-form-message {
  margin-top: 1rem;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
}

.afrolex-form-message.is-success {
  background: var(--al-primary-soft);
  color: #0d5229;
  border: 1px solid #b7dfc4;
}

.afrolex-form-message.is-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.afrolex-form-powered {
  margin-top: 0.85rem;
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: center;
}

.afrolex-form-error {
  color: #991b1b;
  padding: 1rem;
  background: #fef2f2;
  border-radius: 8px;
}

@media (max-width: 640px) {
  .afrolex-form-fields--2col {
    grid-template-columns: 1fr;
  }

  .afrolex-form-fields--2col .afrolex-form-field--full,
  .afrolex-form-fields--2col .afrolex-form-field--half {
    grid-column: 1;
  }
}

@media (max-width: 480px) {
  .afrolex-connect-form-wrap {
    margin: 1rem auto;
  }

  .afrolex-form-header,
  .afrolex-connect-form {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }
}
