/* ==========================================================================
   CONSULTATION MODAL — GO4AI Enterprise AI
   Shared modal CSS for all pages
   ========================================================================== */

/* ── Overlay ─────────────────────────────────────────────────────────────── */
.consult-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 12, 10, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.26s ease, visibility 0.26s ease;
}
.consult-overlay.is--open {
  opacity: 1;
  visibility: visible;
}

/* ── Dialog Box ──────────────────────────────────────────────────────────── */
.consult-dialog {
  position: relative;
  background: #0d1f19;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 16px;
  width: 100%;
  max-width: 820px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.08),
    0 24px 60px rgba(0, 0, 0, 0.65),
    0 0 80px rgba(8, 144, 108, 0.08);
  transform: scale(0.96) translateY(12px);
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.26s ease;
  opacity: 0;

  /* Scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: rgba(52, 211, 153, 0.25) transparent;
}
.consult-dialog::-webkit-scrollbar { width: 4px; }
.consult-dialog::-webkit-scrollbar-track { background: transparent; }
.consult-dialog::-webkit-scrollbar-thumb { background: rgba(52, 211, 153, 0.25); border-radius: 2px; }

.consult-overlay.is--open .consult-dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Technical grid background */
.consult-dialog::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background-image:
    linear-gradient(rgba(52, 211, 153, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 211, 153, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── Dialog Inner Content ────────────────────────────────────────────────── */
.consult-dialog__inner {
  position: relative;
  z-index: 1;
  padding: 40px 44px 44px;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.consult-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.consult-dialog__head-text {
  flex: 1;
}
.consult-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Azeret Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #34d399;
  margin-bottom: 10px;
}
.consult-eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: consultDot 1.8s ease-in-out infinite;
}
@keyframes consultDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px #34d399; }
  50%       { opacity: 0.5; box-shadow: 0 0 3px #34d399; }
}
.consult-title {
  font-size: 1.625rem;
  font-weight: 700;
  color: #f0faf6;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
}
.consult-desc {
  font-size: 0.9375rem;
  color: rgba(232, 245, 240, 0.65);
  line-height: 1.6;
  margin: 0;
}

/* Close button */
.consult-close {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(52, 211, 153, 0.07);
  border: 1px solid rgba(52, 211, 153, 0.18);
  color: rgba(232, 245, 240, 0.7);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  margin-top: 4px;
}
.consult-close:hover {
  background: rgba(52, 211, 153, 0.15);
  color: #f0faf6;
  transform: scale(1.05);
}
.consult-close:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: 2px;
}

/* ── Separator ───────────────────────────────────────────────────────────── */
.consult-sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.25) 30%, rgba(52, 211, 153, 0.25) 70%, transparent);
  margin-bottom: 28px;
  border: none;
}

/* ── Form Grid ───────────────────────────────────────────────────────────── */
.consult-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.consult-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.consult-row--full {
  grid-template-columns: 1fr;
}

/* ── Field ───────────────────────────────────────────────────────────────── */
.consult-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.consult-label {
  font-family: 'Azeret Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(52, 211, 153, 0.85);
}
.consult-label .req {
  color: #f87171;
  margin-left: 2px;
}
.consult-input,
.consult-select,
.consult-textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 8px;
  color: #f0faf6;
  font-size: 0.9375rem;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.consult-input,
.consult-select {
  height: 46px;
  padding: 0 14px;
}
.consult-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(52,211,153,0.6)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.consult-select option {
  background: #0d1f19;
  color: #f0faf6;
}
.consult-textarea {
  padding: 12px 14px;
  resize: vertical;
  min-height: 96px;
  line-height: 1.55;
}
.consult-input::placeholder,
.consult-textarea::placeholder {
  color: rgba(232, 245, 240, 0.28);
}
.consult-input:focus,
.consult-select:focus,
.consult-textarea:focus {
  outline: none;
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.10);
  background: rgba(255, 255, 255, 0.06);
}
.consult-input.is--error,
.consult-select.is--error,
.consult-textarea.is--error {
  border-color: rgba(248, 113, 113, 0.6) !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.10) !important;
}

