/* ==========================================================================
   DollarHuge Dashboard Redesigned Footer & Mobile UI/UX Styles
   ========================================================================== */

:root {
  --dh-footer-bg: #ffffff;
  --dh-footer-border: rgba(0, 0, 0, 0.08);
  --dh-footer-title: #0f172a;
  --dh-footer-text: #64748b;
  --dh-footer-link: #475569;
  --dh-footer-link-hover: #00b894;
  --dh-footer-badge-bg: rgba(0, 184, 148, 0.08);
  --dh-footer-badge-border: rgba(0, 184, 148, 0.22);
  --dh-footer-badge-text: #008f6b;
  --dh-footer-card-bg: rgba(241, 245, 249, 0.85);
  --dh-footer-select-bg: #ffffff;
  --dh-footer-select-border: rgba(0, 0, 0, 0.12);
  --dh-footer-divider: rgba(0, 0, 0, 0.06);
  --dh-bnav-bar-height: 64px;
}

.theme--dark {
  --dh-footer-bg: #151923;
  --dh-footer-border: rgba(255, 255, 255, 0.08);
  --dh-footer-title: #f8fafc;
  --dh-footer-text: #94a3b8;
  --dh-footer-link: #94a3b8;
  --dh-footer-link-hover: #55efc4;
  --dh-footer-badge-bg: rgba(0, 184, 148, 0.12);
  --dh-footer-badge-border: rgba(0, 184, 148, 0.28);
  --dh-footer-badge-text: #55efc4;
  --dh-footer-card-bg: rgba(26, 32, 46, 0.7);
  --dh-footer-select-bg: #1c2230;
  --dh-footer-select-border: rgba(255, 255, 255, 0.14);
  --dh-footer-divider: rgba(255, 255, 255, 0.07);
}

/* Hide legacy deco elements if present */
.footer-counter .deco,
.footer-counter .deco-footer,
.footer-counter .deco-main,
.footer-counter .deco-left,
.footer-counter .deco-right {
  display: none !important;
}

.footer-counter {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Footer Outer Container */
.dh-footer {
  position: relative;
  width: 100%;
  background: var(--dh-footer-bg);
  border-top: 1px solid var(--dh-footer-border);
  margin-top: auto;
  z-index: 20;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--dh-footer-text);
  box-sizing: border-box;
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* Top Accent Gradient Line */
.dh-footer-glow-line {
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, transparent 0%, #00b894 30%, #0984e3 70%, transparent 100%);
  opacity: 0.85;
}

/* Inner Container */
.dh-footer-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 44px 24px 24px;
  box-sizing: border-box;
}

/* Desktop 4-Column Grid */
.dh-footer-grid {
  display: grid;
  grid-template-columns: 2.3fr 1.1fr 1.1fr 1.5fr;
  gap: 36px;
  margin-bottom: 36px;
  align-items: start;
}

/* Col 1: Brand & Security */
.dh-footer-brand-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.dh-footer-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
  margin-bottom: 14px;
}

.dh-footer-brand img {
  height: 34px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

.theme--light .dh-footer-brand .logo-dark {
  display: none !important;
}
.theme--light .dh-footer-brand .logo-light {
  display: block !important;
}
.theme--dark .dh-footer-brand .logo-light {
  display: none !important;
}
.theme--dark .dh-footer-brand .logo-dark {
  display: block !important;
}

.dh-footer-tagline {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--dh-footer-text);
  margin: 0 0 16px 0;
  max-width: 320px;
  font-weight: 400;
}

.dh-footer-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--dh-footer-badge-bg);
  border: 1px solid var(--dh-footer-badge-border);
  color: var(--dh-footer-badge-text);
  user-select: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dh-footer-trust-badge i {
  font-size: 16px;
  color: var(--dh-footer-badge-text);
}

.dh-footer-trust-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 184, 148, 0.15);
}

/* Desktop Navigation wrapper */
.dh-footer-desktop-nav {
  display: contents;
}

