/* DPostal Brand Palette Theme
 * color1: #16A34A (Primary Emerald Green)
 * color2: #22C55E (Vibrant Accent Green)
 * color3: #1F2937 (Deep Slate Charcoal)
 * color4: #ECFDF5 (Soft Mint Surface)
 */
:root {
  --dpostal-c1: #16A34A;
  --dpostal-c2: #22C55E;
  --dpostal-c3: #1F2937;
  --dpostal-c4: #ECFDF5;
  --primary: #16A34A;
  --success: #16A34A;
  --dark: #1F2937;
  --light: #ECFDF5;
}

body {
  color: #1F2937;
}

h1, h2, h3, h4, h5, h6, p, li, td, th {
  color: inherit;
}

a {
  color: #16A34A;
}

a:hover,
a:focus {
  color: #1F2937;
}

/* Global Utility Bar & Megamenu v5 */
.nav-utility .utility-links a,
.nav-utility #link-lang {
  color: #1F2937 !important;
}

.nav-utility .utility-links a:hover,
.nav-utility #link-lang:hover {
  color: #16A34A !important;
  background-color: #ECFDF5 !important;
}

/* Crisp DPostal green icons in top utility bar (no hue-rotate distortion) */
.nav-utility .utility-links a#link-locator:before {
  background-image: url("/global-elements/images/location.svg") !important;
  background-size: 14px 14px !important;
  margin-right: 5px;
  filter: none !important;
}

.nav-utility .utility-links a#link-policies:before {
  background-image: url("/global-elements/images/business.svg") !important;
  background-size: 14px 14px !important;
  margin-right: 5px;
  filter: none !important;
}

.nav-utility .utility-links a#link-customer:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 9V7.5a5 5 0 0 1 10 0V9' stroke='%2316A34A' stroke-width='1.5' stroke-linecap='round'/%3E%3Crect x='2' y='8.5' width='2.5' height='4' rx='1' stroke='%2316A34A' stroke-width='1.4'/%3E%3Crect x='11.5' y='8.5' width='2.5' height='4' rx='1' stroke='%2316A34A' stroke-width='1.4'/%3E%3Cpath d='M12.5 12.5v.5a1.5 1.5 0 0 1-1.5 1.5H9' stroke='%2316A34A' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-size: 14px 14px !important;
  margin-right: 5px;
  filter: none !important;
}

.nav-utility .utility-links a#link-myusps:before {
  background-image: url("/global-elements/images/tracking.svg") !important;
  background-size: 14px 14px !important;
  margin-right: 5px;
  filter: none !important;
}

.global--navigation {
  background-color: #FFFFFF;
}

@media only screen and (max-width: 958px) {
  .global--navigation .mobile-header .mobile-logo img {
    height: 30px !important;
    width: auto !important;
    margin: 0 auto !important;
    padding: 10px 0 !important;
  }
}

