/* =============================================
   NexSys Tech — Contact Popup CSS
   Add to: /css/contact.css
   ============================================= */

/* ── OVERLAY ── */

.nx-contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.nx-contact-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ── MODAL ── */

.nx-contact-modal {
  width: 100%;
  max-width: 960px;
  display: grid;
  grid-template-columns: 300px 1fr;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #3b4e71;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  transform: translateY(16px);
  transition: transform 0.25s ease;
}

.nx-contact-overlay.open .nx-contact-modal {
  transform: translateY(0);
}

/* ── LEFT PANEL ── */

.nx-contact-left {
  background: #080D1A;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-right: 1px solid #1A2540;
}

/* dot grid */
.nx-contact-left::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

/* ambient glow */
.nx-contact-left::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(117, 141, 188, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.nx-contact-left-top,
.nx-contact-left-bottom {
  position: relative;
  z-index: 1;
}

.nx-contact-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #4A5A7A;
  margin-bottom: 14px;
}

.nx-contact-eyebrow-line {
  display: inline-block;
  width: 16px;
  height: 1px;
  background: #4A5A7A;
  flex-shrink: 0;
}

.nx-contact-title {
  font-size: 18px;
  font-weight: 700;
  color: #E2E8F0;
  line-height: 1.25;
  letter-spacing: -0.4px;
  margin-bottom: 10px;
}

.nx-contact-sub {
  font-size: 12px;
  color: #5A6A8A;
  line-height: 1.7;
}

.nx-contact-divider {
  border: none;
  border-top: 1px solid #131D2E;
  margin: 1.5rem 0;
}

.nx-contact-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nx-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nx-contact-item-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid #2E4560;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nx-contact-item-icon i {
  font-size: 13px;
  color: #7A8BAB;
}

.nx-contact-item-text {
  font-size: 11px;
  color: #6A7A9A;
  line-height: 1.4;
}

.nx-contact-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  margin-top: 1.5rem;
  background: rgba(34, 197, 94, 0.05);
  border: 1px solid rgba(34, 197, 94, 0.12);
  border-radius: 999px;
  font-size: 10px;
  color: rgba(34, 197, 94, 0.6);
}

.nx-contact-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: nxContactPulse 2s infinite;
}

@keyframes nxContactPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

/* ── RIGHT PANEL ── */

.nx-contact-right {
  background: #0B1220;
  padding: 2.5rem 2.25rem;
  position: relative;
}

.nx-contact-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #1E2D48;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #2E3D55;
  transition: all 0.15s;
}

.nx-contact-close:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #6E7A96;
  border-color: #1A2540;
}

.nx-contact-close i {
  font-size: 13px;
}

.nx-contact-form-heading {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4A5A7A;
  margin-bottom: 1.2rem;
}

.nx-contact-form-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nx-contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.nx-contact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nx-contact-field label {
  font-size: 11.5px;
  font-weight: 600;
  color: #C8D8F0;
  letter-spacing: 0.01em;
}

.nx-contact-req {
  color: #F87171;
  font-size: 10px;
}

.nx-contact-field input,
.nx-contact-field textarea {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-family: inherit;
  color: #FFFFFF;
}

.nx-contact-field input::placeholder,
.nx-contact-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.nx-contact-field input:focus,
.nx-contact-field textarea:focus {
  border-color: #3A5A8A;
  background: rgba(255, 255, 255, 0.08);
}

.nx-contact-field textarea {
  resize: none;
  height: 100px;
}

.nx-contact-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
}

.nx-contact-privacy {
  font-size: 10px;
  color: #4A5A7A;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nx-contact-privacy i {
  font-size: 11px;
}

.nx-contact-submit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  background: rgba(139, 164, 212, 0.1);
  border: 1px solid rgba(139, 164, 212, 0.45);
  border-radius: 999px;
  color: #A8C0DC;
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.nx-contact-submit:hover {
  background: rgba(139, 164, 212, 0.2);
  border-color: rgba(139, 164, 212, 0.65);
  color: #C8D8F0;
}

.nx-contact-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nx-contact-submit i {
  font-size: 13px;
  transition: transform 0.2s;
}

.nx-contact-submit:hover i {
  transform: translateX(3px);
}

@keyframes nxSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.nx-contact-spinner {
  animation: nxSpin 0.8s linear infinite;
}

.nx-contact-error {
  font-size: 11px;
  color: #F87171;
  margin-top: 10px;
  text-align: right;
}

/* ── SUCCESS STATE ── */

.nx-contact-success {
  text-align: center;
  padding: 3rem 1rem;
}

.nx-contact-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.07);
  border: 1px solid rgba(34, 197, 94, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.nx-contact-success-icon i {
  font-size: 22px;
  color: #22c55e;
}

.nx-contact-success h3 {
  font-size: 16px;
  font-weight: 600;
  color: #E2E8F0;
  margin: 0 0 6px;
}

.nx-contact-success p {
  font-size: 12px;
  color: #3A4A6A;
  line-height: 1.65;
}

/* ── MOBILE ── */

@media (max-width: 600px) {
  .nx-contact-modal {
    grid-template-columns: 1fr;
    max-width: 100%;
    border-radius: 16px;
  }

  .nx-contact-left {
    padding: 1.25rem 1.5rem;
    border-right: none;
    border-bottom: 1px solid #1A2540;
  }

  .nx-contact-title {
    font-size: 16px;
    margin-bottom: 6px;
  }

  .nx-contact-sub {
    display: none;
  }

  .nx-contact-eyebrow {
    margin-bottom: 10px;
  }

  /* Hide full items, show only status pill */
  .nx-contact-left-bottom {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 1rem;
    flex-wrap: wrap;
  }

  .nx-contact-divider {
    display: none;
  }

  .nx-contact-items {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
  }

  .nx-contact-item-icon {
    display: none;
  }

  .nx-contact-item-text {
    font-size: 10px;
    color: #5A6A8A;
    white-space: nowrap;
  }

  .nx-contact-item::before {
    content: "·";
    color: #3A4A6A;
    font-size: 14px;
  }

  .nx-contact-status {
    margin-top: 0;
    font-size: 9.5px;
    padding: 4px 10px;
  }

  .nx-contact-right {
    padding: 1.25rem 1.5rem;
  }

  .nx-contact-row {
    grid-template-columns: 1fr;
  }

  .nx-contact-form-fields {
    gap: 18px;
  }
}

/* ── PHONE FIELD WITH COUNTRY CODE ── */

.nx-contact-phone-wrap {
  display: flex;
  gap: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 0.18s;
}

.nx-contact-phone-wrap:focus-within {
  border-color: #3A5A8A;
}

.nx-contact-country-code {
  display: flex;
  align-items: center;
  padding: 9px 10px 9px 12px;
  font-size: 12.5px;
  font-family: inherit;
  color: #8BA4D4;
  background: rgba(117, 141, 188, 0.06);
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  white-space: nowrap;
  outline: none;
  gap: 4px;
  flex-shrink: 0;
  -webkit-appearance: none;
  appearance: none;
}

.nx-contact-country-code:hover {
  background: rgba(117, 141, 188, 0.1);
}

/* Style the select options */
.nx-contact-country-code option {
  background: #0B1220;
  color: #C8D5E8;
  font-size: 13px;
}

.nx-contact-phone-wrap input {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  flex: 1;
  min-width: 0;
}

.nx-contact-phone-wrap input:focus {
  border: none !important;
  background: transparent !important;
}