/*
 * Dealer finder with map (template eq_dealer_map.php).
 * Loaded after the global custom-style.css by that template only.
 * New markup uses ft-* classes, so the global .table-default rules do not apply here.
 */

body.page-template-eq_dealer_map .body-container {
  overflow: clip;
}

.ft-section .ft-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  margin-top: 35px;
}

/* Map (left on desktop) */
.ft-section .ft-map {
  position: sticky;
  top: 120px;
  height: calc(100vh - 160px);
  min-height: 360px;
  max-height: 760px;
  border: 1px solid #c4cfd6;
  background: #ebedf3;
}
.ft-section .ft-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.ft-section .ft-map-canvas {
  width: 100%;
  height: 100%;
}
.ft-section .ft-map button::before,
.ft-section .ft-map button::after {
  content: none;
  display: none;
}
.ft-section .ft-map .ft-info {
  max-width: 240px;
  font-size: 14px;
  line-height: 1.45;
  color: #17262f;
}
.ft-section .ft-map .ft-info strong {
  display: block;
  margin-bottom: 4px;
}
.ft-section .ft-map [hidden] {
  display: none;
}
.ft-section .ft-map-note {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 28px;
  z-index: 2;
  margin: 0;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.45;
  color: #17262f;
  background: rgba(255, 255, 255, 0.95);
  border-left: 4px solid #243aff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.ft-section .ft-map-open {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.4;
  color: #fff;
  background: #243aff;
  text-decoration: none;
}
.ft-section .ft-map-open::before,
.ft-section .ft-map-open::after {
  content: none;
  display: none;
}
.ft-section .ft-map-open:hover,
.ft-section .ft-map-open:focus-visible {
  color: #fff;
  background: #121c22;
}

/* Table (right on desktop) */
.ft-section .ft-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid #222;
  table-layout: fixed;
}
.ft-section .ft-table thead th {
  height: 70px;
  padding: 10px 20px;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.5;
  color: #fff;
  background-color: #121c22;
  border: 0;
  text-align: left;
}
.ft-section .ft-table .ft-col-country {
  width: 32%;
  text-align: center;
}
.ft-section .ft-table tbody tr {
  border-bottom: 1px solid #c4cfd6;
  cursor: pointer;
  transition: background-color 0.2s;
}
.ft-section .ft-table tbody tr:hover {
  background-color: #f5f6fa;
}
.ft-section .ft-table .ft-pick {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: inherit;
  text-align: center;
  word-break: keep-all;
  background: none;
  border: 0;
  cursor: pointer;
}
.ft-section .ft-table .ft-pick::before,
.ft-section .ft-table .ft-pick::after {
  content: none;
  display: none;
}
.ft-section .ft-table .ft-pick:focus-visible {
  outline: 2px solid #243aff;
  outline-offset: 4px;
}
.ft-section .ft-table tbody tr.is-active {
  background-color: #ebedf3;
  box-shadow: inset 4px 0 0 #243aff;
}
.ft-section .ft-table tbody th,
.ft-section .ft-table tbody td {
  padding: 24px 20px;
  border: 0;
  vertical-align: middle;
  font-size: 1.6rem;
  line-height: 1.5;
  color: #17262f;
}
.ft-section .ft-table .ft-country {
  font-weight: 600;
  text-align: center;
  word-break: keep-all;
}

/* Details column: one line per item, icon + text */
.ft-section .ft-table .ft-lines {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ft-section .ft-table .ft-lines > li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 0;
}
.ft-section .ft-table .ft-lines > li + li {
  margin-top: 8px;
}
.ft-section .ft-table .ft-lines > li::before,
.ft-section .ft-table .ft-lines > li::after {
  content: none;
  display: none;
}
.ft-section .ft-table .ft-ico {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: #243aff;
}
.ft-section .ft-table .ft-name span {
  font-weight: 600;
}
.ft-section .ft-table .ft-line span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.ft-section .ft-table .ft-link-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ft-section .ft-table .ft-link-icons a {
  display: inline-block;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  background-size: cover;
  background-repeat: no-repeat;
}
.ft-section .ft-table .ft-link-icons a::before,
.ft-section .ft-table .ft-link-icons a::after {
  content: none;
  display: none;
}
.ft-section .ft-table .ft-link-icons a.find_home {
  background-image: url(/wp-content/uploads/2023/04/find-icon-01.png);
}
.ft-section .ft-table .ft-link-icons a.find_instagram {
  background-image: url(/wp-content/uploads/2023/04/find-icon-02.png);
}
.ft-section .ft-table .ft-link-icons a.find_facebook {
  background-image: url(/wp-content/uploads/2023/04/find-icon-03.png);
}
.ft-section .ft-table .ft-link-icons a.find_youtube {
  background-image: url(/wp-content/uploads/2023/04/find-icon-04.png);
}

/* Tablet and mobile: map on top, table below */
@media (max-width: 1024px) {
  .ft-section .ft-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .ft-section .ft-map {
    position: relative;
    top: auto;
    height: 320px;
    min-height: 0;
    scroll-margin-top: 90px;
  }
  .ft-section .ft-table thead th {
    height: 50px;
    padding: 10px 14px;
  }
  .ft-section .ft-table tbody th,
  .ft-section .ft-table tbody td {
    padding: 18px 14px;
  }
}

@media (max-width: 640px) {
  .ft-section .ft-table .ft-col-country {
    width: 30%;
  }
  .ft-section .ft-table thead th,
  .ft-section .ft-table tbody th,
  .ft-section .ft-table tbody td {
    font-size: 14px;
  }
  .ft-section .ft-table tbody th,
  .ft-section .ft-table tbody td {
    padding: 16px 10px;
  }
  .ft-section .ft-table .ft-ico {
    flex-basis: 16px;
    width: 16px;
    height: 16px;
  }
  .ft-section .ft-table .ft-lines > li {
    gap: 6px;
  }
  .ft-section .ft-table .ft-link-icons a {
    width: 20px;
    height: 20px;
  }
}
