/* ==========================================================
   pages-social.css — T-011 (OPUS-L 소유)

   담당 화면 전용 스타일
     · 전역 알림 패널 (#notiDrawer)  · #/wishlist  · #/creator/:id  · #/me

   index.html 수정이 금지되어 있어 js/pages/wishlist.js 가
   <link rel="stylesheet" href="css/pages-social.css"> 를 1회 주입한다.
   (코어가 index.html 에 직접 <link> 를 추가하면 주입은 자동으로 건너뛴다)

   접두사: .swl-* (SWYRILLY social) / 알림 패널은 .notidrawer .notiitem
   ========================================================== */

/* ==========================================================
   0. 공통 조각
   ========================================================== */

.swl-section {
  margin-top: 34px;
}

.swl-section:first-child {
  margin-top: 0;
}

.swl-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.swl-muted {
  color: var(--text-sub);
  font-size: var(--fs-sm);
}

.swl-btn-sm {
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-xs);
  font-weight: 700;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.swl-btn-sm:hover {
  background: var(--bg-soft);
}

.swl-btn-sm[disabled] {
  opacity: 0.45;
  cursor: default;
}

.swl-btn-sm[disabled]:hover {
  background: var(--surface);
}

/* ==========================================================
   1. 전역 알림 패널 (드로어 재사용 — .drawer / .drawer__panel)
   ========================================================== */

/* 헤더 종 아이콘: 숫자 뱃지를 쓰면 코어의 점 뱃지는 감춘다 */
.swl-notibell #notiDot {
  display: none;
}

.notidrawer .drawer__panel {
  width: min(400px, 100%);
}

.notidrawer__readall {
  flex: none;
  height: 30px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-sub);
  font-size: var(--fs-2xs);
  font-weight: 700;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.notidrawer__readall:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.notidrawer__readall[disabled] {
  opacity: 0.4;
  cursor: default;
}

.notidrawer__list {
  padding: 6px 0 8px;
}

.notiitem {
  position: relative;
}

.notiitem__link {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 20px 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  transition: background var(--dur) var(--ease);
}

.notiitem__link:hover {
  background: var(--bg-soft);
}

.notiitem__link:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: -2px;
}

.notiitem__thumb {
  flex: none;
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  color: var(--text-sub);
}

.notiitem__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.notiitem__thumb img.is-failed {
  display: none;
}

.notiitem--order .notiitem__thumb {
  color: var(--purple);
}

.notiitem--coupon .notiitem__thumb {
  color: var(--red-strong);
}

.notiitem--live .notiitem__thumb {
  color: var(--red);
}

.notiitem__text {
  min-width: 0;
  flex: 1;
}

.notiitem__title {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.4;
}

.notiitem__body {
  display: block;
  margin-top: 3px;
  font-size: var(--fs-xs);
  color: var(--text-sub);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.notiitem__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  font-size: var(--fs-2xs);
  color: var(--text-faint);
}

.notiitem__tag {
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  font-weight: 700;
  color: var(--text-sub);
}

.notiitem__dot {
  position: absolute;
  top: 18px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}

.notiitem.is-read .notiitem__title {
  font-weight: 600;
  color: var(--text-sub);
}

.notiitem.is-read .notiitem__thumb {
  opacity: 0.6;
}

.notidrawer__empty {
  padding: 40px 20px;
}

.notidrawer__foot {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}

.notidrawer__note {
  font-size: var(--fs-2xs);
  color: var(--text-faint);
  text-align: center;
}

/* ==========================================================
   2. #/wishlist
   ========================================================== */

.swl-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.swl-toolbar__count {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-sub);
}

.swl-toolbar__spacer {
  margin-left: auto;
}

.swl-wishcard {
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.swl-wishcard.is-removing {
  opacity: 0;
  transform: scale(0.94);
}

.swl-heart.is-on svg {
  fill: var(--red);
  stroke: var(--red);
}

.swl-wishcard .product__soldout {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.62);
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--text-sub);
  z-index: 2;
}

/* ==========================================================
   3. #/creator/:id
   ========================================================== */

.swl-hero {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--dark);
  color: var(--text-on-dark);
  overflow: hidden;
  position: relative;
}

.swl-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -110px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(198, 242, 46, 0.22) 0%,
    rgba(198, 242, 46, 0.06) 48%,
    rgba(198, 242, 46, 0) 72%
  );
  pointer-events: none;
}

.swl-hero__avatar {
  flex: none;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.28);
  background: var(--dark-3);
}

.swl-hero__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.swl-hero__avatar img.is-failed {
  display: none;
}

.swl-hero__main {
  min-width: 0;
  flex: 1;
  position: relative;
  z-index: 1;
}

.swl-hero__top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.swl-hero__name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.swl-hero__name .verified {
  color: var(--lime);
}

.swl-hero__handle {
  font-size: var(--fs-sm);
  color: var(--text-on-dark-sub);
}

.swl-hero__bio {
  margin-top: 10px;
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text-on-dark-sub);
}