@media only screen and (min-width: 959px) {
  .global--navigation {
    background: linear-gradient(to right, #FFFFFF 40%, #ECFDF5 41%) !important;
  }

  .global--navigation .global-logo {
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-end;
    vertical-align: bottom !important;
    height: 46px !important;
    padding-right: 14px !important;
    box-sizing: border-box !important;
  }

  .global--navigation .global-logo img {
    height: 46px !important;
    width: auto !important;
    max-width: 190px !important;
    display: block;
  }

  .global--navigation nav,
  .global--navigation nav:after,
  .global--navigation:after,
  .global--navigation nav ul.nav-list {
    background: #ECFDF5 !important;
  }

  .global--navigation nav ul.nav-list {
    border-top: 1px solid rgba(22, 163, 74, 0.14);
    border-bottom: 1px solid rgba(22, 163, 74, 0.18);
  }

  .global--navigation nav li.menuheader > a.menuitem:not(.nav-first-element) {
    color: #1F2937 !important;
  }

  .global--navigation nav li.menuheader:hover > a.menuitem:not(.nav-first-element),
  .global--navigation nav li.menuheader > a.menuitem.active:not(.nav-first-element) {
    background: #FFFFFF !important;
    color: #16A34A !important;
    box-shadow: inset 0 -3px 0 #22C55E;
  }

  /* Angled Quick Tools Trapezoid */
  .global--navigation nav li.qt-nav > a.nav-first-element,
  .global--navigation nav ul li a.nav-first-element {
    color: #FFFFFF !important;
  }

  .global--navigation nav ul li a.nav-first-element:before {
    background: #16A34A !important;
  }

  .global--navigation nav ul li a.nav-first-element:after {
    background: #22C55E !important;
  }

  .global--navigation nav ul li.qt-nav:hover a.nav-first-element,
  .global--navigation nav ul li a.nav-first-element:hover,
  .global--navigation nav ul li a.nav-first-element:focus,
  .global--navigation nav ul li a.nav-first-element.active {
    color: #FFFFFF !important;
  }

  .global--navigation nav ul li.qt-nav:hover a.nav-first-element:before,
  .global--navigation nav ul li a.nav-first-element:hover:before,
  .global--navigation nav ul li a.nav-first-element:focus:before,
  .global--navigation nav ul li a.nav-first-element.active:before {
    background: #1F2937 !important;
  }

  /* Megamenu Open Dropdown Surface */
  .global--navigation nav li.menuheader > div {
    background: #ECFDF5 !important;
    border-bottom: 3px solid #16A34A !important;
  }

  .global--navigation nav li.menuheader > div h3 {
    color: #1F2937 !important;
    border-bottom-color: rgba(31, 41, 55, 0.18) !important;
  }

  .global--navigation nav li.menuheader > div ul li a,
  .global--navigation .qt-nav ul li a p {
    color: #1F2937 !important;
  }

  .global--navigation nav li.menuheader > div ul li a:hover,
  .global--navigation .qt-nav ul li a:hover p {
    color: #16A34A !important;
  }
}

/* Primary, Secondary, and Text Link Buttons */
.button--primary,
a.button--primary,
button.button--primary,
input.button--primary {
  background-color: #16A34A !important;
  border: 1px solid #16A34A !important;
  color: #FFFFFF !important;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button--primary:hover,
.button--primary:focus,
a.button--primary:hover,
a.button--primary:focus,
.no-touch .button--primary:hover,
.no-touch .button--primary:focus {
  background-color: #1F2937 !important;
  border-color: #1F2937 !important;
  color: #FFFFFF !important;
}

.button--secondary,
a.button--secondary {
  background-color: #FFFFFF !important;
  border: 1px solid #16A34A !important;
  color: #16A34A !important;
}

.button--secondary:hover,
.button--secondary:focus,
a.button--secondary:hover,
a.button--secondary:focus {
  background-color: #ECFDF5 !important;
  border-color: #1F2937 !important;
  color: #1F2937 !important;
}

.button--link,
a.button--link,
.usps-updates .button--link {
  color: #16A34A !important;
}

.button--link:hover,
.button--link:focus,
a.button--link:hover,
a.button--link:focus {
  color: #1F2937 !important;
}

/* Hero Angled Ribbon & Mobile Hero */
.jumbotron.premium .article,
.jumbotron.premium .article:after,
.featured-usps .row .article h3,
.featured-usps .row .article h3:after {
  /* Handled cleanly alongside welcome-rebrand.css */
}

.jumbotron.premium.track-opt p a {
  background-color: transparent !important;
  border: 1.5px solid #FFFFFF !important;
  color: #FFFFFF !important;
}

.jumbotron.premium.track-opt p a:hover,
.jumbotron.premium.track-opt p a:focus {
  background-color: #FFFFFF !important;
  color: #1F2937 !important;
}

/* Quick Tools Bar & Search Inputs */
.quicktools,
.quicktools-featured,
.quicktools-list {
  background-color: #ECFDF5 !important;
}

.quicktools h2 {
  color: #1F2937 !important;
}

.quicktools p {
  color: #1F2937 !important;
}

input#home-input,
input#home-input-mob,
input#tracking-code-input,
.global--navigation input.global-header--search-track {
  border-color: #16A34A !important;
  color: #1F2937 !important;
}

input#home-input:focus,
input#home-input-mob:focus,
input#tracking-code-input:focus,
.global--navigation input.global-header--search-track:focus {
  outline: 2px solid #22C55E !important;
  outline-offset: 0;
}

/* Transit Standards Banner Harmonized to DPostal Palette (#1F2937 + #16A34A, zero blue image) */
.holiday-container {
  background-image: linear-gradient(135deg, #1F2937 0%, #16A34A 100%) !important;
  background-color: #1F2937 !important;
  background-position: top center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}

.holiday-container .container-fluid:first-of-type {
  background: rgba(31, 41, 55, 0.45) !important;
}

a.holiday-button {
  border-color: #22C55E !important;
}

a.holiday-button:hover,
a.holiday-button:focus {
  background: #22C55E !important;
  border-color: #22C55E !important;
  color: #1F2937 !important;
}

.holiday-mailing a.holiday-button,
.holiday-mailing .holiday-button {
  background: #22C55E !important;
  color: #1F2937 !important;
  border: 1px solid #22C55E !important;
}

.holiday-mailing a.holiday-button:hover,
.holiday-mailing a.holiday-button:focus,
.holiday-mailing .holiday-button:hover,
.holiday-mailing .holiday-button:focus {
  background: #FFFFFF !important;
  color: #1F2937 !important;
  border-color: #FFFFFF !important;
}

/* In-Page Postmarks Alert */
.inpage-alert,
.inpage-alert .alert-p {
  background-color: #ECFDF5 !important;
  color: #1F2937 !important;
}

.inpage-alert .alert-p {
  border-left: 8px solid #16A34A !important;
}

/* Featured Products & Carousel */
.featured-usps h2,
.carouselslide h2.header-2,
.usps-updates h2.header-2,
.usps-updates h3.header-3 {
  color: #1F2937 !important;
}

.carousel-indicators li {
  border-color: #16A34A !important;
}

.carousel-indicators li.active {
  background-color: #16A34A !important;
}

/* Floating Scroll Down Indicator (replaces red circle PNG with #16A34A / #22C55E SVG) */
.false-arrow.opt3.active,
.false-arrow.opt3 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Ccircle cx='30' cy='30' r='28' fill='%2316A34A' stroke='%2322C55E' stroke-width='2'/%3E%3Cpath d='M30 19v20M22 31l8 8 8-8' fill='none' stroke='%23FFFFFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-size: 56px 56px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

/* Global Footer */
#global-footer--wrap,
.global-footer--wrap,
footer.global-footer {
  background-color: #ECFDF5 !important;
}

#global-footer--wrap {
  border-top: 3px solid #16A34A !important;
}

.global-footer--logo-link {
  background: none !important;
  width: auto !important;
  height: auto !important;
}

.global-footer--navigation-category {
  color: #16A34A !important;
}

.global-footer--navigation-options li a {
  color: #1F2937 !important;
}

.global-footer--navigation-options li a:hover {
  color: #16A34A !important;
  text-decoration: underline;
}

.global-footer--copyright {
  color: #1F2937 !important;
}

/* Global Mobile Responsiveness Safeguards (320px+) */
input.search--track-input,
.input-group input.form-control {
  min-width: 0;
}

@media (max-width: 575px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }
  .quicktools-featured .col-4,
  .quicktools-list .col-4 {
    padding-left: 6px;
    padding-right: 6px;
  }
  .quicktools .article h3,
  .quicktools-featured .article h3,
  .quicktools .article h3 a.button--link {
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: break-word;
    font-size: 13px !important;
    line-height: 17px !important;
  }
  .holiday-center > div {
    padding: 28px 12px;
  }
  .holiday-mailing {
    padding: 28px 12px 0;
  }
}
