/* Футер default-теми.
   Макет: Figma «Sky Market new tamplate», node 1539-29227
   (desktop 1140 + mobile 393).

   Раніше ці правила жили у <style> усередині footer.php і contacts.php —
   тобто повз asset() і без версіонування (див. CLAUDE.md, Static assets).
   Підключати після style.css: .footer/.copyright перебивають тамтешні. */

.footer {
  margin-top: 15px;
  padding: 16px 0 24px;
  border-top: 1px solid #e2e2e2;
  background-color: #fff;
  color: #333;
  font-size: 14px;
}

/* Перемикання торгової точки ховає рядки через атрибут hidden, а тутешні
   display: flex його б перебили — hidden має лишатись сильнішим. */
.footer [hidden] {
  display: none !important;
}

/* --- Три колонки: контакти / Покупцям / Графік роботи ------------------- */

.footer__cols {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid #d9d9d9;
}

.footer__col--contacts {
  flex: 0 1 332px;
}

.footer__col--links {
  flex: 0 1 auto;
}

.footer__col--schedule {
  flex: 0 1 322px;
  min-width: 260px;
}

.footer__col-title {
  margin: 0 0 2px;
  padding: 2px 0;
  color: #101828;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
}

/* --- Лого + назва магазину --------------------------------------------- */

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer__logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.footer__store-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
}

.footer__store-name a {
  color: #212529;
  text-decoration: none;
}

.footer__store-name a:hover {
  color: #000;
}

/* --- Назва торгової точки + статус -------------------------------------- */

.footer__point-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer__point-name {
  margin: 0;
  color: #212529;
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
  word-break: break-word;
}

.footer__status {
  padding: 6px 12px;
  border-radius: 6px;
  background-color: #212529;
  color: #ebebed;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
}

.footer__status--open {
  background-color: var(--primary-color);
  color: #fff;
}

/* --- Адреса, телефони, пошта -------------------------------------------- */

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 16px;
}

.footer__list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #555;
  font-weight: 500;
  line-height: 20px;
}

.footer__list-item svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

.footer__list-item a {
  color: inherit;
  text-decoration: none;
}

.footer__list-item a:hover {
  color: #212529;
  text-decoration: underline;
}

/* --- Кнопки «Зателефонувати» / «Маршрут» -------------------------------- */

.footer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.footer__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.footer__btn svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

.footer__btn--call {
  background-color: #212529;
  color: #fff;
}

.footer__btn--call:hover {
  background-color: #000;
  color: #fff;
}

.footer__btn--route {
  background-color: #f4f4f4;
  color: #1e2939;
}

.footer__btn--route:hover {
  background-color: #e8e8e8;
  color: #1e2939;
}

/* --- Соцмережі (розмітка у contacts.php) -------------------------------- */

.social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 20px;
  padding-top: 12px;
}

.social-link {
  color: #212529;
  font-size: 22px;
  line-height: 1;
  text-decoration: none;
  transition: color 0.2s ease;
}

.social-link:hover {
  color: var(--primary-color);
}

/* --- Колонка «Покупцям» -------------------------------------------------- */

.footer__links {
  display: flex;
  flex-direction: column;
}

.footer__links a {
  padding: 7px 0;
  color: #333;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
}

.footer__links a:hover {
  color: #212529;
  text-decoration: underline;
}

/* --- Колонка «Графік роботи» --------------------------------------------- */

.footer__schedule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
}

.footer__schedule-day {
  color: #333;
  font-weight: 500;
  line-height: 20px;
}

.footer__schedule-hours {
  color: #555;
  line-height: 20px;
  white-space: nowrap;
}

.footer__schedule-row--today .footer__schedule-day {
  color: var(--primary-color);
  font-weight: 600;
}

.footer__schedule-row--today .footer__schedule-hours {
  color: var(--primary-color);
  font-weight: 500;
}

/* --- Інші торгові точки -------------------------------------------------- */

.footer__points {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  border-bottom: 1px solid #d9d9d9;
}

.footer__points-title {
  flex: 0 0 155px;
  margin: 0;
  color: #555;
  font-weight: 500;
  line-height: 20px;
}

/* Пілюлі не переносяться, а скролять: мережа на пів сотні точок інакше
   розпихає футер на кілька екранів. У макеті список так само скролиться. */
.footer__points-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.footer__points-list::-webkit-scrollbar {
  display: none;
}

.footer__point {
  flex: 0 0 auto;
  padding: 16px;
  border: none;
  border-radius: 80px;
  background-color: #f4f4f4;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.footer__point:hover {
  background-color: #e8e8e8;
}

.footer__point--active,
.footer__point--active:hover {
  background-color: var(--primary-color);
  color: #fff;
  cursor: default;
}

/* style.css гасить outline на всіх button — повертаємо фокус-кільце явно,
   інакше пілюлі невидимі для клавіатурної навігації. */
.footer__point:focus-visible {
  outline: 2px solid var(--primary-color) !important;
  outline-offset: 2px;
}

/* --- Платіжні системи ---------------------------------------------------- */

.footer_pay {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 16px 0;
}

.footer_pay_item {
  width: 56px;
  height: 36px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.footer_pay_item--mastercard {
  background-image: url("/assets/images/mastercard.svg");
}

.footer_pay_item--visa {
  background-image: url("/assets/images/visa.svg");
}

.footer_pay_item--portmone {
  background-image: url("/assets/images/portmone.svg");
}

.footer_pay_item--privat {
  background-image: url("/assets/images/privat.svg");
}

.footer_pay_item--liqpay {
  background-image: url("/assets/images/liqpay.svg");
}

/* --- Copyright ----------------------------------------------------------- */

.copyright {
  margin: 0;
  padding-top: 16px;
  color: #555;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}

.copyright a {
  color: var(--primary-color);
  text-decoration: none;
}

.copyright a:hover {
  text-decoration: underline;
}

/* --- Мобільна версія ----------------------------------------------------- */

@media (max-width: 767.98px) {
  .footer__cols {
    flex-direction: column;
    gap: 24px;
  }

  .footer__col--contacts,
  .footer__col--links,
  .footer__col--schedule {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }

  .footer__actions .footer__btn {
    flex: 1 1 0;
    padding: 12px 16px;
  }

  .footer__points {
    gap: 12px;
  }

  /* У макеті мобільний рядок пілюль без підпису — самі пілюлі. */
  .footer__points-title {
    display: none;
  }
}
