/* ==========================================================
   Footer override (Multikart, RTL)
   Colors come from the design tokens in style.css.
   Load this file AFTER style.css.
   ========================================================== */

/* ----------------------------------------------------------
   Local aliases (map to design tokens, no new values)
   ---------------------------------------------------------- */
footer.footer-light {
  --ftr-brand: var(--brand-primary);
  --ftr-accent: var(--brand-secondary);
  --ftr-decor: var(--brand-accent);
  --ftr-text: var(--text-secondary);
  --ftr-text-strong: var(--text-body);
  --ftr-line: var(--border-subtle);
  --ftr-field-border: var(--border-color);

  background: var(--surface-background);
  border-top: 1px solid var(--ftr-line);
}

/* ----------------------------------------------------------
   Body copy and spacing
   ---------------------------------------------------------- */
footer.footer-light .footer-content p {
  font-size: 14px;
  line-height: 2;
  text-align: start;
  color: var(--ftr-text);
  margin-bottom: 18px;
}

footer.footer-light .footer-logo {
  margin-bottom: 20px;
}

footer.footer-light .footer-logo img {
  max-height: 48px;
  width: auto;
}

footer.footer-light .footer-theme.partition-f > div {
  margin-bottom: 0;
}

/* ----------------------------------------------------------
   Column titles
   ---------------------------------------------------------- */
footer.footer-light .footer-title h4 {
  position: relative;
  color: var(--ftr-brand);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0;
  padding-bottom: 12px;
  margin-bottom: 18px;
}

/* Decorative underline (non-text, so low contrast is acceptable) */
footer.footer-light .footer-title h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: var(--ftr-decor);
}

/* ----------------------------------------------------------
   Column links (RTL underline animation)
   ---------------------------------------------------------- */
footer.footer-light .footer-content ul li {
  display: block;
  line-height: 1.9;
  padding-top: 0;
  margin-bottom: 10px;
}

footer.footer-light .footer-content ul li:last-child {
  margin-bottom: 0;
}

footer.footer-light .footer-content ul li a {
  position: relative;
  display: inline-block;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ftr-text);
  transition:
    color 0.25s ease,
    padding 0.25s ease;
}

/* In RTL, inset-inline-start is the right edge, so the line grows from the right */
footer.footer-light .footer-content ul li a::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background-color: var(--ftr-decor);
  transition: width 0.3s ease;
}

footer.footer-light .footer-content ul li a:hover,
footer.footer-light .footer-content ul li a:focus-visible {
  color: var(--ftr-brand);
  padding-inline-start: 4px;
}

footer.footer-light .footer-content ul li a:hover::before,
footer.footer-light .footer-content ul li a:focus-visible::before {
  width: 100%;
}

/* ----------------------------------------------------------
   About text and expand/collapse toggle
   ---------------------------------------------------------- */
footer.footer-light .footer-about {
  font-size: 14px;
  line-height: 2;
  text-align: start;
  color: var(--ftr-text);
  margin-bottom: 10px;
}

footer.footer-light .footer-about.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

footer.footer-light .footer-about-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin-bottom: 18px;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.9;
  color: var(--ftr-brand);
  transition: opacity 0.2s ease;
}

footer.footer-light .footer-about-toggle:hover {
  opacity: 0.8;
}

footer.footer-light .footer-about-toggle i {
  font-size: 14px;
  transition: transform 0.25s ease;
}

footer.footer-light .footer-about-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

/* ----------------------------------------------------------
   Contact list
   ---------------------------------------------------------- */
footer.footer-light .contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ftr-text);
  line-height: 2.1;
  margin-bottom: 14px;
}

footer.footer-light .contact-list li i {
  flex-shrink: 0;
  color: var(--ftr-accent);
  font-size: 16px;
  margin-top: 4px;
}

footer.footer-light .contact-list li a,
footer.footer-light .contact-list li p {
  color: var(--ftr-text-strong);
  margin: 0;
  transition: color 0.2s ease;
}

footer.footer-light .contact-list li a:hover {
  color: var(--ftr-brand);
}

/* Phone and email stay LTR inside RTL layout */
footer.footer-light .contact-list li a[href^="tel:"],
footer.footer-light .contact-list li a[href^="mailto:"] {
  direction: ltr;
  unicode-bidi: embed;
}

/* ----------------------------------------------------------
   Social icons
   ---------------------------------------------------------- */
footer.footer-light .footer-social ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 0;
}

footer.footer-light .footer-social ul li {
  margin: 0 !important;
  padding: 0;
  display: inline-flex;
}

footer.footer-light .footer-social ul li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  line-height: 1;
  border-radius: 10px;
  background: var(--surface-card);
  border: 1px solid var(--ftr-field-border);
  color: var(--ftr-brand);
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

/* Set the icon color on <i> itself so no inherited or theme color overrides it */
footer.footer-light .footer-social ul li a i {
  color: var(--ftr-brand);
  font-size: 17px;
  line-height: 1;
  padding: 0;
  margin: 0;
  transition: color 0.25s ease;
}

footer.footer-light .footer-social ul li a:hover,
footer.footer-light .footer-social ul li a:focus-visible {
  background: var(--ftr-brand);
  border-color: var(--ftr-brand);
  transform: translateY(-3px);
}

footer.footer-light .footer-social ul li a:hover i,
footer.footer-light .footer-social ul li a:focus-visible i {
  color: var(--text-white);
}

/* Icons do not use the text underline */
footer.footer-light .footer-social ul li a::before {
  display: none;
}

/* ----------------------------------------------------------
   Newsletter block inside footer
   ---------------------------------------------------------- */
