/* contact.css — styles only the contact page needs: form + details column, opening hours, map.
   Used by: pages/contact.html */


/* [TOPIC: grid]  wide form column + narrower details column */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  align-items: start;
  gap: 2.5rem 4rem;
}

/* Under each title there is a black rule (form, details and hours alike) */
.contact-form-column .panel-subtitle {
  margin-bottom: 1rem;
}

.contact-form-column form {
  padding-top: 1.5rem;
  border-top: 2px solid var(--color-ink);
}

.contact-aside {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.contact-aside h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

/* Contact details as label / value pairs */
.info-list {
  margin: 0;
  border-top: 2px solid var(--color-ink);
}

.info-list div {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--color-border);
}

.info-list dt {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.info-list dd {
  margin: 0.1rem 0 0;
  color: var(--color-ink);
  font-weight: 500;
}

/* [TOPIC: flexbox]  title on the left, open/closed label on the right */
.hours-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.hours-table {
  width: 100%;
  border-top: 2px solid var(--color-ink);
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.hours-table th,
.hours-table td {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.hours-table th {
  color: var(--color-text);
  font-weight: 400;
}

.hours-table td {
  color: var(--color-ink);
  text-align: right;
}

/* Today's row is marked by contact.js */
.hours-table tr.is-today th,
.hours-table tr.is-today td {
  color: var(--color-ink);
  font-weight: 600;
}

/* Day off (Sunday): the hours cell reads "Closed" in a quieter grey */
.hours-table tr.is-closed td {
  color: var(--color-muted);
}

.today-tag {
  margin-left: 0.5rem;
  color: var(--color-red-text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hours-note {
  margin: 1rem 0 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.char-count {
  align-self: flex-end;
  color: var(--color-muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- Map ---------- */
.map-card {
  margin: 3rem 0 0;
  container-type: inline-size;   /* lets the frame below measure the card's width (cqw) */
}

/* The frame clips the map; the ribbon sits on top.
   Height: 40% of the card's width (a 5:2 shape), but never less than 20rem. */
.map-frame {
  position: relative;
  overflow: hidden;
  height: max(20rem, 40cqw);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
}

/* The map keeps its 5:2 shape. On narrow screens it stays 50rem wide and the sides
   are cropped, so the streets don't shrink to hair lines. Only the background for the
   current theme is downloaded. */
.map-canvas {
  position: absolute;
  top: 0;
  left: 50%;
  width: max(100%, 50rem);
  height: 100%;
  transform: translateX(-50%);
  background: url("../../images/map-tirana.svg") center / 100% 100% no-repeat;
}

[data-theme="dark"] .map-canvas {
  background-image: url("../../images/map-tirana-dark.svg");
}

.map-label {
  position: absolute;
  color: var(--color-muted);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Along the street: same angle as Rruga e Durrësit on the map */
.map-label-street {
  top: 43.5%;
  left: 43.6%;
  transform: translate(-50%, -50%) rotate(24.7deg);
}

.map-label-square {
  top: 57.6%;
  left: 59%;
  transform: translate(-50%, -50%);
}

/* The tip of the pin is the exact point (36% / 32%) on Rruga e Durrësit */
.map-pin {
  position: absolute;
  top: 32%;
  left: 36%;
}

.map-pin-icon {
  position: absolute;
  bottom: 0;
  left: -17px;              /* half the icon width: the tip sits on the point */
  display: block;
}

.map-pin-icon path {
  fill: var(--color-red);
  stroke: #ffffff;
  stroke-width: 2;
}

.map-pin-icon circle {
  fill: #ffffff;
}

.map-pin-card {
  position: absolute;
  bottom: 1.75rem;
  left: 1.5rem;
  display: grid;
  margin: 0;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--color-ink);
  background-color: var(--color-bg);
  color: var(--color-muted);
  font-size: 0.8rem;
  line-height: 1.35;
  white-space: nowrap;
}

.map-pin-card strong {
  color: var(--color-ink);
  font-size: 0.9rem;
}

/* A red "bookmark" hanging from the top edge (writing-mode + clip-path):
   the text runs top to bottom, and clip-path cuts the V notch at the bottom */
.map-ribbon {
  position: absolute;
  top: 0;
  right: 1.5rem;
  margin: 0;
  padding: 1rem 0.6rem 1.75rem;
  background-color: var(--color-red);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 0.75rem), 0 100%);
}

.map-caption {
  margin-top: 0.75rem;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.map-caption a {
  color: inherit;
}


/* [TOPIC: media queries] */
@media (max-width: 1024px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

