/* ═══════════════════════════════════════════════════════════════
   FULITES — SHARED COMPONENTS CSS
   Sample Report Modal · Floating Multi-Channel Chat Widget
   Popup · Quick-contact buttons · Map wrapper

   ⚠️ SYNC RULE FOR ALL 15 PAGES (homepage + 14 subpages):
   This file must be linked IDENTICALLY on every page via:
     <link rel="stylesheet" href="/assets/css/fulites-shared.css">
   Do NOT paste these rules inline into individual page <head> blocks.
   Any future style change to the modal/chat widget only needs to be
   made HERE, once, and it will apply site-wide automatically.
════════════════════════════════════════════════════════════════ */

/* ── SAMPLE REPORT STRIP ── */
.report-strip {
  background: linear-gradient(135deg, #0B1F3A 0%, #1a3a6e 100%);
  padding: 2.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  text-align: center;
}
.report-strip-text h3 {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.report-strip-text p {
  color: #8AADCA;
  font-size: 0.88rem;
}
.btn-report {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #1E73BE;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.btn-report:hover { background: #155fa0; transform: translateY(-1px); }
.btn-report svg { flex-shrink: 0; }
@media (max-width: 480px) {
  .report-strip { padding: 1.75rem 1.25rem; gap: 1.25rem; }
  .modal-box { padding: 1.5rem; }
}

/* ── MODAL OVERLAY ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11,31,58,0.72);
  backdrop-filter: blur(4px);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.active { display: flex; }

.modal-box {
  background: #fff;
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2.25rem;
  position: relative;
  box-shadow: 0 24px 60px rgba(11,31,58,0.25);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity:0; transform: translateY(20px) scale(0.97); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: #f5f7fa;
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #555;
  transition: background 0.15s;
}
.modal-close:hover { background: #e0e7f0; }

.modal-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.modal-box h3 { font-size: 1.25rem; font-weight: 800; color: #0B1F3A; margin-bottom: 0.4rem; }
.modal-box p.modal-desc { font-size: 0.85rem; color: #6b7a90; margin-bottom: 1.25rem; line-height: 1.6; }

.modal-box label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0B1F3A;
  margin-bottom: 0.3rem;
}
.modal-box input, .modal-box select {
  width: 100%;
  border: 1.5px solid #dde5f0;
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  font-size: 0.88rem;
  font-family: 'Inter', sans-serif;
  color: #333;
  margin-bottom: 0.9rem;
  transition: border-color 0.2s;
  background: #fff;
}
.modal-box input:focus, .modal-box select:focus {
  outline: none;
  border-color: #1E73BE;
}
.modal-box input:last-of-type { margin-bottom: 1rem; }

.btn-modal-submit {
  width: 100%;
  background: #1E73BE;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.8rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-modal-submit:hover { background: #155fa0; }

.modal-privacy {
  font-size: 0.72rem;
  color: #aaa;
  text-align: center;
  margin-top: 0.75rem;
}

/* Success state */
.modal-success {
  text-align: center;
  padding: 1rem 0;
}
.modal-success .success-icon { font-size: 3rem; margin-bottom: 1rem; }
.modal-success h4 { font-size: 1.1rem; font-weight: 800; color: #0B1F3A; margin-bottom: 0.5rem; }
.modal-success p { font-size: 0.85rem; color: #6b7a90; }
.modal-success a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 1.25rem;
  background: #1E73BE; color: #fff;
  padding: 0.7rem 1.5rem; border-radius: 6px;
  font-weight: 700; font-size: 0.9rem; text-decoration: none;
  transition: background 0.2s;
}
.modal-success a:hover { background: #155fa0; }

/* ── FLOATING CHAT WIDGET ── */
.chat-fab {
  position: fixed;
  bottom: calc(1.75rem + env(safe-area-inset-bottom, 0px));
  right: calc(1.75rem + env(safe-area-inset-right, 0px));
  z-index: 8000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}
/* Mobile: sit closer to the edge so it doesn't eat into content width,
   and hide it entirely while the fullscreen mobile nav menu is open —
   otherwise it floats on top of the menu links (z-index 8000 > 199). */
@media (max-width: 480px) {
  .chat-fab {
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    right: calc(1rem + env(safe-area-inset-right, 0px));
  }
}
body:has(.nav-mobile.open) .chat-fab { display: none; }

/* Channel buttons — hidden by default */
.chat-channels {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.chat-fab.open .chat-channels {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.chat-channel-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1rem 0.55rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}
.chat-channel-btn:hover { transform: scale(1.04); box-shadow: 0 6px 20px rgba(0,0,0,0.22); }
.chat-channel-btn .ch-icon { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.2); display:flex; align-items:center; justify-content:center; font-size:1rem; }

.chat-channel-btn.wa  { background: #25D366; }
.chat-channel-btn.zl  { background: #0068FF; }
.chat-channel-btn.wc  { background: #07C160; cursor: default; }

/* Main toggle button */
.chat-toggle {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #1E73BE;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(30,115,190,0.45);
  transition: background 0.2s, transform 0.2s;
  position: relative;
}
.chat-toggle:hover { background: #155fa0; }
.chat-toggle svg { transition: transform 0.25s, opacity 0.2s; }
.chat-toggle .icon-close { position:absolute; opacity:0; transform:rotate(-90deg); }
.chat-fab.open .chat-toggle { background: #0B1F3A; }
.chat-fab.open .chat-toggle .icon-chat { opacity:0; transform:rotate(90deg); }
.chat-fab.open .chat-toggle .icon-close { opacity:1; transform:rotate(0deg); }

/* Notification dot */
.chat-dot {
  position: absolute;
  top: -2px; right: -2px;
  width: 14px; height: 14px;
  background: #e74c3c;
  border-radius: 50%;
  border: 2px solid #fff;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.25); }
}

/* Incomplete channel popup styles kept hidden until verified assets exist */
.wechat-popup {
  display: none;
  position: fixed;
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  right: calc(1.75rem + env(safe-area-inset-right, 0px));
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem;
  width: 200px;
  box-shadow: 0 12px 36px rgba(11,31,58,0.18);
  z-index: 8100;
  text-align: center;
  border: 1px solid #e0e7f0;
}
@media (max-width: 480px) {
  .wechat-popup {
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
    right: calc(1rem + env(safe-area-inset-right, 0px));
  }
}
.wechat-popup.show { display: block; animation: modalIn 0.2s ease; }
.wechat-popup h5 { font-size: 0.82rem; font-weight: 700; color: #0B1F3A; margin-bottom: 0.6rem; }
.wechat-popup img { width: 140px; height: 140px; border-radius: 6px; object-fit: cover; margin-bottom: 0.5rem; }
.wechat-qr-fallback {
  display: flex; flex-direction: column;
  width: 140px; height: 140px; margin: 0 auto 0.5rem; padding: 0.5rem;
  background: #e8f0fb; border: 1.5px dashed #b9cde6; border-radius: 6px;
  align-items: center; justify-content: center; text-align: center;
  font-size: 0.75rem; font-weight: 600; color: #5a7aa8; line-height: 1.4;
}
.wechat-popup p { font-size: 0.72rem; color: #888; }
.wechat-popup .wechat-number {
  font-weight: 700; color: #0B1F3A; font-size: 0.92rem;
  margin-bottom: 0.65rem; letter-spacing: 0.02em;
}
.wechat-copy-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  width: 100%; border: none; cursor: pointer;
  background: #07C160; color: #fff;
  font-family: 'Inter', sans-serif; font-size: 0.78rem; font-weight: 700;
  padding: 0.55rem 0.75rem; border-radius: 6px;
  transition: background 0.2s, transform 0.15s;
}
.wechat-copy-btn:hover { background: #06a852; transform: translateY(-1px); }

/* WhatsApp inline button in contact */
.wa-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #25D366;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.65rem 1.4rem;
  border-radius: 6px;
  text-decoration: none;
  margin-top: 0.75rem;
  transition: background 0.2s, transform 0.15s;
}
.wa-contact-btn:hover { background: #1da851; transform: translateY(-1px); }

/* Zalo inline button */
.zalo-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #0068FF;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.65rem 1.4rem;
  border-radius: 6px;
  text-decoration: none;
  margin-top: 0.5rem;
  transition: background 0.2s, transform 0.15s;
}
.zalo-contact-btn:hover { background: #0055cc; transform: translateY(-1px); }

/* Quick-contact row */
.quick-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Map container */
.map-wrap {
  margin-top: 3rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(11,31,58,0.12);
  border: 1px solid #e0e7f0;
}
.map-wrap iframe { display: block; width: 100%; height: 380px; border: 0; }
@media (max-width: 640px) {
  .map-wrap iframe { height: 260px; }
}
.map-caption {
  font-size: 0.78rem;
  color: #888;
  text-align: center;
  margin-top: 0.5rem;
}
.map-caption a { color: #1E73BE; }

/* ── ICON NORMALIZATION ──
   Homepage icons (About mini-cards, Service cards, Industry grid, Why-Us grid)
   were converted from emoji to inline SVG for a consistent, professional,
   OS-independent look (emoji render inconsistently across Windows/Mac/Android/
   iOS and some international devices). These rules make every SVG icon scale
   with whatever font-size the existing theme (style.css) already defines for
   these containers, so no other layout changes are needed. */
.about-mini-icon svg,
.service-icon svg,
.industry-icon svg,
.why-icon svg {
  width: 1em;
  height: 1em;
  display: block;
}
.about-mini-icon, .service-icon, .why-icon { color: #1E73BE; }
.industry-item .industry-icon { color: #0B1F3A; }

/* ═══════════════════════════════════════════════════════════════
   PRICING COMPONENTS
   Used on /pricing/, /sample-inspection-report/, QC Inspection,
   Factory Audit, Representative Office, and Industry pages.
   Loaded once here per the sync rule at the top of this file.
════════════════════════════════════════════════════════════════ */
.price-table-wrap { max-width: 900px; margin: 0 auto 2rem; overflow-x: auto; }
.price-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #eef0f4; border-radius: 10px; overflow: hidden; font-size: 0.92rem; }
.price-table th, .price-table td { padding: 0.9rem 1.1rem; text-align: left; border-bottom: 1px solid #eef0f4; }
.price-table th { background: #0B1F3A; color: #fff; font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; }
.price-table tr:last-child td { border-bottom: none; }
.price-table td.price-cell { font-weight: 700; color: #1E73BE; white-space: nowrap; }
.price-disclaimer { max-width: 780px; margin: 0 auto 2rem; font-size: 0.85rem; color: var(--g600); background: #f4f7fb; border-left: 3px solid #1E73BE; padding: 0.9rem 1.1rem; border-radius: 6px; }
.price-note { max-width: 780px; margin: 0 auto 2rem; font-size: 0.85rem; color: var(--g600); line-height: 1.7; }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; max-width: 1100px; margin: 0 auto 1.5rem; }
.plan-card { background: #fff; border: 1px solid #eef0f4; border-radius: 12px; padding: 1.75rem; display: flex; flex-direction: column; }
.plan-card.featured { border: 2px solid #1E73BE; box-shadow: 0 8px 30px rgba(30,115,190,0.12); position: relative; }
.plan-card.featured::before { content: attr(data-badge); position: absolute; top: -12px; left: 1.5rem; background: #1E73BE; color: #fff; font-size: 0.7rem; font-weight: 700; padding: 0.25rem 0.7rem; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.03em; }
.plan-card h3 { font-family: 'Manrope', sans-serif; font-size: 1.05rem; font-weight: 800; color: var(--navy); margin-bottom: 0.25rem; }
.plan-price { font-size: 1.5rem; font-weight: 800; color: #1E73BE; margin-bottom: 0.25rem; }
.plan-price span { font-size: 0.78rem; font-weight: 600; color: var(--g600); }
.plan-desc { font-size: 0.85rem; color: var(--g600); margin-bottom: 1rem; line-height: 1.6; }
.plan-card ul { list-style: none; margin: 0 0 1.25rem; padding: 0; flex-grow: 1; }
.plan-card ul li { font-size: 0.85rem; color: var(--g600); line-height: 1.6; margin-bottom: 0.55rem; padding-left: 1.3rem; position: relative; }
.plan-card ul li::before { content: "✓"; position: absolute; left: 0; color: #1E73BE; font-weight: 700; }
.plan-card .btn-plan { display: inline-block; text-align: center; background: #0B1F3A; color: #fff; font-weight: 700; font-size: 0.85rem; padding: 0.75rem 1rem; border-radius: 8px; text-decoration: none; transition: background 0.2s; }
.plan-card .btn-plan:hover { background: #1E73BE; }
.plan-terms { max-width: 780px; margin: 0 auto; font-size: 0.82rem; color: var(--g600); }
.plan-terms li { margin-bottom: 0.35rem; }

.trial-box { max-width: 820px; margin: 0 auto 2rem; background: linear-gradient(135deg, #0B1F3A 0%, #1a3a6e 100%); border-radius: 14px; padding: 2rem; color: #fff; }
.trial-box .trial-price { font-size: 1.6rem; font-weight: 800; color: #7eb8ff; margin: 0.35rem 0; }
.trial-box .trial-price span { font-size: 0.78rem; color: #b9d3ee; font-weight: 600; }
.trial-box p { color: rgba(255,255,255,0.78); font-size: 0.88rem; line-height: 1.7; }
.trial-box ul { margin: 1rem 0 1.5rem 1.2rem; color: rgba(255,255,255,0.85); font-size: 0.87rem; line-height: 1.75; }

@media (max-width: 640px) {
  .price-table { font-size: 0.82rem; }
  .price-table th, .price-table td { padding: 0.65rem 0.7rem; }
}

/* Incomplete chat channels are hidden until real verified assets exist. */
.wc, .wechat-popup { display:none !important; }
/* ═══════════════════════════════════════════════════════════════
   COOKIE CONSENT BANNER
   Injected by fulites-shared.js only when no prior choice is stored.
   Fixed bottom bar, matches the site's navy brand color.
════════════════════════════════════════════════════════════════ */
#cookieConsent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10000;
  background: #0B1F3A; color: #fff;
  padding: 1rem 5%; 
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
  transform: translateY(110%);
  transition: transform 0.35s ease;
}
#cookieConsent.show { transform: translateY(0); }
#cookieConsent p { margin: 0; font-size: 0.85rem; line-height: 1.6; color: rgba(255,255,255,0.88); max-width: 640px; flex: 1 1 320px; }
#cookieConsent .cookie-actions { display: flex; gap: 0.6rem; flex-shrink: 0; }
#cookieConsent button { font-size: 0.85rem; font-weight: 700; padding: 0.6rem 1.1rem; border-radius: 8px; cursor: pointer; border: 1.5px solid rgba(255,255,255,0.3); background: transparent; color: #fff; }
#cookieConsent button:hover { background: rgba(255,255,255,0.1); }
#cookieConsent button.cookie-accept { background: #fff; color: #0B1F3A; border-color: #fff; }
#cookieConsent button.cookie-accept:hover { background: #e8edf5; }

@media (max-width: 640px) {
  #cookieConsent { padding: 1rem; flex-direction: column; align-items: stretch; text-align: left; }
  #cookieConsent .cookie-actions { width: 100%; }
  #cookieConsent .cookie-actions button { flex: 1; }
}


/* Security/trust: incomplete channels stay hidden until real verified assets exist. */
.wc, .wechat-popup { display: none !important; }

/* Form dropdown polish */
select:invalid { color: #6b7a90; }
select option { color: #333; background: #fff; }
