/* Architecture style / art-movement detail — match Architecture Styles panel pattern.
   Breadcrumb & title stay outside; only .as-section cells get the light-blue shell. */

.as-align {
  width: 100%;
  padding-left: var(--as-left, 24px);
  padding-right: var(--as-right, 24px);
  box-sizing: border-box;
  max-width: none;
}
.as-align .container,
.as-align .container-fluid {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0;
  margin-right: 0;
  max-width: none;
}
.as-header-row { margin: 0.75rem 0 0.5rem 0; }

.section-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  min-width: 260px;
  background-color: var(--navbar-bg-color, #7CAADC);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: default;
}
.section-button:hover,
.section-button:focus {
  filter: brightness(0.95);
  color: #fff;
  text-decoration: none;
  outline: none;
}

.arch-styles-dropdown,
#arch-styles-dropdown.arch-styles-dropdown,
#art-movements-dropdown.arch-styles-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: min(320px, 85vw);
  max-width: min(420px, 92vw);
  max-height: min(440px, 62vh);
  overflow: hidden;
  margin: 0;
  padding: 0.4rem;
  background: var(--panel-inner-bg, #fff);
  border: 1px solid var(--panel-border, #D0E5FF);
  border-radius: var(--panel-radius, 10px);
  box-shadow: var(--panel-shadow, 0 14px 32px rgba(45, 55, 72, 0.18));
  z-index: 10001;
}
.arch-styles-dropdown[hidden],
#arch-styles-dropdown.arch-styles-dropdown[hidden],
#art-movements-dropdown.arch-styles-dropdown[hidden] {
  display: none !important;
}
#arch-styles-list,
#art-movements-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: min(420px, 60vh);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.15rem 0.25rem 0.15rem 0.1rem;
}
#arch-styles-list .arch-style-btn,
#art-movements-list .arch-style-btn {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  min-height: 2.65rem;
  padding: 0.7rem 0.9rem;
  background-color: rgba(124, 170, 220, 0.9);
  color: #fff;
  border: 1px solid #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#arch-styles-list .arch-style-btn:hover,
#arch-styles-list .arch-style-btn:focus,
#art-movements-list .arch-style-btn:hover,
#art-movements-list .arch-style-btn:focus {
  filter: brightness(0.95);
  color: #fff;
}
#arch-styles-list .arch-style-btn.is-wip,
#art-movements-list .arch-style-btn.is-wip {
  background: #1a1a1a;
  color: rgba(255, 255, 255, 0.55);
  border-color: #333;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.85;
}

.lang-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1rem;
  min-width: 0;
  background-color: var(--navbar-bg-color, #7CAADC);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s ease;
  cursor: pointer;
}
.lang-button.active {
  outline: 3px solid rgba(255,255,255,.8);
  box-shadow: 0 0 0 2px rgba(124,170,220,.4) inset;
}
.lang-button:hover,
.lang-button:focus {
  filter: brightness(0.95);
  color: #fff;
  text-decoration: none;
}

.as-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 12px;
}
.as-s1 { grid-area: 1 / 1 / 2 / 2; }
.as-s2 { grid-area: 1 / 2 / 2 / 3; }
.as-s3 { grid-area: 1 / 3 / 2 / 4; }
.as-s4 { grid-area: 2 / 1 / 3 / 2; }
.as-s5a { grid-area: 2 / 2 / 3 / 3; }
.as-s5b { grid-area: 2 / 3 / 3 / 4; }

.as-section {
  background: var(--panel-bg, #E6F2FF);
  border: 1px solid var(--panel-border-subtle, rgba(0,0,0,0.06));
  border-radius: var(--panel-radius, 10px);
  padding: 8px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.as-box.body {
  background: var(--panel-inner-bg, #fff);
  border-radius: var(--panel-radius-sm, 8px);
  padding: 10px;
  flex: 1 1 auto;
  position: relative;
}
.as-grid .as-box.body {
  min-height: 260px;
}
#style-aspects > div,
#style-aspects .as-aspect {
  background: var(--panel-bg-soft, #FAFCFF);
  border: 1px solid var(--panel-border, #D0E5FF);
  border-radius: 6px;
  padding: 8px;
}
#style-tags .badge,
#style-tags span {
  border-color: var(--panel-border, #D0E5FF) !important;
}

:root {
  --as-embed-min-h-desktop: 520px;
  --as-embed-min-h-tablet: 460px;
  --as-embed-min-h-mobile: 320px;
  --as-bottom-card-min-h: 620px;
}
.as-embed { min-height: var(--as-embed-min-h-desktop); }
.as-s4 .as-box.body,
.as-s5a .as-box.body,
.as-s5b .as-box.body {
  min-height: var(--as-bottom-card-min-h);
}
#detail-map,
#detail-street,
#detail-video {
  width: 100%;
  height: 100%;
  border: 0;
}
#vid-comments { max-height: 180px; overflow: auto; }

@media (max-width: 1200px) and (min-width: 993px) {
  .as-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto);
  }
  .as-embed { min-height: var(--as-embed-min-h-tablet); }
  .as-s4 .as-box.body,
  .as-s5a .as-box.body,
  .as-s5b .as-box.body {
    min-height: calc(var(--as-embed-min-h-tablet) + 120px);
  }
}
@media (max-width: 992px) {
  .as-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, auto);
  }
  .as-s1, .as-s2, .as-s3, .as-s4, .as-s5a, .as-s5b { grid-area: auto; }
  .as-embed { min-height: var(--as-embed-min-h-mobile); }
  .as-s4 .as-box.body,
  .as-s5a .as-box.body,
  .as-s5b .as-box.body {
    min-height: calc(var(--as-embed-min-h-mobile) + 120px);
  }
}

#img-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20000;
}
#img-lightbox.open { display: flex; }
#img-lightbox .inner { max-width: 90vw; max-height: 90vh; position: relative; }
#img-lightbox img {
  max-width: 100%;
  max-height: 80vh;
  display: block;
  border-radius: 6px;
}
#img-lightbox .caption {
  color: #fff;
  margin-top: .5rem;
  text-align: center;
  font-size: .95rem;
}
#img-lightbox .close {
  position: absolute;
  right: -10px;
  top: -10px;
  background: #fff;
  color: #000;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0,0,0,.2);
}

#refs-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 21000;
}
#refs-modal.open { display: flex; }
#refs-modal .panel {
  background: var(--panel-bg, #E6F2FF);
  color: #000;
  border-radius: var(--panel-radius, 10px);
  width: min(520px, 92vw);
  max-width: 92vw;
  box-shadow: var(--panel-shadow, 0 10px 30px rgba(0,0,0,0.25));
  border: 1px solid var(--panel-border-subtle, rgba(0,0,0,0.06));
  padding: 8px;
}
#refs-modal .panel .hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  background: var(--panel-inner-bg, #fff);
  border: 1px solid var(--panel-border, #D0E5FF);
  border-radius: var(--panel-radius-sm, 8px);
  margin-bottom: 8px;
}
#refs-modal .panel .bd {
  padding: 1rem;
  background: var(--panel-inner-bg, #fff);
  border: 1px solid var(--panel-border, #D0E5FF);
  border-radius: var(--panel-radius-sm, 8px);
}
#refs-modal .panel .ft {
  padding: .75rem 1rem;
  text-align: right;
  background: var(--panel-inner-bg, #fff);
  border: 1px solid var(--panel-border, #D0E5FF);
  border-radius: var(--panel-radius-sm, 8px);
  margin-top: 8px;
}
#refs-modal .btn-close {
  background: transparent;
  border: 0;
  font-size: 1.25rem;
  line-height: 1;
}
