/* 내 신청 v2 (2026-11-01) — 프로그램 신청: '다음 일정' 카드 + 날짜별 목록.
   시안·설계 근거: 저장소 MY-APPLICATIONS-UX-PLAN-20261101.md. index.html 의 myApplicationListHtml() 가 그리는 마크업 전용.
   노랑(#ffd21e)은 '내가 할 일'(결제 필요·자리 생김)에만 쓴다. */

#requests {
  --ma-ink: #0d1217;
  --ma-ink-2: #38424c;
  --ma-muted: #5f6970;
  --ma-faint: #89929a;
  --ma-hair: #e1e5e0;
  --ma-hair-2: #cfd6cf;
  --ma-paper: #f1f3ef;
  --ma-card: #ffffff;
  --ma-ticket: #10171e;
  --ma-brand: #ffd21e;
  --ma-go: #12704a;
  --ma-go-bg: #e2f0e7;
  --ma-wait: #36536f;
  --ma-wait-bg: #e6ecf2;
  --ma-stop: #a8322a;
  --ma-stop-bg: #f7e7e4;
  --ma-mute-bg: #e9ece8;
  word-break: keep-all;
}

/* 상자 안 상자 줄이기: 바깥 흰 패널을 걷어 내고 목록 묶음만 흰색으로 */
#requests > .panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding-left: 8px;
  padding-right: 8px;
}
#requests .my-applications-toolbar h2 {
  font-size: 28px;
  letter-spacing: -0.025em;
}

/* 내 신청에서는 떠 있는 1:1 문의 캐릭터를 숨긴다(목록 끝·각 신청의 '1:1 문의'로 대신). 열린 문의 창은 그대로 보인다. */
body:has(#requests.view.active) #supportToggle {
  display: none !important;
}

#requests .ma-list {
  display: grid;
  gap: 0;
}

/* ── 다음 일정 ── */
#requests .ma-next {
  position: relative;
  display: grid;
  gap: 8px;
  margin: 0 0 6px;
  padding: 18px 18px 16px;
  border-radius: 22px;
  background: var(--ma-ticket);
  color: #fff;
  cursor: pointer;
}
#requests .ma-next-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.62);
}
#requests .ma-next-top b {
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--ma-brand);
}
#requests .ma-next-date {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
}
#requests .ma-next-time {
  margin: 0;
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
#requests .ma-next-time span {
  margin-left: 6px;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.58);
}
#requests .ma-next-title {
  margin: 6px 0 0;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 600;
  color: #fff;
  overflow-wrap: anywhere;
}
#requests .ma-next-meta {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.66);
}
#requests .ma-next-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 6px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}
#requests .ma-next-status .ma-cd {
  color: #fff;
}
#requests .ma-next-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
#requests .ma-next-actions .btn {
  flex: 1;
}
#requests .ma-next .ma-pill.is-go { background: rgba(120, 220, 165, 0.16); color: #9fe6bf; }
#requests .ma-next .ma-pill.is-wait { background: rgba(170, 200, 230, 0.16); color: #c3d8ee; }
#requests .ma-next .ma-pill.is-mute { background: rgba(255, 255, 255, 0.12); color: #e5eaee; }
#requests .ma-next-more {
  margin: 0 0 6px;
  padding: 4px 18px 14px;
  border-radius: 20px;
  background: var(--ma-card);
}

/* ── 버튼 (기존 .btn·결제 버튼 모양을 이 화면 안에서만 덮어씀) ── */
#requests .ma-list .btn,
#requests .ma-next-actions .btn {
  min-height: 0;
  height: 48px;
  margin: 0;
  padding: 0 18px;
  border: 0;
  border-radius: 13px;
  box-shadow: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  background: var(--ma-ink);
  color: #fff;
  width: auto;
}
#requests .ma-next-actions .btn {
  background: var(--ma-brand);
  color: var(--ma-ink);
}
#requests .ma-next-actions .ma-btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
#requests .ma-act .btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14.5px;
}
#requests .ma-list .ma-btn-quiet,
#requests .ma-act .ma-btn-quiet {
  background: var(--ma-mute-bg);
  color: var(--ma-ink);
}
#requests .ma-list .btn[disabled] {
  opacity: 0.5;
}

/* ── 날짜별 목록 ── */
#requests .ma-sec {
  margin: 18px 2px 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ma-muted);
}
#requests .ma-day {
  margin-top: 16px;
}
#requests .ma-day-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin: 0 2px 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ma-ink);
}
#requests .ma-day-h span + span {
  font-size: 14px;
  font-weight: 600;
  color: var(--ma-muted);
  font-variant-numeric: tabular-nums;
}
#requests .ma-group {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  background: var(--ma-card);
  box-shadow: 0 0 0 1px rgba(13, 18, 23, 0.05);
}
#requests .ma-row {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 28px;
  gap: 0 10px;
  padding: 15px 8px 15px 16px;
  cursor: pointer;
}
#requests .ma-row + .ma-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 78px;
  right: 0;
  height: 1px;
  background: var(--ma-hair);
}
#requests .ma-row.is-open {
  background: #f8faf7;
}
#requests .ma-time {
  display: flex;
  flex-direction: column;
  padding-top: 1px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