/* ── Checkboxes (multi-select interest) ──────────────────────────────────── */
.consult-checkgroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(52, 211, 153, 0.15);
  border-radius: 8px;
  padding: 12px 14px;
}
.consult-checkgroup.is--error {
  border-color: rgba(248, 113, 113, 0.55) !important;
}
.consult-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9125rem;
  color: rgba(232, 245, 240, 0.8);
  transition: color 0.18s ease;
  line-height: 1.4;
}
.consult-check-item:hover {
  color: #f0faf6;
}
.consult-check-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  border: 1.5px solid rgba(52, 211, 153, 0.35);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  position: relative;
}
.consult-check-item input[type="checkbox"]:checked {
  background: #08906c;
  border-color: #34d399;
}
.consult-check-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.consult-check-item input[type="checkbox"]:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: 2px;
}

/* ── Privacy Consent ─────────────────────────────────────────────────────── */
.consult-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(52, 211, 153, 0.04);
  border: 1px solid rgba(52, 211, 153, 0.14);
  border-radius: 8px;
  padding: 14px 16px;
}
.consult-consent.is--error {
  border-color: rgba(248, 113, 113, 0.55) !important;
  background: rgba(248, 113, 113, 0.04) !important;
}
.consult-consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1.5px solid rgba(52, 211, 153, 0.4);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  margin-top: 1px;
  transition: border-color 0.18s, background 0.18s;
  position: relative;
}
.consult-consent input[type="checkbox"]:checked {
  background: #08906c;
  border-color: #34d399;
}
.consult-consent input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.consult-consent input[type="checkbox"]:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: 2px;
}
.consult-consent-label {
  font-size: 0.875rem;
  color: rgba(232, 245, 240, 0.65);
  line-height: 1.55;
  cursor: pointer;
  user-select: none;
}
.consult-consent-label a {
  color: #34d399;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color 0.18s;
}
.consult-consent-label a:hover {
  color: #6ee7b7;
}

/* ── Error Text ──────────────────────────────────────────────────────────── */
.consult-error {
  font-family: 'Azeret Mono', monospace;
  font-size: 0.6875rem;
  color: #f87171;
  line-height: 1.4;
  display: none;
  margin-top: 2px;
}
.consult-error.is--visible {
  display: block;
}

/* ── Submit Footer ───────────────────────────────────────────────────────── */
.consult-footer {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.consult-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  background: #c93b2b;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.22s ease, transform 0.18s ease, box-shadow 0.22s ease;
  box-shadow: 0 4px 14px rgba(201, 59, 43, 0.3);
}
.consult-submit:hover:not(:disabled) {
  background: #d84534;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201, 59, 43, 0.45);
}
.consult-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.consult-submit:focus-visible {
  outline: 2px solid #f87171;
  outline-offset: 3px;
}
.consult-submit-note {
  font-family: 'Azeret Mono', monospace;
  font-size: 0.6875rem;
  color: rgba(232, 245, 240, 0.38);
  text-align: center;
  line-height: 1.5;
}

/* ── Success State ───────────────────────────────────────────────────────── */
.consult-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 20px 20px;
  gap: 16px;
}
.consult-success.is--visible {
  display: flex;
}
.consult-success__icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(8, 144, 108, 0.18);
  border: 1.5px solid rgba(52, 211, 153, 0.4);
  display: grid;
  place-items: center;
  color: #34d399;
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.2);
}
.consult-success__title {
  font-size: 1.375rem;
  font-weight: 700;
  color: #f0faf6;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0;
}
.consult-success__desc {
  font-size: 0.9375rem;
  color: rgba(232, 245, 240, 0.6);
  line-height: 1.6;
  margin: 0;
  max-width: 480px;
}
.consult-success__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 32px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 8px;
  color: #34d399;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  margin-top: 8px;
}
.consult-success__close:hover {
  background: rgba(52, 211, 153, 0.18);
  color: #f0faf6;
  transform: translateY(-1px);
}
.consult-success__close:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: 2px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .consult-dialog__inner {
    padding: 24px 20px 28px;
  }
  .consult-row {
    grid-template-columns: 1fr;
  }
  .consult-title {
    font-size: 1.25rem;
  }
  .consult-desc {
    font-size: 0.875rem;
  }
  .consult-submit {
    height: 48px;
    font-size: 0.9375rem;
  }
}

@media (max-width: 480px) {
  .consult-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .consult-dialog {
    border-radius: 16px 16px 0 0;
    max-height: 92dvh;
  }
}

/* Body scroll lock */
body.consult-open {
  overflow: hidden;
}