.swl-hero__stats {
  display: flex;
  gap: 22px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.swl-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.swl-stat__value {
  font-size: 17px;
  font-weight: 800;
}

.swl-stat__label {
  font-size: var(--fs-2xs);
  color: var(--text-on-dark-faint);
}

.swl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.swl-tag {
  height: 24px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  background: var(--glass);
  border: 1px solid var(--line-on-dark);
  font-size: var(--fs-2xs);
  font-weight: 600;
  color: var(--text-on-dark-sub);
}

.swl-hero__actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* 팔로우 버튼 — app.js syncFollows() 가 textContent 를 갈아끼우므로 텍스트만 둔다 */
.swl-follow {
  margin-left: 0;
  height: 40px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-body);
  font-weight: 800;
  background: var(--lime);
  border: 1px solid var(--lime);
  color: #10130a;
  backdrop-filter: none;
}

.swl-follow:hover {
  background: var(--lime-strong);
}

.swl-follow.is-on {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.swl-follow.is-on:hover {
  background: rgba(255, 255, 255, 0.14);
}

.swl-hero__ghost {
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: var(--fs-body);
  font-weight: 700;
}

.swl-hero__ghost:hover {
  background: rgba(255, 255, 255, 0.24);
}

.swl-grid-shorts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--gap);
}

/* ==========================================================
   4. #/me
   ========================================================== */

.swl-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  flex-wrap: wrap;
}

.swl-profile__avatar {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-soft);
}

.swl-profile__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.swl-profile__avatar img.is-failed {
  display: none;
}

.swl-profile__main {
  min-width: 0;
  flex: 1;
}

.swl-profile__name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.swl-profile__sub {
  margin-top: 4px;
  font-size: var(--fs-sm);
  color: var(--text-sub);
}

.swl-profile__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.swl-editform {
  display: grid;
  gap: 10px;
  padding: 0 20px 20px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 16px;
}

.swl-field {
  display: grid;
  gap: 5px;
}

.swl-field label {
  font-size: var(--fs-2xs);
  font-weight: 700;
  color: var(--text-sub);
}

.swl-field input {
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-alt);
  font-size: var(--fs-body);
  color: var(--text);
  font-family: inherit;
}

.swl-field input:focus {
  outline: 2px solid var(--purple-soft);
  outline-offset: -1px;
}

.swl-editform__row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.swl-hub {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.swl-hubitem {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  text-align: left;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.swl-hubitem:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.swl-hubitem__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--purple);
}

.swl-hubitem__label {
  font-size: var(--fs-body);
  font-weight: 700;
}

.swl-hubitem__value {
  font-size: var(--fs-2xs);
  color: var(--text-sub);
}

.swl-coupons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.swl-couponcard {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
}

.swl-couponcard.is-owned {
  border-style: solid;
  border-color: var(--lime-strong);
  background: linear-gradient(180deg, rgba(198, 242, 46, 0.1), var(--surface));
}

.swl-couponcard__value {
  flex: none;
  min-width: 74px;
  text-align: center;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--purple);
}

.swl-couponcard__main {
  min-width: 0;
  flex: 1;
}

.swl-couponcard__name {
  font-size: var(--fs-body);
  font-weight: 700;
}

.swl-couponcard__desc {
  margin-top: 3px;
  font-size: var(--fs-2xs);
  color: var(--text-sub);
  line-height: 1.5;
}

.swl-couponcard__code {
  display: inline-block;
  margin-top: 6px;
  padding: 1px 7px;
  border-radius: var(--radius-xs);
  background: var(--bg-soft);
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-sub);
}

.swl-couponcard__act {
  flex: none;
}

.swl-chiplist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swl-followchip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 700;
  transition: background var(--dur) var(--ease);
}

.swl-followchip:hover {
  background: var(--bg-soft);
}

.swl-followchip__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-soft);
  flex: none;
}

.swl-followchip__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.swl-followchip__avatar img.is-failed {
  display: none;
}

.swl-recent {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swl-recent a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--text-sub);
}

.swl-recent a:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.swl-logout {
  margin-top: 26px;
  display: flex;
  justify-content: center;
}

/* ==========================================================
   5. 반응형
   ========================================================== */

@media (max-width: 1024px) {
  .swl-grid-shorts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .swl-coupons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .swl-hub {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .swl-grid-shorts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .swl-hero {
    gap: 14px;
    padding: 18px;
  }

  .swl-hero__avatar {
    width: 68px;
    height: 68px;
  }

  .swl-hero__name {
    font-size: 18px;
  }

  .swl-coupons {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .swl-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .swl-grid-shorts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .swl-hero__stats {
    gap: 16px;
  }

  .swl-follow,
  .swl-hero__ghost {
    flex: 1;
  }

  .swl-profile {
    padding: 16px;
  }

  .swl-couponcard {
    flex-wrap: wrap;
  }

  .notiitem__link {
    padding: 12px 20px 12px 14px;
  }
}
