/* Tower proposals (SSD) page. Builds on ../styles.css. */

.wrap-wide {
  width: min(1120px, 94vw);
  margin: 0 auto;
}
main { padding: 2.75rem 0 4rem; }

/* ---- Legend ------------------------------------------------------------ */
.legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  padding: 0;
  margin: 0 0 1rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
}
.legend li { display: flex; align-items: center; gap: 0.45rem; }
.dot {
  width: 0.9rem; height: 0.9rem; border-radius: 50%;
  border: 2px solid var(--navy);
  display: inline-block;
}
.dot-open { background: var(--gold); }
.dot-closed { background: #b7bec9; border-color: #8a93a1; }
.dot-approved { background: #fff; border-color: #8a93a1; border-style: dashed; }

/* ---- Map --------------------------------------------------------------- */
.map-card { padding-bottom: 1.4rem; }
.map-tap-hint { display: none; margin: 0 0 0.6rem; }
.map-frame {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
}
.map {
  position: relative;
  width: 100%;
  aspect-ratio: 1470 / 880;
  background: #eef0f3;
}
.map-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.map-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.map-lines line { stroke: var(--navy); stroke-width: 2; stroke-dasharray: 4 3; }
.map-lines line.is-closed,
.map-lines line.is-approved { stroke: #8a93a1; }

.map-pin {
  position: absolute;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--navy);
  box-shadow: 0 1px 4px rgba(10, 34, 67, 0.35);
  z-index: 2;
}
.map-pin.is-closed { background: #b7bec9; border-color: #6f7887; }
.map-pin.is-approved { background: #fff; border-color: #6f7887; border-style: dashed; }
.map-pin.is-urgent::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 3px solid var(--orange);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  from { transform: scale(0.6); opacity: 1; }
  to { transform: scale(1.5); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .map-pin.is-urgent::after { animation: none; }
}

.map-callout {
  position: absolute;
  width: 12.5%;
  z-index: 3;
  display: block;
  background: #fff;
  border: 2px solid var(--navy);
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(10, 34, 67, 0.22);
  overflow: hidden;
  text-decoration: none;
  color: var(--navy);
  line-height: 1.2;
  transition: transform 0.12s, box-shadow 0.12s;
}
.map-callout img,
.map-callout .no-img {
  width: 100%;
  aspect-ratio: 4 / 3;
}
.map-callout img {
  display: block;
  object-fit: cover;
  background: #e8eaee;
}
.map-callout .mc-name,
.map-callout .mc-status {
  display: block;
  padding: 0 0.4rem;
}
.map-callout .mc-name {
  font-family: "Anton", sans-serif;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.01em;
  padding-top: 0.3rem;
}
.map-callout .mc-status {
  font-size: 0.64rem;
  font-weight: 700;
  padding-bottom: 0.35rem;
  color: var(--ink-soft);
}
a.map-callout { border-color: var(--navy); }
a.map-callout .mc-status { color: var(--navy); }
a.map-callout:hover,
a.map-callout:focus-visible {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 10px 22px rgba(10, 34, 67, 0.3);
  z-index: 4;
  outline: none;
}
a.map-callout:focus-visible { box-shadow: 0 0 0 4px rgba(255, 199, 0, 0.7); }
a.map-callout.is-open { border-top: 5px solid var(--gold); }
a.map-callout.is-urgent { border-top-color: var(--orange); }
.map-callout.is-closed,
.map-callout.is-approved {
  border-color: #a9b0bb;
  box-shadow: 0 3px 8px rgba(10, 34, 67, 0.12);
}
.map-callout.is-closed img,
.map-callout.is-approved img { filter: grayscale(1); opacity: 0.6; }
.map-callout.is-closed .mc-name,
.map-callout.is-approved .mc-name { color: #6f7887; }

.no-img {
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #8a93a1;
  background: repeating-linear-gradient(45deg, #eceef1 0 8px, #e2e5ea 8px 16px);
  text-align: center;
}

.map-credit {
  position: absolute;
  right: 0.4rem;
  bottom: 0.3rem;
  margin: 0;
  font-size: 0.66rem;
  background: rgba(255, 255, 255, 0.85);
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
  color: var(--ink-soft);
  z-index: 5;
}
.map-credit a { color: inherit; }

a.map-pin { cursor: pointer; }
a.map-pin:focus-visible { outline: 3px solid rgba(255, 199, 0, 0.8); outline-offset: 3px; }
.pin-label { display: none; }

/* Phones: the picture cards would be postage stamps, so show the map at full
   width with labelled, tappable pins for the open proposals instead. */
@media (max-width: 700px) {
  .map-tap-hint { display: block; }
  .map-callout,
  .map-lines { display: none; }
  .map-pin { width: 14px; height: 14px; margin: -7px 0 0 -7px; border-width: 2px; }
  a.map-pin { width: 18px; height: 18px; margin: -9px 0 0 -9px; z-index: 3; }
  a.map-pin::before { content: ""; position: absolute; inset: -12px; } /* bigger tap target */
  .pin-label {
    display: block;
    position: absolute;
    white-space: nowrap;
    background: var(--navy);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.28rem 0.4rem;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(10, 34, 67, 0.3);
  }
  .is-urgent .pin-label { background: var(--orange); }
  .pin-label.pos-right { left: calc(100% + 5px); top: 50%; transform: translateY(-50%); }
  .pin-label.pos-left { right: calc(100% + 5px); top: 50%; transform: translateY(-50%); }
  .pin-label.pos-above { bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%); }
  .pin-label.pos-below { top: calc(100% + 5px); left: 50%; transform: translateX(-50%); }
}

/* ---- Lists of developments --------------------------------------------- */
.dev-group h2 { margin-bottom: 0.4rem; }
.dev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1rem;
}
.dev-card {
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.dev-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #eef0f3;
}
.dev-img.no-img { display: grid; }
.dev-body { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.9rem 1rem 1.1rem; flex: 1; }
.dev-name {
  font-family: "Anton", sans-serif;
  text-transform: uppercase;
  font-size: 1.25rem;
  line-height: 1.1;
  color: var(--navy);
}
.dev-nick { font-size: 0.84rem; font-weight: 700; color: var(--ink-soft); }
.dev-desc { font-size: 0.9rem; color: var(--ink-soft); }
.dev-cta {
  margin-top: auto;
  padding-top: 0.4rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  color: var(--navy);
}
a.dev-card { border-color: var(--navy); border-top: 5px solid var(--gold); }
a.dev-card:hover,
a.dev-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  outline: none;
}
a.dev-card:focus-visible { box-shadow: 0 0 0 4px rgba(255, 199, 0, 0.7); }
.dev-card.is-closed,
.dev-card.is-approved { background: #f6f7f9; }
.dev-card.is-closed .dev-img,
.dev-card.is-approved .dev-img { filter: grayscale(1); opacity: 0.6; }
.dev-card.is-closed .dev-name,
.dev-card.is-approved .dev-name { color: #6f7887; }

.dev-badge {
  align-self: flex-start;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  margin: 0;
}
.tone-open { background: var(--gold); color: var(--navy); }
.tone-urgent { background: var(--orange); color: #fff; }
.tone-late { background: #fff3cc; color: #6b5300; border: 1px solid var(--gold-deep); }
.tone-closed { background: #e3e6eb; color: #5b6575; }
.tone-approved { background: #fff; color: #5b6575; border: 1px dashed #8a93a1; }

/* ---- Proposal card ----------------------------------------------------- */
.back-row { margin: 0 0 1rem; }
.back-link {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
}
.proposal-card { border-top-color: var(--gold); }
.proposal-card h2 { margin-bottom: 0.3rem; }
.proposal-eyebrow {
  font-family: "Anton", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}
.proposal-address { margin: 0 0 0.75rem; color: var(--ink-soft); }
.late-note { margin: 0.6rem 0 0; font-size: 0.92rem; color: #6b5300; }
.gallery {
  display: grid;
  gap: 0.6rem;
  margin: 1.1rem 0 1.2rem;
}
.gallery-2 { grid-template-columns: 1fr 1fr; }
.gallery img {
  width: 100%;
  height: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  display: block;
}
.gallery-1 img { object-fit: contain; background: #f3f4f6; }
@media (max-width: 560px) {
  .gallery-2 { grid-template-columns: 1fr; }
}
.facts { margin: 0; display: grid; gap: 0.55rem; }
.facts div { display: grid; grid-template-columns: 11rem 1fr; gap: 0.8rem; }
.facts dt {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.78rem;
  color: var(--navy);
  padding-top: 0.15rem;
}
.facts dd { margin: 0; font-size: 0.95rem; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .facts div { grid-template-columns: 1fr; gap: 0.1rem; }
}

.history { margin-top: 1.4rem; }
.history h3 {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}
.table-scroll { overflow-x: auto; }
.history table { border-collapse: collapse; width: 100%; font-size: 0.9rem; min-width: 420px; }
.history th, .history td { padding: 0.45rem 0.6rem; text-align: left; border-bottom: 1px solid var(--line); }
.history thead th { color: var(--navy); font-family: "Anton", sans-serif; font-weight: 400; font-size: 1.05rem; }
.history thead th span { display: block; font-family: "Epilogue", sans-serif; font-size: 0.72rem; color: var(--ink-soft); }
.history tbody th { font-weight: 700; color: var(--ink-soft); font-size: 0.82rem; }
.history td:last-child, .history thead th:last-child { background: #fff6d6; font-weight: 800; }

.proposal-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; margin: 1.2rem 0 0; }
.proposal-links a, .further-links a { color: var(--navy); font-weight: 700; }

/* ---- Output extras ----------------------------------------------------- */
.cc-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  margin: 0.2rem 0 0;
}
.cc-toggle input { width: 1.2rem; height: 1.2rem; accent-color: var(--navy); flex: none; }
.further-card { border-top-color: var(--navy); }
.further-links { margin: 0; padding-left: 1.2rem; }
.further-links li { margin-bottom: 0.35rem; }

@media (max-width: 560px) {
  .map-card { padding: 1.4rem 1rem 1.2rem; }
}

/* "Have your say on another" card, shown after a draft */
.others-card { border-top-color: var(--navy); }
.others-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 0.8rem;
}
.others-list .dev-desc { display: none; }
.others-list .dev-name { font-size: 1.05rem; }
.back-row-bottom { margin: 1.2rem 0 0; }

/* Formal submissions on the NSW Planning Portal (proposals on exhibition) */
.portal-stage {
  margin-top: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 1rem 1.1rem 0.6rem;
}
.portal-stage h3 { margin: 0 0 0.4rem; color: var(--navy); font-size: 1.05rem; }
.portal-stage h3 .micro { font-weight: 500; }
.portal-stage > .btn-send { margin: 0.4rem 0 0.6rem; }
.portal-stage ol { margin: 0.6rem 0 0.6rem; padding-left: 1.3rem; }
.portal-stage li { margin-bottom: 0.45rem; line-height: 1.45; }
.portal-stage .micro { margin: 0.4rem 0 0; }
.portal-stage a:not(.btn-send) { color: var(--navy); font-weight: 700; overflow-wrap: anywhere; }
.char-count { margin: -0.4rem 0 0.6rem; text-align: right; }
.char-count.over { color: var(--orange); font-weight: 700; text-align: left; }
.guide-shot {
  display: block;
  max-width: min(100%, 560px);
  height: auto;
  margin: 0.5rem 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(10, 34, 67, 0.08);
}
.guide-credit { font-style: italic; }
.guide-shot-sm { max-width: min(100%, 300px); }
.optional { font-family: "Epilogue", sans-serif; font-size: 0.8rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink-soft); }