.dh-footer-mobile-nav,
.dh-footer-mobile-app {
  display: none !important;
}

/* Navigation Columns */
.dh-footer-heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--dh-footer-title);
  margin: 0 0 16px 0;
  padding: 0;
  line-height: 1.2;
}

.dh-footer-links {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dh-footer-links li {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.dh-footer-links a {
  color: var(--dh-footer-link) !important;
  text-decoration: none !important;
  font-size: 13.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease, transform 0.2s ease;
  line-height: 1.4;
}

.dh-footer-links a:hover {
  color: var(--dh-footer-link-hover) !important;
  transform: translateX(4px);
}

[dir="rtl"] .dh-footer-links a:hover {
  transform: translateX(-4px);
}

/* Language Selector */
.dh-footer-lang-wrap {
  margin-top: 18px;
  width: 100%;
  max-width: 220px;
}

.dh-footer-lang-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--dh-footer-text);
  margin-bottom: 6px;
  display: block;
}

.dh-footer-lang-pill {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--dh-footer-select-bg);
  border: 1px solid var(--dh-footer-select-border);
  border-radius: 10px;
  height: 38px;
  width: 100%;
  box-shadow: 0 1.5px 6px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  overflow: hidden;
}

.dh-footer-lang-pill:hover,
.dh-footer-lang-pill:focus-within {
  border-color: #00b894;
  box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.15);
}

/* Materialize select-wrapper override */
.dh-footer-lang-pill .select-wrapper {
  position: static !important;
  display: contents !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.dh-footer-lang-pill .select-wrapper input.select-dropdown,
.dh-footer-lang-pill .select-wrapper .caret,
.dh-footer-lang-pill input.select-dropdown,
.dh-footer-lang-pill svg.caret {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  pointer-events: none !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.dh-footer-lang-pill ul.dropdown-content.select-dropdown {
  display: none !important;
}

.dh-footer-lang-pill .dh-lang-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #00b894;
  pointer-events: none;
  z-index: 3;
  line-height: 1;
}

.dh-footer-lang-pill select.dh-footer-lang-select,
.dh-footer-lang-pill select.browser-default.dh-footer-lang-select,
.dh-footer-lang-pill select.browser-default {
  position: relative !important;
  z-index: 2 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 36px !important;
  max-height: 38px !important;
  line-height: 36px !important;
  border: none !important;
  border-bottom: none !important;
  background: transparent !important;
  background-color: transparent !important;
  color: var(--dh-footer-title) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  cursor: pointer !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 30px 0 34px !important;
  margin: 0 !important;
  display: block !important;
}

.dh-footer-lang-pill select.dh-footer-lang-select:focus,
.dh-footer-lang-pill select.browser-default.dh-footer-lang-select:focus {
  outline: none !important;
  border: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

.dh-footer-lang-pill select.dh-footer-lang-select option {
  background-color: var(--dh-footer-select-bg) !important;
  color: var(--dh-footer-title) !important;
  font-weight: 500 !important;
  padding: 8px 12px !important;
}

.dh-footer-lang-pill .dh-lang-chevron {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--dh-footer-text);
  pointer-events: none;
  z-index: 3;
  line-height: 1;
}

[dir="rtl"] .dh-footer-lang-pill .dh-lang-icon {
  left: auto;
  right: 10px;
}

[dir="rtl"] .dh-footer-lang-pill select.dh-footer-lang-select,
[dir="rtl"] .dh-footer-lang-pill select.browser-default.dh-footer-lang-select {
  padding: 0 34px 0 30px !important;
}

[dir="rtl"] .dh-footer-lang-pill .dh-lang-chevron {
  right: auto;
  left: 10px;
}

/* Sub-Footer Bottom Bar */
.dh-footer-bottom {
  border-top: 1px solid var(--dh-footer-divider);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.dh-footer-copy {
  font-size: 12.5px;
  color: var(--dh-footer-text);
  margin: 0;
  font-weight: 400;
  line-height: 1.5;
}

.dh-footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--dh-footer-text);
  background: var(--dh-footer-card-bg);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--dh-footer-divider);
}

