/* ==============================================================================
   Glossier Cosmetics — Official Footer Stylesheet (1:1 with glossier.com)
   ============================================================================== */

.gl-footer {
  background-color: #faf2f4;
  color: #000000;
  font-family: var(--gl-font-body, 'Apercu', 'Gill Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  padding: 48px 0 32px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  border-top: none !important;
  border: none !important;
  margin-top: 0 !important;
}

.gl-footer__container {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

/* ==============================================================================
   1. Top Row: Message + Newsletter Subscription
   ============================================================================== */

.gl-footer__top {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  width: 100%;
  box-sizing: border-box;
}

.gl-footer__top-message {
  flex: 0 1 454px;
  max-width: 480px;
  font-size: 14px;
  line-height: 1.4;
  color: #000000;
  margin: 0;
  padding: 0;
}

.gl-footer__top-newsletter {
  flex: 0 1 454px;
  max-width: 480px;
  width: 100%;
  box-sizing: border-box;
}

.gl-footer__newsletter-form {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.gl-footer__newsletter-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  position: relative;
}

.gl-footer__newsletter-input-wrap {
  flex: 1 1 auto;
  position: relative;
}

.gl-footer__newsletter-input {
  width: 100%;
  height: 46px;
  background-color: #ffffff;
  border: 1px solid #dedede;
  border-right: none;
  border-radius: 0;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  color: #000000;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease-in-out;
}

.gl-footer__newsletter-input:focus {
  border-color: #000000;
}

.gl-footer__newsletter-input::placeholder {
  color: #707070;
  opacity: 1;
}

.gl-footer__newsletter-btn {
  flex: 0 0 auto;
  height: 46px;
  min-height: 46px;
  padding: 8px 24px;
  background-color: #ffffff;
  color: #000000;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  border: none !important;
  border-radius: 0;
  outline: none !important;
  cursor: pointer;
  box-sizing: border-box;
  position: relative;
  user-select: none;
  background-size: 0 0, 100% 1px, 0 0, 1px 100%;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  background-image: none,
                    linear-gradient(to right, #000000 50%, #000000 50%),
                    none,
                    linear-gradient(to bottom, #000000 50%, #000000 50%);
  transition: background-color 0.2s ease-in-out;
}

.gl-footer__newsletter-btn:hover,
.gl-footer__newsletter-btn:focus {
  background-color: #ffffff;
  background-size: 5px 1px, 5px 1px, 1px 5px, 1px 5px;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  animation: 1.5s linear infinite marching-ants-full-1;
  background-image: linear-gradient(to right, #000000 50%, transparent 50%),
                    linear-gradient(to right, #000000 50%, transparent 50%),
                    linear-gradient(to bottom, #000000 50%, transparent 50%),
                    linear-gradient(to bottom, #000000 50%, transparent 50%);
}

.gl-footer__newsletter-note {
  font-size: 12px;
  line-height: 1.4;
  color: #666666;
  margin-top: 8px;
  margin-bottom: 0;
}

.gl-footer__newsletter-note a {
  color: #666666;
  text-decoration: underline;
}

.gl-footer__newsletter-feedback {
  display: none;
  font-size: 13px;
  margin-top: 8px;
  color: #00ac5a;
}

/* ==============================================================================
   2. Desktop Navigation Grid (6 Equal Columns, No Center Void)
   ============================================================================== */

.gl-footer__nav {
  margin-top: 48px;
  width: 100%;
  box-sizing: border-box;
}

.gl-footer__nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
}

.gl-footer__nav-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gl-footer__nav-hdg {
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.04px;
  text-transform: uppercase;
  font-weight: 400;
  color: #000000;
  margin: 0 0 16px 0;
  padding: 0;
}

.gl-footer__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.gl-footer__nav-item {
  line-height: 20px;
  padding-bottom: 8px;
}

.gl-footer__nav-item:last-child {
  padding-bottom: 0;
}

.gl-footer a,
.gl-footer a:visited,
.gl-footer a:hover,
.gl-footer a:focus {
  color: #000000;
}

.gl-footer__nav-link {
  font-size: 14px;
  line-height: 20px;
  color: #000000;
  text-decoration: none;
  transition: color 0.15s ease-in-out;
  cursor: pointer;
}

.gl-footer__nav-link:hover,
.gl-footer__nav-link:focus,
.gl-footer__nav-link:active {
  text-decoration: underline;
  color: #000000;
}

/* ==============================================================================
   3. Mobile Navigation Accordion (Phone Only: <= 767px)
   ============================================================================== */

.gl-footer__mobile-nav {
  display: none;
  width: 100%;
  margin-top: 36px;
}

.gl-footer__acc-item {
  width: 100%;
  border-top: 1px solid #000000;
}

.gl-footer__acc-item:last-child {
  border-bottom: 1px solid #000000;
}

.gl-footer__acc-btn {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 0;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  text-align: left;
}

.gl-footer__acc-title {
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.04px;
  text-transform: uppercase;
  color: #000000;
  font-family: inherit;
  font-weight: 400;
}

.gl-footer__acc-icon {
  width: 14px;
  height: 14px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gl-footer__acc-icon::before,
.gl-footer__acc-icon::after {
  content: '';
  position: absolute;
  background-color: #000000;
  transition: transform 0.2s ease-in-out;
}

/* Horizontal line of plus/minus */
.gl-footer__acc-icon::before {
  width: 12px;
  height: 1.5px;
}

/* Vertical line of plus */
.gl-footer__acc-icon::after {
  width: 1.5px;
  height: 12px;
}

/* When expanded, vertical line collapses into a minus */
.gl-footer__acc-item.is-active .gl-footer__acc-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

.gl-footer__acc-menu {
  display: none;
  padding: 4px 0 18px;
}

.gl-footer__acc-item.is-active .gl-footer__acc-menu {
  display: block;
}

.gl-footer__acc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.gl-footer__acc-link {
  font-size: 14px;
  line-height: 20px;
  color: #000000;
  text-decoration: none;
  display: block;
  padding: 6px 0;
}

.gl-footer__acc-link:hover {
  text-decoration: underline;
}

/* Arrow icon for direct store link */
.gl-footer__acc-icon--arrow {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gl-footer__acc-icon--arrow::after {
  content: '→';
  font-size: 16px;
  line-height: 1;
  color: #000000;
}

/* ==============================================================================
   4. Bottom Sub-Bar: Brand Disclaimer & Copyright
   ============================================================================== */

.gl-footer__bottom-bar {
  margin-top: 56px;
  padding-top: 0;
  width: 100%;
  box-sizing: border-box;
}

.gl-footer__copyright-text {
  width: 100%;
  max-width: 1040px;
}

.gl-footer__copyright-text p {
  color: #000000;
  font-family: var(--gl-font-body, 'Apercu', 'Gill Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  margin: 0;
  padding: 0;
}

/* ==============================================================================
   5. Responsive Breakpoints
   ============================================================================== */

/* Tablet & Intermediate Screens (768px - 1199px) */
@media only screen and (max-width: 1199px) and (min-width: 768px) {
  .gl-footer__nav-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 36px 24px;
  }

  .gl-footer__copyright-text {
    max-width: 100%;
  }
}

/* Mobile Screens (<= 767px) */
@media only screen and (max-width: 767px) {
  .gl-footer {
    padding: 32px 0 24px;
  }

  .gl-footer__container {
    padding: 0 12px;
  }

  .gl-footer__top {
    flex-direction: column;
    gap: 24px;
  }

  .gl-footer__top-message,
  .gl-footer__top-newsletter {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .gl-footer__newsletter-row {
    flex-direction: row;
  }

  .gl-footer__desktop-nav {
    display: none !important;
  }

  .gl-footer__mobile-nav {
    display: block !important;
  }

  .gl-footer__bottom-bar {
    margin-top: 36px;
  }

  .gl-footer__copyright-text p {
    text-align: center;
    font-size: 13px;
    line-height: 1.4;
  }
}
