/* 508 Ministry Worldwide Phone Prefix Helper (m508-global-phone.css)
 * Self-hosted Figtree font, 16px anti-zoom mobile safe, light/dark adaptive.
 */
.m508-gp-wrap {
  display: flex !important;
  align-items: stretch !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
  font-family: 'Figtree', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.m508-gp-wrap > .m508-gp-btn {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px;
  padding: 0 11px !important;
  min-width: 78px;
  min-height: 42px;
  margin: 0 !important;
  border: 1px solid rgba(15, 35, 66, 0.22);
  border-right: 0 !important;
  border-radius: 8px 0 0 8px !important;
  background: #f5f2ea;
  color: #0d1e3a;
  font-family: 'Figtree', system-ui, -apple-system, sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.m508-gp-wrap > .m508-gp-btn:hover,
.m508-gp-wrap > .m508-gp-btn:focus-visible {
  background: #ece5d5;
  outline: 2px solid #d4a84b;
  outline-offset: -2px;
}

.m508-gp-wrap.m508-gp-dark > .m508-gp-btn {
  background: rgba(255, 255, 255, 0.09);
  color: #f8f4ea;
  border-color: rgba(212, 168, 75, 0.35);
}

.m508-gp-wrap.m508-gp-dark > .m508-gp-btn:hover,
.m508-gp-wrap.m508-gp-dark > .m508-gp-btn:focus-visible {
  background: rgba(212, 168, 75, 0.18);
}

.m508-gp-iso {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  opacity: 0.78;
}

.m508-gp-dial {
  font-size: 14px;
  font-weight: 700;
}

.m508-gp-caret {
  font-size: 10px;
  opacity: 0.72;
  margin-left: 1px;
}

.m508-gp-wrap > input.m508-gp-input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: 100% !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  font-size: 16px !important;
  box-sizing: border-box !important;
}

.m508-gp-pop {
  position: fixed;
  z-index: 2147483000;
  width: 310px;
  max-width: calc(100vw - 20px);
  background: #ffffff;
  color: #0d1e3a;
  border: 1px solid rgba(13, 30, 58, 0.18);
  border-radius: 12px;
  box-shadow: 0 18px 46px rgba(10, 22, 46, 0.28);
  overflow: hidden;
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
}

.m508-gp-pop[hidden] {
  display: none !important;
}

.m508-gp-search-wrap {
  padding: 10px;
  background: #f7f4ec;
  border-bottom: 1px solid #e6dec8;
}

.m508-gp-search {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 9px 12px !important;
  border: 1px solid #d5cab0 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #0d1e3a !important;
  font-family: 'Figtree', system-ui, -apple-system, sans-serif !important;
  font-size: 16px !important;
  line-height: 1.3 !important;
  outline: none !important;
}

.m508-gp-search:focus {
  border-color: #b28222 !important;
  box-shadow: 0 0 0 2px rgba(212, 168, 75, 0.25) !important;
}

.m508-gp-list {
  max-height: 270px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
  margin: 0;
  list-style: none;
}

.m508-gp-sec {
  padding: 6px 12px 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7d5c18;
  background: #fbf8f0;
  border-top: 1px solid #efe7d4;
  border-bottom: 1px solid #efe7d4;
}

.m508-gp-sec:first-child {
  border-top: 0;
}

.m508-gp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  color: #0d1e3a;
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

.m508-gp-item:hover,
.m508-gp-item:focus-visible,
.m508-gp-item[aria-selected="true"] {
  background: #f4ebd4;
  outline: none;
}

.m508-gp-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.m508-gp-item-iso {
  display: inline-block;
  min-width: 24px;
  font-size: 11px;
  font-weight: 800;
  color: #5b6880;
}

.m508-gp-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.m508-gp-item-dial {
  flex: 0 0 auto;
  font-weight: 700;
  color: #0f4a27;
  font-size: 13px;
}

.m508-gp-empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
}

@media (max-width: 480px) {
  .m508-gp-wrap > .m508-gp-btn {
    min-width: 72px;
    padding: 0 8px !important;
  }
  .m508-gp-pop {
    width: calc(100vw - 20px);
    left: 10px !important;
  }
}

/* === 508 SITEWIDE 5-COLUMN BALANCED DESKTOP FOOTER FIX (2026-11-26) ===
 * Prevents Column 5 (Contact + WhatsApp + Live Support) from wrapping onto a lonely 2nd row with dead black space.
 */
@media (min-width: 1024px) {
  html body footer.f508-canon > .f508-c-in,
  html body footer.f508-lux-footer > .f508-c-in,
  html body #n5-foot > div:first-of-type {
    max-width: 1340px !important;
    width: 100% !important;
  }
  html body footer.f508-canon .f508-c-grid,
  html body footer.f508-lux-footer .f508-c-grid,
  html body #n5-foot > div:first-of-type > div[style*="display: flex"],
  html body #n5-foot > div:first-of-type > div[style*="display:flex"] {
    display: grid !important;
    grid-template-columns: minmax(250px, 1.38fr) repeat(3, minmax(112px, 0.80fr)) minmax(225px, 1.14fr) !important;
    gap: 22px !important;
    align-items: start !important;
  }
  html body footer.f508-canon .f508-c-brand,
  html body footer.f508-canon .f508-c-col,
  html body #n5-foot > div:first-of-type > div[style*="display"] > div {
    min-width: 0 !important;
    max-width: 100% !important;
    width: auto !important;
  }
  html body footer.f508-canon .f508-c-col:last-child a,
  html body #n5-foot > div:first-of-type > div[style*="display"] > div:last-child a {
    max-width: 100% !important;
  }
  html body footer.f508-canon [data-f508="social"],
  html body #n5-foot [data-f508="social"] {
    gap: 10px !important;
    flex-wrap: wrap !important;
  }
}
