/**
 * Deepak Paswan — Premium Dark Global Footer Styles
 * Inspired by modern high-density technology & developer platform footers.
 * Base Background: #071522 (Deep Navy/Charcoal)
 * Accent: #CA4B00 (Deepak Paswan Brand Orange)
 */

/* --------------------------------------------------------------------------
 * Root Container & Background
 * ----------------------------------------------------------------------- */
.dp-footer-root {
  background-color: #071522;
  color: #94A3B8; /* Slate 400 */
  font-family: var(--dp-font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Subtle top edge border */
.dp-footer-root {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* --------------------------------------------------------------------------
 * Top Status / Telemetry Bar
 * ----------------------------------------------------------------------- */
.dp-footer-telemetry {
  background-color: #050E17;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.75rem 0;
  font-size: 0.75rem;
  line-height: 1.25rem;
}

.dp-footer-telemetry-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.dp-footer-telemetry-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #34D399; /* Emerald 400 */
  font-weight: 500;
}

.dp-footer-pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: #10B981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: dpPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes dpPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.85);
  }
}

.dp-footer-telemetry-sep {
  color: rgba(255, 255, 255, 0.18);
  font-weight: 300;
  user-select: none;
}

.dp-footer-telemetry-item {
  color: #94A3B8;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.dp-footer-telemetry-lbl {
  color: #94A3B8;
}

.dp-footer-telemetry-item strong {
  color: #F1F5F9;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
 * Main Footer Grid & Columns
 * ----------------------------------------------------------------------- */
.dp-footer-main {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

@media (min-width: 640px) {
  .dp-footer-main {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }
}

@media (min-width: 1024px) {
  .dp-footer-main {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

/* Master Grid Layout (Zero Tailwind Dependency) */
.dp-footer-grid-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  text-align: left;
}

@media (min-width: 1024px) {
  .dp-footer-grid-wrap {
    grid-template-columns: 290px 1fr;
    gap: 2.75rem;
  }
}

@media (min-width: 1280px) {
  .dp-footer-grid-wrap {
    grid-template-columns: 310px 1fr;
    gap: 3.5rem;
  }
}

/* Nav Columns Grid: 4 sections with 1fr : 2fr : 1fr : 1fr */
.dp-footer-nav-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .dp-footer-nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
  }
}

@media (min-width: 1024px) {
  .dp-footer-nav-grid {
    grid-template-columns: 1fr 2fr 1fr 1fr;
    gap: 2rem;
  }
}

@media (min-width: 1280px) {
  .dp-footer-nav-grid {
    gap: 2.5rem;
  }
}

/* Free Tools 2-Column Subgrid */
.dp-footer-tools-subgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.625rem;
}

@media (min-width: 640px) {
  .dp-footer-tools-subgrid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

/* Brand Area */
.dp-footer-brand-title {
  color: #FFFFFF;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--dp-font-heading, "Plus Jakarta Sans", sans-serif);
}

.dp-footer-brand-desc {
  color: #94A3B8;
  font-size: 0.875rem;
  line-height: 1.625;
  margin-top: 0.75rem;
}

/* Brand Feature List (Reference-inspired) */
.dp-footer-features-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dp-footer-feature-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.dp-footer-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--dp-primary, #CA4B00);
  font-size: 1.125rem;
  line-height: 1;
  flex-shrink: 0;
}