#requests .ma-time b {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ma-ink);
}
#requests .ma-time span {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ma-faint);
}
#requests .ma-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}
#requests .ma-title {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.38;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--ma-ink);
  overflow-wrap: anywhere;
}
#requests .ma-row.is-open .ma-title {
  -webkit-line-clamp: unset;
}
#requests .ma-meta {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ma-muted);
}
#requests .ma-status {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 5px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ma-ink-2);
}
#requests .ma-status .ma-pill {
  margin-top: -1px;
}
#requests .ma-act {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
#requests .ma-row.is-done .ma-title { color: var(--ma-ink-2); }
#requests .ma-row.is-done .ma-time b { color: var(--ma-muted); }
#requests .ma-chev {
  align-self: center;
  width: 28px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  position: relative;
  cursor: pointer;
}
#requests .ma-chev::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ma-hair-2);
  border-bottom: 2px solid var(--ma-hair-2);
  transform: translate(-60%, -70%) rotate(45deg);
}
#requests .ma-row.is-open .ma-chev::after {
  transform: translate(-60%, -30%) rotate(225deg);
}
#requests .ma-more {
  grid-column: 2 / -1;
  margin-top: 12px;
  cursor: auto;
}

/* 배지 */
#requests .ma-pill {
  display: inline-flex;
  flex: none;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
#requests .ma-pill.is-act { background: var(--ma-brand); color: var(--ma-ink); }
#requests .ma-pill.is-go { background: var(--ma-go-bg); color: var(--ma-go); }
#requests .ma-pill.is-wait { background: var(--ma-wait-bg); color: var(--ma-wait); }
#requests .ma-pill.is-mute { background: var(--ma-mute-bg); color: var(--ma-ink-2); }
#requests .ma-pill.is-stop { background: var(--ma-stop-bg); color: var(--ma-stop); }
#requests .ma-cd {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ma-ink);
}

/* 펼친 내용 */
#requests .ma-note {
  margin: 10px 0 0;
  font-size: 13.5px;
  color: var(--ma-muted);
}
#requests .ma-kv {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  margin: 6px 0 0;
}
#requests .ma-kv dt,
#requests .ma-kv dd {
  margin: 0;
  padding: 9px 0;
  border-top: 1px solid var(--ma-hair);
  font-size: 14px;
}
#requests .ma-kv dt:first-of-type,
#requests .ma-kv dd:first-of-type {
  border-top: 0;
}
#requests .ma-kv dt { color: var(--ma-muted); }
#requests .ma-kv dd {
  padding-left: 14px;
  text-align: right;
  font-weight: 500;
  color: var(--ma-ink);
  overflow-wrap: anywhere;
}
#requests .ma-policy {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ma-ink-2);
}
#requests .ma-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
#requests .ma-link {
  min-height: 40px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--ma-hair-2);
  border-radius: 999px;
  background: var(--ma-card);
  font-size: 14px;
  font-weight: 600;
  color: var(--ma-ink);
  cursor: pointer;
}
#requests .ma-link.is-danger {
  color: var(--ma-stop);
  border-color: #e6c3be;
}
#requests .ma-link[disabled] {
  opacity: 0.5;
  cursor: default;
}

/* 1:1 문의 줄 */
#requests .ma-help {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  margin: 18px 0 0;
  padding: 0 16px;
  border: 1px dashed var(--ma-hair-2);
  border-radius: 16px;
  background: transparent;
  font-size: 14.5px;
  color: var(--ma-ink-2);
  text-align: left;
  cursor: pointer;
}
#requests .ma-help b {
  font-weight: 600;
  color: var(--ma-ink);
}

/* 모집 알림: 새 알림이 있을 때만 한 줄 */
#requests .hosted-notices {
  margin: 0 0 8px;
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
}
#requests .hosted-notices summary {
  min-height: 24px;
  font-size: 14.5px;
}

#requests .ma-list button:focus-visible,
#requests .ma-help:focus-visible,
#requests .ma-next:focus-visible {
  outline: 3px solid #1f63d6;
  outline-offset: 2px;
}

@media (min-width: 900px) {
  /* PC: 한 줄이 너무 길어지지 않게 목록 폭을 묶는다 */
  #requests .ma-list,
  #requests .ma-help,
  #requests .hosted-notices {
    max-width: 760px;
  }
  #requests .ma-next-actions .btn {
    flex: 0 0 auto;
    min-width: 160px;
  }
}
