/* Compact gift history and picker; purchase confirmation keeps its own layout. */
html body:has(#asProfile) :is(#userGifts,#exampleModal).pp-gifts-compact.modal {
  padding: 16px !important;
}
html body:has(#asProfile) :is(#userGifts,#exampleModal).pp-gifts-compact .modal-dialog {
  width: 100% !important;
  max-width: 920px !important;
  margin: 0 auto !important;
}
html body:has(#asProfile) :is(#userGifts,#exampleModal).pp-gifts-compact .modal-content {
  display: flex;
  flex-direction: column;
  padding: 16px !important;
  max-height: min(700px,calc(100vh - 32px));
  max-height: min(700px,calc(100dvh - 32px));
  overflow: hidden !important;
}
html body:has(#asProfile) :is(#userGifts,#exampleModal).pp-gifts-compact .modal-header {
  gap: 12px;
  padding: 0 0 10px !important;
  margin: 0 0 12px !important;
  align-items: center;
}
html body:has(#asProfile) :is(#userGifts,#exampleModal).pp-gifts-compact .modal-title {
  min-width: 0;
  height: auto !important;
  font-size: 16px !important;
  font-weight: 700;
  line-height: 1.4 !important;
  white-space: normal;
  overflow-wrap: anywhere;
}
html body:has(#asProfile) :is(#userGifts,#exampleModal).pp-gifts-compact .close2 {
  flex: 0 0 32px;
  width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  font-size: 22px !important;
}
html body:has(#asProfile) #userGifts.pp-gifts-compact .userGifts,
html body:has(#asProfile) #exampleModal.pp-gifts-compact .modal-body {
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 0 4px 0 0 !important;
}
html body:has(#asProfile) #userGifts.pp-gifts-compact .userGifts {
  display: grid !important;
  grid-template-columns: repeat(3,minmax(0,1fr));
  align-items: start;
  gap: 10px;
}
html body:has(#asProfile) #userGifts.pp-gifts-compact .userGift {
  display: grid !important;
  grid-template-columns: 72px minmax(0,1fr);
  grid-column: auto !important;
  align-items: center;
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  margin: 0;
  padding: 10px;
  gap: 8px 10px;
  border-radius: 10px;
}
html body:has(#asProfile) #userGifts.pp-gifts-compact .giftPicture {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  margin: 0;
}
html body:has(#asProfile) #userGifts.pp-gifts-compact .giftPicture img {
  display: block;
  width: 72px !important;
  height: 72px !important;
  padding: 0;
  object-fit: contain;
  border-radius: 8px;
}
html body:has(#asProfile) #userGifts.pp-gifts-compact .senderInfo {
  grid-column: 2;
  grid-row: 1;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 7px;
}
html body:has(#asProfile) #userGifts.pp-gifts-compact .senderInfo > img,
html body:has(#asProfile) #userGifts.pp-gifts-compact .senderInfo > a > img {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  object-fit: cover;
}
html body:has(#asProfile) #userGifts.pp-gifts-compact .senderInfo > a:has(> img) { flex: 0 0 28px; }
html body:has(#asProfile) #userGifts.pp-gifts-compact .sendAuthor { font-size: 13px; line-height: 1.35; }
html body:has(#asProfile) #userGifts.pp-gifts-compact .sendDate { font-size: 11px; line-height: 1.4; padding-top: 3px; }
html body:has(#asProfile) #userGifts.pp-gifts-compact .giftMessage {
  grid-column: 1 / -1;
  text-align: left;
  font-size: 13px;
  line-height: 1.45;
  padding: 0;
  margin: 0;
}
html body:has(#asProfile) #userGifts.pp-gifts-compact .giftMessage:empty { display: none; }
html body:has(#asProfile) #exampleModal.pp-gifts-compact .gifts-row { margin: 0; gap: 6px; }
html body:has(#asProfile) #exampleModal.pp-gifts-compact .category-name { margin: 0; padding: 0; font-size: 13px; line-height: 1.5; }
html body:has(#asProfile) #exampleModal.pp-gifts-compact .gifts-items-container { display: block; min-width: 0; }
html body:has(#asProfile) #exampleModal.pp-gifts-compact .manyElements::after { display: none; }
html body:has(#asProfile) #exampleModal.pp-gifts-compact .gifts-items {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(76px,1fr));
  gap: 8px;
  padding: 0;
  overflow: visible;
}
html body:has(#asProfile) #exampleModal.pp-gifts-compact .gift {
  display: flex;
  align-items: center;
  min-width: 0;
  width: auto;
  padding: 4px 0 0;
  border-radius: 9px !important;
}
html body:has(#asProfile) #exampleModal.pp-gifts-compact .gift img {
  display: block;
  width: 68px;
  height: 68px;
  max-width: 100%;
  padding: 0;
  border-radius: 6px;
  object-fit: contain;
}
html body:has(#asProfile) #exampleModal.pp-gifts-compact .price-overlay {
  position: static !important;
  width: 100%;
  height: 22px;
  min-height: 22px;
  font-size: 11px;
  line-height: 22px;
  text-align: center;
  opacity: 1;
  transform: none;
}
html body:has(#asProfile) #exampleModal.pp-gifts-compact .modal-body hr { margin: 12px 0; }
html body:has(#asProfile) #exampleModal.pp-gifts-compact .pp-gift-category-control {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}
html body:has(#asProfile) #exampleModal.pp-gifts-compact .pp-gift-category-control label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
html body:has(#asProfile) #exampleModal.pp-gifts-compact .pp-gift-category-control select {
  flex: 1;
  min-width: 0;
  max-width: 280px;
  height: 34px !important;
  min-height: 34px !important;
  padding: 4px 30px 4px 10px !important;
  font-size: 13px !important;
}
html body:has(#asProfile) #exampleModal.pp-gifts-compact.pp-gift-categories-ready .gifts-row[hidden],
html body:has(#asProfile) #exampleModal.pp-gifts-compact.pp-gift-categories-ready .category-name,
html body:has(#asProfile) #exampleModal.pp-gifts-compact.pp-gift-categories-ready .gifts-buyList > hr { display: none !important; }
@media (max-width: 760px) {
  html body:has(#asProfile) #userGifts.pp-gifts-compact .userGifts { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 520px) {
  html body:has(#asProfile) :is(#userGifts,#exampleModal).pp-gifts-compact.modal { padding: 10px !important; }
  html body:has(#asProfile) :is(#userGifts,#exampleModal).pp-gifts-compact .modal-content {
    padding: 12px !important;
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }
  html body:has(#asProfile) #userGifts.pp-gifts-compact .userGifts { grid-template-columns: minmax(0,1fr); gap: 8px; }
}
