/* ============================================================
   RFQ POPUP – High-Conversion Quote Request System
   UAVCHIP · v20260510c · FINAL UI
   Zero-scroll on 1366px · Deep Blue Industrial Tech
   ============================================================ */

/* ===== Overlay ===== */
.rfq-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(4, 8, 24, 0.76);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  justify-content: center; align-items: center;
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.rfq-overlay.active  { display: flex; opacity: 1; }
.rfq-overlay.closing  { opacity: 0; }

/* ===== Modal Container ===== */
.rfq-modal {
  position: relative;
  width: 92vw; max-width: 800px; max-height: 88vh;
  background: linear-gradient(168deg, #080c1a 0%, #0d1228 50%, #070b18 100%);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 35% 65%;
  box-shadow:
    0 0 80px rgba(56, 189, 248, 0.07),
    0 20px 60px rgba(0, 0, 0, 0.65);
  transform: scale(0.94) translateY(24px);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0;
}
.rfq-overlay.active .rfq-modal {
  transform: scale(1) translateY(0); opacity: 1;
}

/* ===== Left Panel (35%) ===== */
.rfq-visual {
  position: relative;
  background: linear-gradient(162deg, #0a1028 0%, #0d0d22 60%, #060818 100%);
  padding: 28px 22px 22px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  overflow: hidden;
}

/* Subtle grid bg */
.rfq-tech-grid {
  position: absolute; inset: 0; z-index: 0;
  opacity: 0.05;
  background-image:
    linear-gradient(rgba(56,189,248,0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,0.6) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}

/* Glow blob */
.rfq-visual::before {
  content: '';
  position: absolute;
  top: 30%; left: 50%;
  width: 140%; height: 100%;
  background: radial-gradient(ellipse at 50% 40%, rgba(56,189,248,0.09) 0%, transparent 65%);
  animation: rfqGlow 7s ease-in-out infinite alternate;
  pointer-events: none; z-index: 0;
}
@keyframes rfqGlow {
  0%   { transform: translate(-50%, -40%) scale(1); opacity: 0.6; }
  100% { transform: translate(-48%, -42%) scale(1.06); opacity: 1; }
}

/* Logo */
.rfq-logo {
  position: relative; z-index: 1;
  width: 100%; max-width: 140px;
  height: auto; object-fit: contain;
  margin-bottom: 18px;
  filter: drop-shadow(0 0 12px rgba(56,189,248,0.18));
}

/* Center icon */
.rfq-visual-icon {
  position: relative; z-index: 1;
  width: 56px; height: 56px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(56,189,248,0.12), rgba(139,92,246,0.10));
  border: 1px solid rgba(56,189,248,0.22);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 24px rgba(56,189,248,0.08);
}
.rfq-visual-icon svg {
  width: 28px; height: 28px;
  stroke: #38bdf8; fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

/* Text in left panel */
.rfq-visual h3 {
  position: relative; z-index: 1;
  color: #eef2ff; font-size: 14.5px; font-weight: 700;
  text-align: center; line-height: 1.45;
  margin: 0 0 6px; letter-spacing: -0.01em;
}
.rfq-visual-sub {
  position: relative; z-index: 1;
  color: rgba(148,163,220,0.65); font-size: 11.5px;
  text-align: center; line-height: 1.7;
  margin: 0 0 18px;
}

/* Badges in left panel */
.rfq-visual-badges {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 5px;
  width: 100%;
}
.rfq-visual-badges .rfq-badge {
  font-size: 10px; padding: 3px 8px;
  background: rgba(56,189,248,0.05);
  border: 1px solid rgba(56,189,248,0.10);
  border-radius: 6px; color: rgba(148,163,220,0.75);
}
.rfq-visual-badges .rfq-badge .check { color: #4ade80; font-size: 11px; }

/* ===== Right Panel (65%) ===== */
.rfq-form-panel {
  position: relative;
  padding: 22px 24px 18px;
  display: flex; flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(56,189,248,0.2) transparent;
}
.rfq-form-panel::-webkit-scrollbar { width: 4px; }
.rfq-form-panel::-webkit-scrollbar-thumb {
  background: rgba(56,189,248,0.22); border-radius: 4px;
}

/* Close button – glassmorphism circle */
.rfq-close {
  position: absolute; top: 12px; right: 14px;
  width: 34px; height: 34px;
  border: 1px solid rgba(148,163,220,0.12);
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.3s, transform 0.25s;
  z-index: 5;
}
.rfq-close svg { width: 15px; height: 15px; stroke: #94a3dc; stroke-width: 2; }
.rfq-close:hover {
  background: rgba(248,113,113,0.12);
  border-color: rgba(248,113,113,0.35);
  box-shadow: 0 0 16px rgba(248,113,113,0.15);
  transform: rotate(90deg);
}

/* Heading */
.rfq-heading {
  font-size: 18px; font-weight: 700;
  color: #eef2ff; margin: 0 0 2px;
  letter-spacing: -0.02em; line-height: 1.3;
}
.rfq-subheading {
  font-size: 12px; color: rgba(148,163,220,0.6);
  margin: 0 0 16px; line-height: 1.5;
}

/* Form rows – 2 col */
.rfq-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}

/* Fields */
.rfq-field { margin-bottom: 10px; }
.rfq-field label {
  display: block;
  font-size: 11px; font-weight: 500;
  color: rgba(148,163,220,0.72);
  margin-bottom: 4px; letter-spacing: 0.02em;
}
.rfq-field input,
.rfq-field textarea {
  width: 100%;
  padding: 8px 12px;
  background: rgba(15,23,42,0.65);
  border: 1px solid rgba(56,189,248,0.13);
  border-radius: 9px;
  color: #e2e8f0; font-size: 13px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none; box-sizing: border-box;
}
.rfq-field input:focus,
.rfq-field textarea:focus {
  border-color: rgba(56,189,248,0.45);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.07);
}
.rfq-field input::placeholder,
.rfq-field textarea::placeholder {
  color: rgba(148,163,220,0.30);
}
.rfq-field textarea {
  resize: vertical; min-height: 56px; line-height: 1.5;
}

/* File Upload */
.rfq-upload {
  position: relative;
  display: flex; align-items: center; gap: 9px;
  padding: 8px 12px;
  background: rgba(15,23,42,0.65);
  border: 1px dashed rgba(56,189,248,0.20);
  border-radius: 9px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.rfq-upload:hover {
  border-color: rgba(56,189,248,0.45);
  background: rgba(15,23,42,0.85);
}
.rfq-upload input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.rfq-upload-icon {
  flex-shrink: 0;
  width: 30px; height: 30px;
  background: rgba(56,189,248,0.08);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
}
.rfq-upload-icon svg {
  width: 16px; height: 16px;
  stroke: #38bdf8; fill: none; stroke-width: 1.8;
}
.rfq-upload-text { font-size: 11.5px; color: rgba(148,163,220,0.65); }
.rfq-upload-text strong { color: #38bdf8; font-weight: 500; }
.rfq-file-name { font-size: 11px; color: #4ade80; margin-top: 3px; }

/* Badges (right panel fallback) — hidden, moved to left */
.rfq-badges { display: none; }

/* Buttons row */
.rfq-actions {
  display: flex; gap: 10px;
  margin-top: auto;
  padding-top: 14px;
}

/* Primary: Submit RFQ */
.rfq-btn-primary {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 16px;
  background: linear-gradient(135deg, #1d4ed8, #2563eb, #1d4ed8);
  background-size: 200% 200%;
  animation: rfqBtnShift 4s ease infinite;
  border: none; border-radius: 11px;
  color: #fff; font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.3s, transform 0.15s;
  letter-spacing: 0.01em;
}
@keyframes rfqBtnShift {
  0%,100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.rfq-btn-primary:hover {
  box-shadow: 0 0 24px rgba(56,189,248,0.30), 0 0 48px rgba(56,189,248,0.08);
  transform: translateY(-1px);
}
.rfq-btn-primary svg {
  width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2;
}

/* Secondary: WhatsApp */
.rfq-btn-secondary {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 16px;
  background: rgba(37,211,102,0.08);
  border: 1px solid rgba(37,211,102,0.22);
  border-radius: 11px;
  color: #25d366; font-size: 13px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.3s;
}
.rfq-btn-secondary:hover {
  background: rgba(37,211,102,0.14);
  border-color: rgba(37,211,102,0.40);
  box-shadow: 0 0 18px rgba(37,211,102,0.10);
}
.rfq-btn-secondary svg {
  width: 17px; height: 17px; stroke: #25d366; fill: none; stroke-width: 1.8;
}

/* ===== Mobile: Bottom Sheet ===== */
@media (max-width: 768px) {
  .rfq-overlay { align-items: flex-end; padding: 0; }

  .rfq-modal {
    grid-template-columns: 1fr;
    width: 100%; max-width: 100%; max-height: 92vh;
    border-radius: 22px 22px 0 0;
    transform: translateY(100%);
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s;
    opacity: 1;
  }
  .rfq-overlay.active .rfq-modal { transform: translateY(0); }
  .rfq-overlay.closing .rfq-modal { transform: translateY(100%); }

  /* Pull handle */
  .rfq-modal::before {
    content: ''; position: absolute;
    top: 9px; left: 50%; transform: translateX(-50%);
    width: 36px; height: 4px;
    background: rgba(148,163,220,0.22); border-radius: 4px; z-index: 10;
  }

  .rfq-visual { display: none; }

  .rfq-form-panel {
    padding: 22px 18px 24px;
    border-radius: 22px 22px 0 0;
  }

  .rfq-heading { font-size: 16px; }
  .rfq-subheading { font-size: 11.5px; margin-bottom: 14px; }

  .rfq-row { grid-template-columns: 1fr; gap: 0; }

  .rfq-field input,
  .rfq-field textarea {
    font-size: 16px; /* prevent iOS zoom */
    padding: 11px 12px;
  }
  .rfq-field textarea { min-height: 60px; }

  .rfq-btn-primary,
  .rfq-btn-secondary { height: 46px; }
}

/* ===== Tiny mobile ===== */
@media (max-width: 420px) {
  .rfq-form-panel { padding: 18px 14px 20px; }
  .rfq-heading { font-size: 15px; }
  .rfq-actions { flex-direction: column; }
}
