@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=optional');

:root {
  font-family: 'DM Sans', sans-serif;
  color: #202c26;
  background: #eef1eb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --green: #317553;
}

* { box-sizing: border-box; }

body { min-width: 320px; min-height: 100vh; margin: 0; }

button, input, textarea { font: inherit; }

.account-page {
  width: min(940px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 42px;
}

.account-page-header, .section-heading, .account-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 11px;
  background: #e5f0e8;
  color: var(--green);
  font-size: 24px;
}

.brand-name {
  font-family: Manrope, sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.8px;
}

.brand-name span, .intro h1 span { color: var(--green); }

.back-link, .text-button {
  color: #47664f;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.intro { margin: 62px 0 30px; }

.eyebrow {
  margin: 0 0 8px;
  color: #718078;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}

.intro h1, h2 {
  margin: 0;
  font-family: Manrope, sans-serif;
  letter-spacing: -.04em;
}

.intro h1 { font-size: clamp(36px, 6vw, 56px); }

.intro > p:last-child, .create-map-panel > div > p:last-child,
.login-panel > p, .pending-place > div > p:last-child {
  max-width: 580px;
  color: #68766d;
  font-size: 14px;
  line-height: 1.65;
}

.page-status { color: #68766d; font-size: 13px; }
.page-status:empty { display: none; }

.login-panel, .create-map-panel, .pending-place, .map-card {
  border: 1px solid rgba(45, 66, 51, .09);
  border-radius: 16px;
  background: #fbfcfa;
  box-shadow: 0 8px 32px rgba(36, 52, 40, .045);
}

.login-panel { padding: 28px; }
.login-panel h2, .create-map-panel h2, .pending-place h2, .section-heading h2 { font-size: 21px; }
.login-panel > p { margin: 8px 0 18px; }

.create-map-panel {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(280px, 1fr);
  gap: 32px;
  margin: 28px 0 46px;
  padding: 26px;
}

.create-map-panel > div > p:last-child { margin-bottom: 0; }

#create-map-form { display: grid; gap: 12px; }

#create-map-form label {
  display: grid;
  gap: 6px;
  color: #46564b;
  font-size: 12px;
  font-weight: 650;
}

#create-map-form label span { color: #89938b; font-weight: 400; }

#create-map-form input:not([type='checkbox']), #create-map-form textarea, .pending-actions select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dfe7df;
  border-radius: 8px;
  background: #fff;
  color: #202c26;
  font-size: 13px;
}

#create-map-form textarea { resize: vertical; }
#create-map-form input:not([type='checkbox']):focus, #create-map-form textarea:focus, .pending-actions select:focus { outline: 2px solid #b7cfbc; }

.primary-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 9px 15px;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.primary-button:hover { background: #255e41; }
.primary-button:disabled { opacity: .6; cursor: wait; }

.maps-section { margin-bottom: 28px; }
.section-heading { margin-bottom: 14px; }
.map-count { color: #758179; font-size: 12px; }
.map-list { display: grid; gap: 12px; }
.map-search { display: block; margin: 0 0 12px; }
.map-search input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #dfe7df;
  border-radius: 9px;
  background: #fbfcfa;
  color: #202c26;
  font-size: 13px;
}
.map-search input::placeholder { color: #89938b; }
.map-search input:focus { outline: 2px solid #b7cfbc; outline-offset: 1px; }
.map-search-empty { padding: 14px; border: 1px dashed #dfe7df; border-radius: 10px; text-align: center; }

.map-card { padding: 18px; }

.map-card-top, .map-card-actions, .map-point {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.map-card h3 { margin: 0; font-family: Manrope, sans-serif; font-size: 17px; }
.map-card-description { margin: 8px 0 12px; color: #68766d; font-size: 13px; line-height: 1.55; }
.map-card-meta { color: #7a867d; font-size: 11px; white-space: nowrap; }
.map-card-actions { justify-content: flex-start; margin: 14px 0 0; }
.map-card-actions { flex-wrap: wrap; }
.map-card-actions .primary-button { min-height: 34px; padding: 7px 11px; }
.map-share {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e4ebe4;
  border-radius: 10px;
  background: #f7f9f6;
}
.map-share-help, .map-share-status { grid-column: 1 / -1; margin: 0; color: #68766d; font-size: 11px; line-height: 1.45; }
.map-share-link {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #dfe7df;
  border-radius: 7px;
  background: #fff;
  color: #46564b;
  font-size: 11px;
}
.map-share-link:focus { outline: 2px solid #b7cfbc; }
.map-share .primary-button { min-height: 36px; padding: 7px 10px; white-space: nowrap; }
.map-share-disable { grid-column: 1 / -1; justify-self: start; color: #9a5147; }
.map-share-status:empty { display: none; }

.text-button {
  padding: 7px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.delete-map { color: #9a5147; }
.edit-map { color: #47664f; }
.edit-map-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e4ebe4;
  border-radius: 10px;
  background: #f7f9f6;
}
.edit-map-form[hidden] { display: none; }
.edit-map-form label {
  display: grid;
  gap: 5px;
  color: #46564b;
  font-size: 11px;
  font-weight: 650;
}
.edit-map-form input, .edit-map-form textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #dfe7df;
  border-radius: 7px;
  background: #fff;
  color: #202c26;
  font: inherit;
  font-size: 12px;
}
.edit-map-form textarea { resize: vertical; }
.edit-map-form input:focus, .edit-map-form textarea:focus { outline: 2px solid #b7cfbc; }
.edit-map-actions { display: flex; align-items: center; gap: 14px; }
.edit-map-actions .primary-button { min-height: 36px; }
.edit-map-actions button:disabled { opacity: .6; cursor: wait; }
.map-points { display: grid; gap: 0; margin-top: 12px; border-top: 1px solid #edf0ec; }
.map-points--scrollable {
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #bdcbbf transparent;
  scrollbar-width: thin;
}
.map-points--scrollable:focus-visible { outline: 2px solid #b7cfbc; outline-offset: 3px; }
.map-points--scrollable::-webkit-scrollbar { width: 7px; }
.map-points--scrollable::-webkit-scrollbar-thumb { border-radius: 7px; background: #bdcbbf; }
.map-point { padding: 10px 0; border-bottom: 1px solid #edf0ec; font-size: 12px; }
.map-point button { flex: 0 0 auto; }
.map-empty { margin: 8px 0 0; color: #7a867d; font-size: 12px; }
.pending-place { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 26px; padding: 20px; }
.pending-place[hidden] { display: none; }
.pending-place .eyebrow { margin-bottom: 6px; }
.pending-place h2 { font-size: 18px; }
.pending-place > div > p:last-child { margin: 5px 0 0; font-size: 12px; }
.pending-actions { display: flex; flex: 0 0 min(340px, 48%); gap: 8px; }
.pending-actions select { min-width: 0; }
.pending-actions .primary-button { flex: 0 0 auto; }
.account-footer { padding-top: 18px; border-top: 1px solid #dfe7df; color: #7a867d; font-size: 12px; }

@media (max-width: 680px) {
  .account-page { width: min(100% - 24px, 520px); padding-top: 18px; }
  .intro { margin: 44px 0 22px; }
  .create-map-panel { grid-template-columns: 1fr; gap: 18px; padding: 20px; }
  .pending-place { align-items: stretch; flex-direction: column; }
  .pending-actions { flex-basis: auto; }
}

@media (max-width: 420px) {
  .pending-actions { flex-direction: column; }
  .pending-actions .primary-button { width: 100%; }
  .map-card-top { align-items: flex-start; flex-direction: column; gap: 6px; }
  .map-share { grid-template-columns: 1fr; }
  .map-share-link, .map-share .primary-button { width: 100%; }
}
