/* Biblioteca personală: taburi comune pe toate dimensiunile și o experiență
   desktop aliniată la shell-ul paginilor publice principale. */
body.saved-page {
  background: var(--listing-page-background, #f6f7fb);
}

.saved-page-main {
  padding: 12px 12px 42px;
}

.saved-tab-list {
  display: flex;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  scrollbar-width: none;
}

.saved-tab-list::-webkit-scrollbar {
  display: none;
}

.saved-tab-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  color: #676277;
  background: transparent;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.saved-tab-button:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.2);
  outline-offset: 2px;
}

.saved-tab-icon,
.saved-tab-icon .lucide {
  width: 18px;
  height: 18px;
}

.saved-tab-copy {
  display: flex;
  align-items: center;
}

.saved-tab-copy small {
  display: none;
}

.saved-tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  border-radius: 999px;
  color: #6b6478;
  background: rgba(100, 92, 120, 0.09);
  font-size: 0.7rem;
  font-weight: 800;
}

.saved-tab-button--favorites.is-active {
  color: #be123c;
  background: #fff1f2;
  box-shadow: 0 5px 16px rgba(190, 18, 60, 0.11);
}

.saved-tab-button--favorites.is-active .saved-tab-count {
  color: #fff;
  background: #e11d48;
}

.saved-tab-button--participations.is-active {
  color: #5b21b6;
  background: #f5f3ff;
  box-shadow: 0 5px 16px rgba(91, 33, 182, 0.11);
}

.saved-tab-button--participations.is-active .saved-tab-count {
  color: #fff;
  background: #7c3aed;
}

.saved-filter-bar {
  display: flex;
  gap: 8px;
  max-width: 100%;
  margin: 0 0 16px;
  padding: 2px 1px 5px;
  overflow-x: auto;
  scroll-padding-inline: 1px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.saved-filter-bar[hidden],
.saved-filter-empty-state[hidden] {
  display: none !important;
}

.saved-filter-bar::-webkit-scrollbar {
  display: none;
}

.saved-filter-button {
  --saved-filter-accent: #e11d48;
  --saved-filter-soft: #fff1f2;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid rgba(55, 48, 77, 0.11);
  border-radius: 13px;
  color: #625c70;
  background: rgba(255, 255, 255, 0.84);
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(39, 31, 64, 0.035);
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, translate 100ms ease;
}

.saved-filter-button[data-saved-filter="events"] {
  --saved-filter-accent: #7c3aed;
  --saved-filter-soft: #f5f3ff;
}

.saved-filter-button[data-saved-filter="places"] {
  --saved-filter-accent: #059669;
  --saved-filter-soft: #ecfdf5;
}

.saved-filter-button[data-saved-filter="shopping"] {
  --saved-filter-accent: #db2777;
  --saved-filter-soft: #fdf2f8;
}

.saved-filter-button[data-saved-filter="promotions"] {
  --saved-filter-accent: #d97706;
  --saved-filter-soft: #fffbeb;
}

.saved-filter-button > .lucide {
  width: 16px;
  height: 16px;
  color: var(--saved-filter-accent);
  stroke-width: 2.2px;
}

.saved-filter-button.is-active {
  border-color: color-mix(in srgb, var(--saved-filter-accent) 28%, white);
  color: var(--saved-filter-accent);
  background: var(--saved-filter-soft);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--saved-filter-accent) 12%, transparent);
}

.saved-filter-button:active {
  translate: 0 1px;
}

.saved-filter-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--saved-filter-accent) 24%, transparent);
  outline-offset: 2px;
}

.saved-filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 999px;
  color: #716a7d;
  background: rgba(60, 51, 84, 0.075);
  font-size: 0.65rem;
  font-weight: 820;
}

.saved-filter-button.is-active .saved-filter-count {
  color: #fff;
  background: var(--saved-filter-accent);
}

.saved-filter-empty-state {
  width: 100%;
}

.saved-empty-icon-wrap {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 14px;
  border-radius: 24px;
  color: #e11d48;
  background: #fff1f2;
}