footer.footer-light .subscribe h4 {
  color: var(--ftr-brand);
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 10px;
}

footer.footer-light .subscribe p {
  color: var(--ftr-text);
  line-height: 2;
  margin-bottom: 0;
}

footer.footer-light .subscribe-form .form-control {
  line-height: 1.8;
  text-align: right;
  border: 1px solid var(--ftr-field-border);
  border-radius: 10px;
  background: var(--surface-card);
  padding: 12px 16px;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

footer.footer-light .subscribe-form .form-control:focus {
  border-color: var(--ftr-brand);
  box-shadow: var(--ds-shadow-focus);
  outline: none;
}

footer.footer-light .subscribe-form .btn-solid {
  background: var(--ftr-brand);
  border: none;
  border-radius: 10px;
  padding: 11px 32px;
  line-height: 1.8;
  transition:
    background 0.25s ease,
    transform 0.25s ease;
}

footer.footer-light .subscribe-form .btn-solid:hover {
  background: var(--surface-card);
  color: var(--ftr-brand);
  box-shadow: var(--ds-shadow-md);
  transform: translateY(-2px);
}

/* ----------------------------------------------------------
   Sub-footer (copyright bar)
   ---------------------------------------------------------- */
footer.footer-light .sub-footer {
  background: var(--ftr-brand);
}

footer.footer-light .sub-footer > .container > .row {
  padding: 14px 0;
}

footer.footer-light .sub-footer .footer-end p {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: color-mix(in srgb, var(--text-white) 85%, transparent);
  font-size: 13px;
  line-height: 2;
  margin: 0;
}

/* ----------------------------------------------------------
   Keyboard focus
   ---------------------------------------------------------- */
footer.footer-light a:focus-visible,
footer.footer-light .footer-about-toggle:focus-visible {
  outline: 2px solid var(--ftr-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ----------------------------------------------------------
   Responsive: tablet and below
   ---------------------------------------------------------- */
@media (max-width: 991px) {
  footer.footer-light .footer-theme.partition-f > div {
    margin-bottom: 28px;
  }

  footer.footer-light .footer-title h4 {
    margin-bottom: 14px;
  }

  footer.footer-light .footer-content p {
    line-height: 1.9;
  }

  footer.footer-light .subscribe {
    text-align: center;
    margin-bottom: 20px;
  }

  footer.footer-light .subscribe-form {
    justify-content: center;
  }

  /* Mobile accordion: selector depends on theme markup, verify with HTML */
  footer.footer-light .footer-title.active .footer-content {
    padding-top: 10px;
  }
}

/* Responsive: phone */
@media (max-width: 577px) {
  footer.footer-light .footer-content ul li {
    margin-bottom: 8px;
  }

  footer.footer-light .footer-social ul li a {
    width: 34px;
    height: 34px;
  }

  footer.footer-light .subscribe-form .form-group,
  footer.footer-light .subscribe-form .form-control,
  footer.footer-light .subscribe-form .btn-solid {
    width: 100%;
    margin-inline: 0;
  }

  /* Override the theme's text-nowrap on addresses */
  footer.footer-light .contact-list li p {
    white-space: normal !important;
  }
}

/* ----------------------------------------------------------
   Reduced motion
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  footer.footer-light .footer-content ul li a,
  footer.footer-light .footer-content ul li a::before,
  footer.footer-light .footer-social ul li a,
  footer.footer-light .footer-about-toggle i {
    transition: none;
  }

  footer.footer-light .footer-social ul li a:hover {
    transform: none;
  }
}

/* ==========================================================
   Newsletter form (global, not footer-specific)
   ========================================================== */
.subscribe-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.subscribe-form .form-group {
  flex: 1 1 220px;
  min-width: 0;
  margin: 0;
}

.subscribe-form .form-control {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.subscribe-form .btn {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}

/* ----------------------------------------------------------
   Status message (success / error)
   ---------------------------------------------------------- */
.newsletter-message-container {
  flex: 0 0 100%;
  order: -1;
  display: flex;
  align-items: center;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
  max-height: 0;
}

.newsletter-message-container.active {
  max-height: 60px;
}

.newsletter-message {
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: clamp(12px, 3.2vw, 13px);
  line-height: 1.7;
  text-align: right;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition:
    opacity 0.3s ease-in-out,
    transform 0.3s ease-in-out,
    visibility 0.3s ease-in-out;
}

.newsletter-message.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.newsletter-message.success {
  background-color: color-mix(
    in srgb,
    var(--color-success) 12%,
    var(--surface-card)
  );
  color: var(--color-success);
  border: 1px solid color-mix(in srgb, var(--color-success) 30%, transparent);
}

.newsletter-message.error {
  background-color: color-mix(
    in srgb,
    var(--color-error) 10%,
    var(--surface-card)
  );
  color: var(--color-error);
  border: 1px solid color-mix(in srgb, var(--color-error) 30%, transparent);
}

/* Phone: stacked, full-width button */
@media (max-width: 575.98px) {
  .subscribe-form {
    flex-direction: column;
    align-items: stretch;
  }

  .subscribe-form .form-group,
  .subscribe-form .btn {
    flex: 1 1 auto;
    width: 100%;
  }

  .subscribe-form .btn {
    white-space: normal;
    padding: 10px 15px;
  }
}

/* Very small phones */
@media (max-width: 400px) {
  .subscribe-form .form-control {
    font-size: 14px;
    padding: 8px 12px;
  }

  .subscribe-form .btn {
    font-size: 14px;
    padding: 8px 12px;
  }
}
