/* DAMATRIP native accommodation module. All rules stay within its root. */
.dama-housing {
  --dh-red: #C9353F;
  --dh-green: #1FC375;
  --dh-ink: #353535;
  --dh-gray: #F8F8F8;
  --dh-border: #e5e5e5;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--dh-border);
  color: var(--dh-ink);
  font: inherit;
  line-height: 1.6;
  min-width: 0;
  width: 100%;
  scroll-margin-top: 110px;
}

.dama-housing *,
.dama-housing *::before,
.dama-housing *::after {
  box-sizing: border-box;
}

.dama-housing [hidden] {
  display: none !important;
}

.dama-housing > h3 {
  margin: 0 0 8px;
  color: var(--dh-ink);
  font-family: inherit;
  font-size: 25px;
  line-height: 1.35;
}

.dama-housing > p {
  margin: 0 0 18px;
  color: #656565;
  font-size: 14px;
}

.dama-housing .dh-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 16px;
  min-width: 0;
}

.dama-housing .dh-controls > button {
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid var(--dh-border);
  border-radius: 8px;
  background: #fff;
  color: var(--dh-ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.dama-housing .dh-controls > button:hover {
  border-color: var(--dh-red);
}

.dama-housing .dh-controls > button.is-active,
.dama-housing .dh-controls > button[aria-pressed="true"] {
  border-color: var(--dh-red);
  background: #fff3f4;
  color: var(--dh-red);
}

.dama-housing .dh-controls select {
  max-width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--dh-border);
  border-radius: 8px;
  background: #fff;
  color: var(--dh-ink);
  font: inherit;
}

.dama-housing .dh-location {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--dh-border);
  border-radius: 10px;
  background: var(--dh-gray);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.dama-housing .dh-location p {
  margin: 4px 0;
}

.dama-housing .dh-location summary,
.dama-housing .dh-location > details > summary {
  color: var(--dh-ink);
  font-weight: 600;
  cursor: pointer;
}

.dama-housing .dh-location details[open] > summary,
.dama-housing details.dh-location[open] > summary {
  margin-bottom: 8px;
}

.dama-housing .dh-location-note {
  margin: 8px 0 0;
  padding-left: 10px;
  border-left: 3px solid var(--dh-red);
  color: #744047;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.dama-housing .dh-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 42px;
  max-width: 100%;
  padding: 9px 15px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  white-space: normal;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.dama-housing .dh-button.btn-green {
  border-color: var(--dh-green);
  background: var(--dh-green);
  color: #173f2b;
}

.dama-housing .dh-button.btn-outline {
  border-color: #d8d8d8;
  background: #fff;
  color: var(--dh-ink);
}

.dama-housing .dh-button:disabled,
.dama-housing .dh-route-button:disabled {
  cursor: wait;
  opacity: .65;
}

.dama-housing .dh-button:focus-visible,
.dama-housing .dh-link:focus-visible,
.dama-housing .dh-route-button:focus-visible,
.dama-housing .dh-controls button:focus-visible,
.dama-housing .dh-sort button:focus-visible,
.dama-housing .dh-map-details > summary:focus-visible,
.dama-housing .dh-location summary:focus-visible {
  outline: 2px solid var(--dh-red);
  outline-offset: 3px;
}

.dama-housing .dh-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 18px 0 12px;
  padding-top: 14px;
  border-top: 1px solid var(--dh-border);
  min-width: 0;
}

.dama-housing .dh-count {
  color: var(--dh-ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.dama-housing .dh-sort {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  color: #656565;
  font-size: 13px;
}

.dama-housing .dh-sort button {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--dh-border);
  border-radius: 6px;
  background: #fff;
  color: var(--dh-ink);
  font: inherit;
  line-height: 1.3;
  cursor: pointer;
}

.dama-housing .dh-sort button.is-active,
.dama-housing .dh-sort button[aria-pressed="true"] {
  border-color: var(--dh-red);
  background: #fff3f4;
  color: var(--dh-red);
}

.dama-housing .dh-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

.dama-housing .dh-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 240px;
  padding: 20px;
  border: 1px solid var(--dh-border);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(53, 53, 53, .035);
  overflow-wrap: anywhere;
}

.dama-housing .dh-card-title,
.dama-housing .dh-title {
  margin: 0;
  color: var(--dh-ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
}

.dama-housing .dh-card-title a {
  color: inherit;
  text-decoration: none;
}

.dama-housing .dh-card-meta,
.dama-housing .dh-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
  color: #656565;
  font-size: 13px;
  line-height: 1.6;
}

.dama-housing .dh-card-meta > span,
.dama-housing .dh-meta > span {
  min-width: 0;
}

.dama-housing .dh-price {
  margin-top: auto;
  color: var(--dh-red);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.4;
}

.dama-housing .dh-price small {
  margin-left: 4px;
  color: #656565;
  font-size: 12px;
  font-weight: 400;
}

.dama-housing .dh-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  color: var(--dh-red);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.dama-housing .dh-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dama-housing .dh-card > div:last-child {
  min-width: 0;
}

.dama-housing .dh-route-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  margin-top: 3px;
  padding: 6px 10px;
  border: 1px solid var(--dh-border);
  border-radius: 6px;
  background: var(--dh-gray);
  color: var(--dh-ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}

.dama-housing .dh-route-button:hover {
  border-color: var(--dh-green);
}

.dama-housing .dh-route-map {
  width: 100%;
  height: 200px;
  margin-top: 6px;
  border: 1px solid var(--dh-border);
  border-radius: 8px;
  background: var(--dh-gray);
  overflow: hidden;
}

.dama-housing .dh-more {
  margin: 20px auto 0;
  text-align: center;
}

.dama-housing button.dh-more {
  display: block;
}

.dama-housing .dh-map-details {
  margin: 18px 0 0;
  border: 1px solid var(--dh-border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.dama-housing .dh-map-details > summary {
  padding: 13px 16px;
  color: var(--dh-ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.dama-housing .dh-map-details[open] > summary {
  border-bottom: 1px solid var(--dh-border);
}

.dama-housing .dh-map {
  width: 100%;
  height: 300px;
  background: var(--dh-gray);
}

.dama-housing .dh-map p,
.dama-housing .dh-route-map p {
  margin: 0;
  padding: 18px;
  color: #656565;
  font-size: 13px;
}

.dama-housing .leaflet-container {
  font-family: inherit;
  font-size: 12px;
  z-index: 0;
}

.dama-housing .dh-select-label {
  display: flex;
  flex: 1 1 320px;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 520px;
  min-width: 0;
  color: var(--dh-ink);
  font-size: 13px;
  font-weight: 600;
}

.dama-housing .dh-select,
.dama-housing .dh-category-select,
.dama-housing .dh-sort-select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 30px 8px 12px;
  border: 1px solid #d8d8d8;
  border-radius: 7px;
  background: #fff;
  color: var(--dh-ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.dama-housing .dh-location-title {
  display: block;
  margin: 0 0 3px;
  color: var(--dh-ink);
  font-size: 14px;
  font-weight: 700;
}

.dama-housing .dh-location-address {
  color: #656565;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.dama-housing .dh-button.dh-more {
  border: 1px solid #d8d8d8;
  background: #fff;
  color: var(--dh-ink);
}

.dama-housing .dh-button.dh-more:hover {
  border-color: var(--dh-red);
  color: var(--dh-red);
}

.dama-housing .dh-status {
  margin: 0;
  color: #656565;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.dama-housing .dh-is-error {
  color: var(--dh-red);
}

.dama-housing .dh-is-ok {
  color: #167748;
}

.dama-housing .dh-is-loading {
  color: #656565;
}

.dama-housing .dh-category-label,
.dama-housing .dh-sort-label {
  display: flex;
  flex: 0 1 250px;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  color: #656565;
  font-size: 13px;
  white-space: nowrap;
}

.dama-housing .dh-category-select,
.dama-housing .dh-sort-select {
  flex: 1 1 auto;
  min-height: 36px;
  font-size: 13px;
}

.dama-housing .dh-toolbar .dh-count {
  margin: 0;
}

.dama-housing .dh-walk {
  margin: 0;
  color: #167748;
  font-size: 13px;
  font-weight: 600;
}

.dama-housing .dh-card .dh-price {
  margin: auto 0 0;
}

.dama-housing .dh-price-note {
  display: inline-block;
  margin-left: 6px;
  color: #656565;
  font-size: 12px;
  font-weight: 400;
}

.dama-housing .dh-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  min-width: 0;
}

.dama-housing .dh-card-actions .dh-button {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 13px;
}

.dama-housing .dh-card-actions .dh-link {
  border: 1px solid var(--dh-red);
  background: var(--dh-red);
  color: #fff;
  text-decoration: none;
}

.dama-housing .dh-card-actions .dh-link:hover {
  background: #ad2d36;
}

.dama-housing .dh-card-actions .dh-route-button {
  margin: 0;
}

.dama-housing .dh-route-status {
  margin-top: 0;
}

.dama-housing .dh-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px 18px;
  border: 1px dashed var(--dh-border);
  border-radius: 10px;
  background: var(--dh-gray);
  color: #656565;
  font-size: 14px;
  text-align: center;
  overflow-wrap: anywhere;
}

.dama-housing .dh-map-summary {
  line-height: 1.5;
}

.dama-housing .dh-map-status {
  padding: 10px 16px;
}

.dama-housing .dh-remark {
  margin: 14px 0 0;
  color: #656565;
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.dama-housing .dh-select:focus-visible,
.dama-housing .dh-category-select:focus-visible,
.dama-housing .dh-sort-select:focus-visible {
  outline: 2px solid var(--dh-red);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .dama-housing {
    margin-top: 30px;
    padding-top: 24px;
    scroll-margin-top: 90px;
  }

  .dama-housing > h3 {
    font-size: 22px;
  }

  .dama-housing .dh-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .dama-housing .dh-card {
    min-height: 225px;
    padding: 16px;
  }

  .dama-housing .dh-toolbar {
    align-items: flex-start;
  }

  .dama-housing .dh-count {
    flex: 1 1 100%;
  }

  .dama-housing .dh-controls > button {
    flex: 1 1 130px;
  }

  .dama-housing .dh-select-label {
    max-width: 100%;
  }

  .dama-housing .dh-category-label,
  .dama-housing .dh-sort-label {
    flex: 0 1 100%;
    width: 100%;
    max-width: 290px;
  }

  .dama-housing .dh-location {
    padding: 12px;
  }
}

.dama-housing-context-section .dama-housing,
[data-housing-first] > .dama-housing {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.dama-housing-context-section {
  padding-top: 36px;
  padding-bottom: 36px;
}

[data-housing-types] .photo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

[data-housing-types] .dh-type-card {
  display: block;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

[data-housing-types] .dh-type-card:hover {
  outline: 1px solid #C9353F;
  outline-offset: 2px;
}

[data-housing-types] .dh-type-card:focus-visible {
  outline: 2px solid #C9353F;
  outline-offset: 3px;
}

@media (max-width: 760px) {
  [data-housing-types] .photo-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dama-housing-context-section {
    padding-top: 24px;
    padding-bottom: 24px;
  }
}

@media (max-width: 350px) {
  .dama-housing .dh-sort button {
    padding: 6px 8px;
  }
}