.saved-empty-icon-wrap--participations {
  color: #7c3aed;
  background: #f5f3ff;
}

.saved-empty-icon-wrap .saved-empty-icon {
  width: 30px;
  height: 30px;
  margin: 0;
  color: currentColor;
}

.saved-participations-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Cardurile sunt flexibile, iar titlurile lungi trebuie să cedeze spațiu
   imaginii în loc să mărească lățimea cardului pe ecranele înguste. */
.saved-participation-card,
.saved-participation-card > .d-flex,
.saved-participation-main,
.saved-participation-copy {
  min-width: 0;
}

.saved-participation-main {
  width: 100%;
}

.saved-participation-copy {
  flex: 1 1 0;
  overflow: hidden;
}

.saved-participation-copy .badge {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-participation-title {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (min-width: 992px) {
  body.saved-page {
    --saved-rose: #e11d48;
    --saved-violet: #7c3aed;
    --saved-ink: #211d2e;
    --saved-muted: #777185;
    --saved-border: rgba(55, 48, 77, 0.1);
    background: #f6f7fb !important;
  }

  body.saved-page .saved-page-main {
    width: calc(100% - clamp(32px, 4vw, 64px));
    max-width: 1100px !important;
    margin-inline: auto;
    padding: 12px 0 44px !important;
  }

  .saved-desktop-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
    gap: 20px;
  }

  .saved-library-panel {
    min-width: 0;
    margin-top: 12px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .saved-tab-list {
    width: 100%;
    gap: 10px;
    padding: 6px;
    overflow: visible;
    border-radius: 18px;
    background: #fff;
  }

  .saved-tab-button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 62px;
    padding: 9px 12px;
    border-radius: 14px;
    text-align: left;
  }

  .saved-tab-button:hover {
    color: var(--saved-ink);
    background: rgba(255, 255, 255, 0.72);
  }

  .saved-tab-button.is-active {
    background: #fff;
    box-shadow: 0 8px 24px rgba(39, 31, 64, 0.09);
  }

  .saved-tab-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(100, 92, 120, 0.07);
  }

  .saved-tab-button--favorites.is-active .saved-tab-icon {
    background: #fff1f2;
  }

  .saved-tab-button--participations.is-active .saved-tab-icon {
    background: #f5f3ff;
  }

  .saved-tab-copy {
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    line-height: 1.2;
  }

  .saved-tab-copy strong {
    color: currentColor;
    font-size: 0.86rem;
    font-weight: 780;
  }

  .saved-tab-copy small {
    display: block;
    overflow: hidden;
    width: 100%;
    margin-top: 3px;
    color: #8b8596;
    font-size: 0.67rem;
    font-weight: 560;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

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

  .saved-card {
    position: relative;
    min-width: 0;
    min-height: 104px;
    border: 1px solid var(--saved-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(39, 31, 64, 0.045);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  }

  @media (hover: hover) and (pointer: fine) {
    .saved-card:hover {
      border-color: color-mix(in srgb, var(--saved-card-accent, var(--saved-rose)) 30%, white);
      box-shadow: 0 13px 28px rgba(39, 31, 64, 0.09);
      transform: translateY(-2px);
    }
  }

  .saved-card--event {
    --saved-card-accent: #8b5cf6;
  }

  .saved-card--place {
    --saved-card-accent: #10b981;
  }

  .saved-card--promo {
    --saved-card-accent: #f59e0b;
  }

  .saved-card-main {
    gap: 12px;
    min-width: 0;
    padding: 11px 8px 11px 11px;
  }

  .saved-card-img,
  .saved-card-img-placeholder {
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
    border-radius: 14px;
    object-fit: cover;
    background: #f2f0f7;
  }

  .saved-card-type {
    color: var(--saved-card-accent, var(--saved-rose));
    font-size: 0.64rem;
  }

  .saved-card-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.89rem;
    line-height: 1.28;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .saved-card-meta {
    font-size: 0.72rem;
  }

  .saved-card-remove {
    align-self: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    margin-right: 8px;
    border: 0;
    border-radius: 12px;
    background: #f8f7fa;
  }

  .saved-card-remove:hover,
  .saved-card-remove:focus-visible {
    color: #be123c;
    background: #fff1f2;
  }

  .saved-participation-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--saved-border) !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 22px rgba(39, 31, 64, 0.045) !important;
  }

  @media (hover: hover) and (pointer: fine) {
    .saved-participation-card:hover {
      border-color: rgba(124, 58, 237, 0.25) !important;
      box-shadow: 0 13px 28px rgba(39, 31, 64, 0.085) !important;
    }
  }

  .saved-participation-main img,
  .saved-participation-image-placeholder {
    width: 72px !important;
    height: 72px !important;
    flex: 0 0 72px;
    border-radius: 13px !important;
    object-fit: cover;
    background: #f2f0f7;
  }

  .saved-participation-footer {
    align-items: flex-start !important;
    min-height: 42px;
  }

  .saved-reminder-row {
    min-width: 0;
  }

  .saved-reminder-row label {
    line-height: 1.25;
  }

  .saved-empty-state {
    min-height: 310px;
    padding: 56px 34px;
    border: 1px dashed rgba(55, 48, 77, 0.16);
    border-radius: 20px;
    background: linear-gradient(145deg, #fff, #faf9fc);
  }

  .saved-desktop-rail {
    position: sticky;
    top: var(--public-desktop-rail-top);
    flex-direction: column;
    gap: 14px;
    padding-top: 12px;
  }

  .saved-rail-card {
    border: 1px solid var(--saved-border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 30px rgba(39, 31, 64, 0.055);
  }

  .saved-rail-eyebrow {
    color: var(--saved-rose);
    font-size: 0.66rem;
    font-weight: 820;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .saved-rail-card--explore {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 17px;
  }

  .saved-rail-card--explore .saved-rail-eyebrow {
    margin: 0 3px 4px;
    color: #777185;
  }

  .saved-rail-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 46px;
    padding: 9px 11px;
    border-radius: 13px;
    color: var(--saved-ink);
    font-size: 0.77rem;
    font-weight: 720;
    text-decoration: none;
    transition: background 160ms ease, transform 160ms ease;
  }

  .saved-rail-link:hover,
  .saved-rail-link:focus-visible {
    color: var(--saved-ink);
    background: #f7f6fa;
    transform: translateX(2px);
  }

  .saved-rail-link span {
    display: flex;
    align-items: center;
    gap: 9px;
  }

  .saved-rail-link .lucide {
    width: 17px;
    height: 17px;
  }

  .saved-rail-link > .lucide {
    width: 15px;
    height: 15px;
    color: #aaa4b4;
  }

  .saved-rail-link--events span .lucide {
    color: #8b5cf6;
  }

  .saved-rail-link--places span .lucide {
    color: #10b981;
  }

  .saved-rail-link--shopping span .lucide {
    color: #ec4899;
  }

  .saved-rail-link--promotions span .lucide {
    color: #f59e0b;
  }

  .saved-rail-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 4px 8px;
    color: #777185;
  }

  .saved-rail-note > .lucide {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    color: #10b981;
  }

  .saved-rail-note span {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .saved-rail-note strong {
    color: #4f495d;
    font-size: 0.7rem;
  }

  .saved-rail-note small {
    font-size: 0.64rem;
    line-height: 1.35;
  }
}

@media (min-width: 992px) and (max-width: 1099.98px) {
  .saved-desktop-layout {
    grid-template-columns: minmax(0, 1fr) 286px;
  }

  .saved-list,
  .saved-participations-list {
    grid-template-columns: 1fr;
  }
}

/* Promotion artwork remains readable in the personal library too. */
.saved-card--promo .saved-card-img {
  flex:0 0 clamp(100px,30%,144px) !important;
  width:clamp(100px,30%,144px) !important;
  height:auto !important;
  aspect-ratio:4 / 5;
  object-fit:contain;
}

.saved-card--promo .saved-card-title {
  display:-webkit-box;
  white-space:normal;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
}