.dh-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #00b894;
  box-shadow: 0 0 0 0 rgba(0, 184, 148, 0.7);
  animation: dhStatusPulse 2s infinite cubic-bezier(0.45, 0, 0.55, 1);
  display: inline-block;
  flex-shrink: 0;
}

@keyframes dhStatusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 184, 148, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(0, 184, 148, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 184, 148, 0);
  }
}

/* ==========================================================================
   Responsive Tablet Breakpoint (769px - 1024px)
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  .dh-footer-grid {
    grid-template-columns: 1.4fr 1fr;
    gap: 32px 28px;
  }
  .dh-footer-brand-col {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   Mobile Footer UI/UX (<= 768px): Sleek, Native App-Style Simple Footer
   ========================================================================== */
@media (max-width: 768px) {
  .dh-footer {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }

  .dh-footer-inner {
    padding: 24px 16px calc(18px + env(safe-area-inset-bottom, 12px));
  }

  body.has-mobile-bottom-nav .dh-footer-inner,
  body:has(#dh-mobile-bottom-nav) .dh-footer-inner {
    padding-bottom: calc(var(--dh-bnav-bar-height, 64px) + env(safe-area-inset-bottom, 0px) + 16px) !important;
  }

  .dh-footer-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    margin-bottom: 16px;
  }

  .dh-footer-brand-col {
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .dh-footer-brand {
    margin-bottom: 6px;
  }

  .dh-footer-brand img {
    height: 26px;
    width: auto;
  }

  .dh-footer-tagline {
    font-size: 12px;
    line-height: 1.5;
    margin: 0 auto 8px;
    max-width: 280px;
    color: var(--dh-footer-text);
  }

  .dh-footer-trust-badge {
    margin: 0 auto;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 16px;
  }

  .dh-footer-trust-badge i {
    font-size: 14px;
  }

  /* Completely hide all heavy column lists on mobile (Platform, Company, Legal) */
  .dh-footer-desktop-nav,
  .dh-footer-mobile-nav {
    display: none !important;
  }

  /* Native App-Style Mobile Controls */
  .dh-footer-mobile-app {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 12px;
    margin-top: 4px;
  }

  .dh-footer-mobile-app .dh-footer-lang-wrap {
    margin: 0 auto;
    width: 100%;
    max-width: 180px;
  }

  .dh-footer-mobile-app .dh-footer-lang-label {
    display: none !important;
  }

  .dh-footer-mobile-app .dh-footer-lang-pill {
    height: 36px;
    border-radius: 18px;
  }

  .dh-footer-mobile-app .dh-footer-lang-pill select.dh-footer-lang-select,
  .dh-footer-mobile-app .dh-footer-lang-pill select.browser-default.dh-footer-lang-select {
    font-size: 12.5px !important;
    min-height: 34px !important;
    line-height: 34px !important;
    padding: 0 28px 0 32px !important;
  }

  .dh-footer-mobile-links {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .dh-footer-mobile-links a {
    font-size: 12px;
    font-weight: 500;
    color: var(--dh-footer-link) !important;
    text-decoration: none !important;
    padding: 4px 6px;
    transition: color 0.2s ease;
  }

  .dh-footer-mobile-links a:hover,
  .dh-footer-mobile-links a:active {
    color: var(--dh-footer-link-hover) !important;
  }

  .dh-footer-link-dot {
    font-size: 13px;
    line-height: 1;
    color: var(--dh-footer-text);
    opacity: 0.65;
    user-select: none;
    display: inline-block;
    vertical-align: middle;
  }

  .dh-footer-bottom {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--dh-footer-divider);
  }

  .dh-footer-copy {
    font-size: 11px;
    text-align: center;
    opacity: 0.85;
  }

  .dh-footer-status {
    margin: 0 auto;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 16px;
  }

  .dh-status-dot {
    width: 6px;
    height: 6px;
  }
}