.dp-footer-feature-text {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.dp-footer-feature-bold {
  font-weight: 700;
  color: #F1F5F9;
}

.dp-footer-feature-sep {
  color: #64748B;
  user-select: none;
}

.dp-footer-feature-sub {
  color: #94A3B8;
  font-weight: 400;
}

/* Social Buttons */
.dp-footer-social-wrap {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.dp-footer-social-btn {
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 0.5rem;
  background-color: #0C1A29;
  border: 1px solid #162D44;
  color: #94A3B8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.dp-footer-social-btn:hover {
  background-color: #CA4B00;
  border-color: #CA4B00;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.dp-footer-social-btn:focus-visible {
  outline: 2px solid #CA4B00;
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
 * Navigation Columns
 * ----------------------------------------------------------------------- */
.dp-footer-col {
  min-width: 0;
  overflow: hidden;
}

.dp-footer-col-header {
  position: relative;
  margin-bottom: 1.25rem;
}

.dp-footer-col-title {
  color: var(--dp-primary, #CA4B00) !important; /* Match theme primary brand color */
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--dp-font-heading, "Plus Jakarta Sans", sans-serif);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  white-space: nowrap !important;
}

.dp-footer-col-title-accent {
  color: #CA4B00 !important;
}

/* Column Link List */
.dp-footer-links-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  min-width: 0;
}

.dp-footer-links-list li {
  min-width: 0;
  max-width: 100%;
}

.dp-footer-link {
  color: #94A3B8;
  font-size: 0.8125rem;
  line-height: 1.375rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  transition: color 0.15s ease, transform 0.15s ease;
  position: relative;
}

.dp-footer-link span:not(.dp-footer-badge):not(.dp-footer-tool-text) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
}

.dp-footer-link:hover {
  color: #CA4B00;
  transform: translateX(2px);
}

.dp-footer-link:focus-visible {
  outline: 2px solid #CA4B00;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Tool Column Links: Text-only clean display without icons */
.dp-footer-tool-link {
  display: block !important;
  white-space: normal !important;
  line-height: 1.4 !important;
  overflow: visible !important;
  text-decoration: none !important;
  color: #94A3B8 !important;
  transition: color 0.15s ease, transform 0.15s ease !important;
}

.dp-footer-tool-link:hover {
  color: #CA4B00 !important;
  transform: translateX(2px);
}

.dp-footer-tool-text {
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  text-overflow: clip !important;
  overflow: visible !important;
  line-height: 1.4 !important;
  display: inline !important;
  color: inherit !important;
}

/* Badges (Hot, New, Deal, etc.) */
.dp-footer-badge {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.dp-footer-badge-hot {
  background-color: rgba(239, 68, 68, 0.22);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.dp-footer-badge-blue {
  background-color: rgba(202, 75, 0, 0.22);
  color: #FF7728;
  border: 1px solid rgba(202, 75, 0, 0.4);
}

.dp-footer-badge-orange {
  background-color: rgba(202, 75, 0, 0.22);
  color: #FF7728;
  border: 1px solid rgba(202, 75, 0, 0.4);
}

/* View All CTA */
.dp-footer-view-all {
  margin-top: 0.875rem;
  padding-top: 0.625rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.dp-footer-view-all a {
  color: #CA4B00;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.15s ease;
}

.dp-footer-view-all a:hover {
  color: #FF7728;
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
 * Bottom Bar
 * ----------------------------------------------------------------------- */
.dp-footer-bottom {
  background-color: #040A10;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.25rem 0;
  font-size: 0.75rem;
  color: #64748B;
}

.dp-footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: column;
  gap: 1.25rem;
  text-align: center;
}

@media (min-width: 768px) {
  .dp-footer-bottom-inner {
    flex-direction: row;
    text-align: left;
  }
}

.dp-footer-copyright {
  color: #64748B;
  margin: 0;
}

.dp-footer-bottom-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: center;
}

@media (min-width: 768px) {
  .dp-footer-bottom-right {
    justify-content: flex-end;
  }
}

.dp-footer-payments {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex-wrap: nowrap !important;
}

.dp-footer-payment-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 26px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  background-color: #0C1A29 !important;
  border: 1px solid #162D44 !important;
  border-radius: 4px !important;
  padding: 2px 4px !important;
  color: #94A3B8;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

.dp-footer-payment-badge:hover {
  border-color: var(--dp-primary, #CA4B00) !important;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.dp-footer-bottom-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dp-footer-bottom-links a {
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.15s ease;
}

.dp-footer-bottom-links a:hover {
  color: #CA4B00;
}

/* --------------------------------------------------------------------------
 * Mobile Accordion Support (<= 768px)
 * ----------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  .dp-footer-accordion-toggle {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0.75rem 0;
    color: inherit;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .dp-footer-accordion-toggle:focus-visible {
    outline: 2px solid #CA4B00;
    outline-offset: 2px;
  }

  .dp-footer-accordion-icon {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--dp-primary, #CA4B00);
    transition: transform 0.2s ease;
    line-height: 1;
  }

  .dp-footer-accordion-toggle[aria-expanded="true"] .dp-footer-accordion-icon {
    transform: rotate(45deg);
    color: #CA4B00;
  }

  .dp-footer-col-content {
    display: none;
    padding-top: 0.75rem;
    padding-bottom: 1rem;
  }

  .dp-footer-col-content.is-open {
    display: block;
    animation: dpSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  @keyframes dpSlideDown {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Desktop headers are hidden on mobile in favor of accordion toggles */
  .dp-footer-col-desktop-header {
    display: none;
  }
}

@media (min-width: 768px) {
  .dp-footer-accordion-toggle {
    display: none;
  }

  .dp-footer-col-content {
    display: block !important;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .dp-footer-pulse-dot {
    animation: none;
  }

  .dp-footer-link,
  .dp-footer-social-btn,
  .dp-footer-accordion-icon,
  .dp-footer-col-content.is-open {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}
