:root {
  --saved-ink: #172033;
  --saved-muted: #667085;
  --saved-line: #e5eaf1;
  --saved-blue: #1d62f0;
  --saved-blue-dark: #1149b8;
  --saved-soft: #f5f8fd;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.saved-page {
  margin: 0;
  min-height: 100vh;
  background: #fff;
  color: var(--saved-ink);
  font-family: Arial, Helvetica, sans-serif;
}

.saved-page main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 58px 0 84px;
}

.saved-hero {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--saved-line);
}

.saved-eyebrow {
  margin: 0 0 10px;
  color: var(--saved-blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.saved-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.saved-heading-row h1 {
  margin: 0;
  color: #273046;
  font: 700 clamp(38px, 5vw, 60px)/1.02 Georgia, "Times New Roman", serif;
  letter-spacing: -0.035em;
}

.saved-heading-row p {
  margin: 14px 0 0;
  color: var(--saved-muted);
  font-size: 17px;
  line-height: 1.5;
}

.browse-button,
.state-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 20px;
  background: var(--saved-blue);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(29, 98, 240, 0.18);
}

.browse-button:hover,
.state-button:hover {
  background: var(--saved-blue-dark);
}

.saved-content {
  padding-top: 30px;
}

.saved-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.saved-grid:empty {
  display: none;
}

.saved-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 210px;
  overflow: hidden;
  border: 1px solid rgba(29, 98, 240, 0.1);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(24, 44, 82, 0.08);
}

.saved-card-media {
  position: relative;
  min-height: 210px;
  background: #dfe7f2 center/cover no-repeat;
}

.saved-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 28, 47, 0.02), rgba(16, 28, 47, 0.16));
}

.remove-saved {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(16, 28, 47, 0.2);
}

.remove-saved img {
  width: 19px;
  height: 19px;
  filter: invert(34%) sepia(82%) saturate(2300%) hue-rotate(329deg) brightness(86%);
}

.remove-saved:disabled {
  cursor: wait;
  opacity: 0.65;
}

.saved-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 22px;
}

.saved-card-kicker {
  margin: 0 0 8px;
  color: var(--saved-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.saved-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.saved-card-location,
.saved-card-detail {
  margin: 8px 0 0;
  color: var(--saved-muted);
  font-size: 14px;
  line-height: 1.4;
}

.saved-card-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 18px;
}

.saved-card-price {
  color: #283249;
  font-size: 13px;
}

.saved-card-price strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
}

.view-listing {
  color: var(--saved-blue-dark);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.saved-state {
  min-height: 380px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 50px 20px;
  border-radius: 28px;
  background: var(--saved-soft);
  text-align: center;
}

.saved-state.is-hidden {
  display: none;
}

.state-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 24px rgba(24, 44, 82, 0.1);
}

.state-icon img {
  width: 28px;
  height: 28px;
}

.saved-state h2 {
  margin: 0;
  font-size: 26px;
}

.saved-state p {
  max-width: 470px;
  margin: 10px 0 22px;
  color: var(--saved-muted);
  line-height: 1.5;
}

.unavailable-card {
  grid-template-columns: 1fr;
  min-height: 190px;
}

@media (max-width: 900px) {
  .saved-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .saved-page main {
    width: min(100% - 28px, 1180px);
    padding: 34px 0 60px;
  }

  .saved-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .saved-card {
    grid-template-columns: 1fr;
  }

  .saved-card-media {
    min-height: 230px;
  }
}
