/* ── MAP TIME PROFILES ── */
#gs-mtp-btn {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  color: var(--mid);
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 7px;
  cursor: pointer;
  transition: all .15s
}

#gs-mtp-btn:hover {
  border-color: var(--mid);
  color: var(--ink);
  background: var(--paper)
}

#gs-mtp-btn.has-content {
  border-color: var(--teal);
  color: var(--teal)
}

#gs-mtp-btn.has-content:hover {
  background: #f0faf6
}

#mtp-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .52);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100
}

#mtp-modal.on {
  display: flex
}

#mtp-box {
  background: var(--card);
  border-radius: 13px;
  width: min(97vw, 480px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .28)
}

#mtp-hdr {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--bd);
  gap: 10px;
  flex-shrink: 0
}

#mtp-hdr span {
  font-family: var(--font-display);
  font-size: 17px;
  flex: 1
}

#mtp-hdr button {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--light);
  line-height: 1;
  padding: 0 4px
}

#mtp-hdr button:hover {
  color: var(--accent)
}

#mtp-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px
}

.mtp-row {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--bd);
  border-radius: 7px;
  overflow: hidden;
  transition: border-color .12s;
  position: relative;
  margin-bottom: 2px
}

.mtp-row:hover {
  border-color: var(--mid)
}

.mtp-row.mtp-active {
  border-color: var(--ink)
}

.mtp-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  transition: background .12s
}

.mtp-row-top:hover {
  background: var(--paper)
}

.mtp-row.mtp-active .mtp-row-top {
  background: var(--paper)
}

.mtp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--bd)
}

.mtp-row.mtp-active .mtp-dot {
  background: var(--ink)
}

.mtp-date {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink)
}

.mtp-active-badge {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--teal);
  background: #f0faf6;
  border: 1px solid #1a6b5a44;
  border-radius: 3px;
  padding: 1px 5px;
  flex-shrink: 0
}

.mtp-del {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--bd);
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  flex-shrink: 0;
  transition: color .12s
}

.mtp-row-top:hover .mtp-del,
.mtp-area-row:hover .mtp-del {
  color: var(--light)
}

.mtp-del:hover {
  color: var(--accent) !important
}

/* Area sub-rows */
.mtp-areas-wrap {
  padding: 4px 8px 8px 26px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-top: 1px solid var(--bg-sand);
  background: var(--bg-cool)
}

.mtp-area-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: background .12s
}

.mtp-area-row:hover {
  background: var(--bg-sand)
}

.mtp-area-row.mtp-area-active {
  background: var(--bg-peach)
}

.mtp-area-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bd);
  flex-shrink: 0
}

.mtp-area-dot.on {
  background: var(--ink)
}

.mtp-area-name {
  flex: 1;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--ink);
  outline: none;
  padding: 1px 5px;
  border-radius: 3px;
  cursor: text;
  min-width: 0;
  transition: border-color .12s, background .12s
}

.mtp-area-name:focus {
  background: var(--bg-warm);
  border-color: var(--brand-light)
}

.mtp-add-area-btn {
  border: none;
  background: none;
  color: var(--light);
  font-size: 10px;
  font-family: var(--font-ui);
  cursor: pointer;
  padding: 3px 4px 1px;
  text-align: left;
  transition: color .12s;
  letter-spacing: .02em;
  margin-top: 2px
}

.mtp-add-area-btn:hover {
  color: var(--ink)
}

/* Pill dropdown for multi-area profiles */
.mtp-area-dd {
  animation: mtpDdFade .12s ease
}

@keyframes mtpDdFade {
  from {
    opacity: 0;
    transform: translateY(-4px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

#mtp-add-row {
  display: none;
  flex-direction: column;
  gap: 7px;
  padding: 10px;
  border: 1px dashed var(--bd);
  border-radius: 7px;
  margin-top: 4px
}

#mtp-add-row.on {
  display: flex
}

#mtp-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--bd);
  display: flex;
  gap: 8px;
  flex-shrink: 0
}

#dash-time-pills-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  max-width: calc(100% - 200px);
  min-width: 0;
  overflow: hidden;
  position: relative
}

#dash-time-pills-nav-l,
#dash-time-pills-nav-r {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(30, 30, 40, .18);
  border-radius: 5px;
  background: rgba(255, 255, 255, .9);
  color: rgba(30, 30, 40, .5);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  transition: all .15s;
  padding: 0;
  line-height: 1
}

#dash-time-pills-nav-l:hover,
#dash-time-pills-nav-r:hover {
  background: #1a1a22;
  color: #fff;
  border-color: #1a1a22
}

#dash-time-pills-nav-l.vis,
#dash-time-pills-nav-r.vis {
  display: flex
}

#dash-time-pills {
  display: flex;
  gap: 5px;
  overflow: hidden;
  flex: 1;
  min-width: 0
}

.mtp-pill {
  height: 24px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1.5px solid rgba(30, 30, 40, .18);
  background: rgba(255, 255, 255, .85);
  color: rgba(30, 30, 40, .55);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 9.5px;
  letter-spacing: .04em;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  transition: all .15s
}

.mtp-pill:hover {
  border-color: rgba(30, 30, 40, .38);
  color: #1a1a22;
  background: #fff
}

.mtp-pill.mtp-pill-active {
  background: #1a1a22;
  color: #fff;
  border-color: #1a1a22
}
