/* Plaza de la Luna — interactive 3D model (pdl-3d) styles.
   Scoped under .pdl3d so it can embed anywhere on plazadelaluna.com. */
.pdl3d, .pdl3d *, .pdl3d *::before, .pdl3d *::after { box-sizing: border-box; }
.pdl3d {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #062a33;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #f5efe2;
  -webkit-tap-highlight-color: transparent;
}
.pdl3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}
.pdl3d-canvas:active { cursor: grabbing; }
.pdl3d-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  letter-spacing: .04em;
  color: #e9dfc9;
  background: #062a33;
  z-index: 5;
}
.pdl3d-ui { position: absolute; z-index: 6; }
.pdl3d-ui-top {
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 16px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4,26,31,.72), rgba(4,26,31,0));
}
.pdl3d-brand { display: flex; gap: 10px; align-items: center; }
.pdl3d-moon {
  width: 36px; height: 36px; flex: 0 0 36px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='29' fill='none' stroke='%23C6A15B' stroke-width='3'/%3E%3Cpath d='M40 14a17 17 0 1 0 10 26A13.5 13.5 0 0 1 40 14z' fill='%23C6A15B'/%3E%3C/svg%3E") center/contain no-repeat;
}
.pdl3d-brand h3 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 19px; font-weight: 600; letter-spacing: .01em; color: #f5efe2;
}
.pdl3d-brand p { margin: 1px 0 0; font-size: 11.5px; color: #cdbf9f; letter-spacing: .03em; }
.pdl3d-lang { display: flex; pointer-events: auto; border: 1px solid rgba(198,161,91,.55); border-radius: 999px; overflow: hidden; }
.pdl3d-lang button {
  appearance: none; border: 0; background: rgba(6,42,51,.75); color: #e9dfc9;
  font: 600 11.5px/1 Inter, system-ui, sans-serif; padding: 7px 11px; cursor: pointer;
}
.pdl3d-lang button.on { background: #C6A15B; color: #231a04; }
.pdl3d-ui-controls {
  top: 64px; left: 16px;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
}
.pdl3d-seg {
  display: flex; flex-wrap: wrap; gap: 0;
  border: 1px solid rgba(233,223,201,.28); border-radius: 999px; overflow: hidden;
  background: rgba(6,42,51,.78); backdrop-filter: blur(4px);
}
.pdl3d-seg button {
  appearance: none; border: 0; background: transparent; color: #e9dfc9;
  font: 600 12px/1 Inter, system-ui, sans-serif; padding: 8px 12px; cursor: pointer;
}
.pdl3d-seg button.on { background: #f5efe2; color: #0a2e35; }
.pdl3d-modebtn {
  appearance: none; border: 1px solid rgba(233,223,201,.28); border-radius: 999px;
  background: rgba(6,42,51,.78); color: #E3C98F; backdrop-filter: blur(4px);
  font: 600 12px/1 Inter, system-ui, sans-serif; padding: 8px 13px; cursor: pointer;
}
.pdl3d-legend {
  left: 16px; bottom: 34px;
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: 11px; color: #e9dfc9;
  background: rgba(4,26,31,.55); padding: 6px 10px; border-radius: var(--r-sm);
}
.pdl3d-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pdl3d-legend i { width: 11px; height: 11px; border-radius: var(--r-xs); display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.pdl3d-note {
  right: 16px; bottom: 34px;
  font-size: 10.5px; font-style: italic; color: rgba(245,239,226,.75);
  background: rgba(4,26,31,.45); padding: 5px 9px; border-radius: var(--r-sm);
  max-width: 46%; text-align: right;
}
.pdl3d-hint {
  left: 0; right: 0; bottom: 8px;
  text-align: center; font-size: 11px; color: rgba(245,239,226,.66);
  pointer-events: none; letter-spacing: .02em;
}
.pdl3d-tip {
  position: absolute; z-index: 8; pointer-events: none;
  background: rgba(4,26,31,.92); border: 1px solid rgba(198,161,91,.6);
  color: #f5efe2; font-size: 12px; font-weight: 600;
  padding: 5px 9px; border-radius: var(--r-sm); white-space: nowrap;
}
.pdl3d-regtag {
  margin: 2px 0 4px;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #C6A15B;
}
.pdl3d-unitbtn {
  margin-top: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(198, 161, 91, 0.6);
  background: rgba(198, 161, 91, 0.12);
  color: #E3C98F;
  font: 600 12.5px Inter, system-ui, sans-serif;
  cursor: pointer;
}
.pdl3d-uv {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: #07242b;
}
.pdl3d-uv-grid { display: flex; height: 100%; }
.pdl3d-uv-body { flex: 1 1 auto; min-width: 0; height: 100%; }
.pdl3d-uv-body.pdlp { height: 100%; border: 0; border-radius: 0; }
.pdl3d-uv-side {
  flex: 0 0 292px;
  border-left: 1px solid rgba(198, 161, 91, 0.35);
  padding: 14px;
  overflow-y: auto;
  background: rgba(4, 24, 29, 0.6);
}
.pdl3d-uv-side h5 {
  margin: 0 0 8px; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.06em; color: #C6A15B;
}
.pdl3d-uv-ctx { height: 230px; border-radius: var(--r-sm); overflow: hidden; background: #0a2e35; }
.pdl3d-ctx-canvas { width: 100%; height: 100%; display: block; }
.pdl3d-uv-note { font-size: 11.5px; color: #9fb8b0; line-height: 1.45; margin: 8px 0 10px; }
.pdl3d-uv-legend { display: flex; flex-direction: column; gap: 6px; }
.pdl3d-uv-legend div { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #e6efea; }
.pdl3d-uv-legend i { width: 13px; height: 13px; border-radius: var(--r-xs); border: 1px solid rgba(255,255,255,0.35); flex: 0 0 auto; }
@media (max-width: 760px) {
  .pdl3d-uv-grid { flex-direction: column; overflow-y: auto; }
  .pdl3d-uv-body { flex: 0 0 auto; height: auto; }
  .pdl3d-uv-side { flex: 0 0 auto; border-left: 0; border-top: 1px solid rgba(198, 161, 91, 0.35); }
}
.pdl3d-uv-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(238, 244, 241, 0.35);
  background: rgba(4, 24, 29, 0.85);
  color: #eef4f1;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.pdl3d-panel {
  position: absolute; z-index: 9;
  top: 64px; right: 16px; width: 272px; max-width: calc(100% - 32px);
  max-height: calc(100% - 130px); overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
  background: rgba(5,32,39,.94);
  border: 1px solid rgba(198,161,91,.55);
  border-radius: var(--r-md);
  padding: 16px 16px 12px;
  box-shadow: 0 18px 44px rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
}
.pdl3d-close {
  position: absolute; top: 6px; right: 10px;
  appearance: none; border: 0; background: transparent; cursor: pointer;
  color: #e9dfc9; font-size: 22px; line-height: 1; padding: 4px;
}
.pdl3d-panel-code {
  margin: 0 0 2px; font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: #C6A15B;
}
.pdl3d-panel h4 {
  margin: 0 0 10px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 20px; font-weight: 600; color: #f5efe2;
}
.pdl3d-panel dl { margin: 0 0 10px; }
.pdl3d-panel dl > div {
  display: flex; justify-content: space-between; gap: 14px; min-width: 0;
  padding: 6px 0; border-top: 1px solid rgba(233,223,201,.14);
}
.pdl3d-panel dl > div.pdl3d-sub { border-top: 1px solid rgba(198, 161, 91, 0.4); margin-top: 4px; }
.pdl3d-panel div.pdl3d-sub dt { color: #C6A15B; text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.05em; }
.pdl3d-panel dt { font-size: 11.5px; color: #cdbf9f; flex: 1 1 auto; min-width: 0; }
.pdl3d-panel dd { margin: 0; font-size: 12.5px; font-weight: 600; text-align: right; color: #f5efe2; flex: 0 1 auto; min-width: 0; }
.pdl3d-plan {
  width: 100%; max-width: 100%; min-width: 0; display: block;
  aspect-ratio: 44 / 31;
  border-radius: var(--r-sm); border: 1px solid rgba(233,223,201,.18);
  background-color: #0a2e35;
  background-size: contain; background-repeat: no-repeat; background-position: center;
}
.pdl3d-plan-cap { margin: 6px 0 2px; font-size: 10.5px; font-style: italic; color: rgba(245,239,226,.7); }
@media (max-width: 640px) {
  .pdl3d { min-height: 480px; }
  .pdl3d-brand h3 { font-size: 16px; }
  .pdl3d-brand p { display: none; }
  .pdl3d-ui-controls { top: 56px; left: 10px; }
  .pdl3d-panel {
    top: auto; bottom: 64px; right: 10px; left: 10px; width: auto;
    max-height: 46%;
  }
  .pdl3d-legend { bottom: 30px; left: 10px; font-size: 10px; max-width: 62%; }
  .pdl3d-note { display: none; }
  .pdl3d-hint { font-size: 10px; }
}
