/* ═══════════════════════════════════════════════
   Hash Nance — 고객지원 페이지
   ═══════════════════════════════════════════════ */

.sp-main {
  background: var(--bg-body);
}
.sp-container {
  max-width: var(--w-container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Hero ── */
.sp-hero {
  position: relative;
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #3b82f6 100%);
  padding: clamp(2.5rem, 5vw, 4rem) 1.5rem clamp(3rem, 6vw, 5rem);
  overflow: hidden;
  text-align: center;
}
.sp-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 120%, rgba(255,255,255,.06), transparent 50%),
    radial-gradient(ellipse 40% 40% at 10% 0%, rgba(255,255,255,.04), transparent 50%),
    radial-gradient(ellipse 40% 40% at 90% 0%, rgba(0,0,0,.08), transparent 50%);
  pointer-events: none;
}
.sp-hero-inner {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}
.sp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .3125rem .75rem;
  margin-bottom: 1rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r-full);
  font-size: .6875rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.sp-hero-badge svg { opacity: .7; }
.sp-hero-title {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 .625rem;
  line-height: 1.2;
  letter-spacing: -.03em;
}
.sp-hero-hl { color: #93c5fd; }
.sp-hero-desc {
  font-size: .875rem;
  color: rgba(255,255,255,.65);
  margin: 0;
  line-height: 1.6;
}

/* ── Tabs ── */
.sp-tab-section {
  margin-top: -1.5rem;
  position: relative;
  z-index: 2;
  padding-bottom: 1.5rem;
}
.sp-tabs {
  display: flex;
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.sp-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 1rem 1.25rem;
  font-family: var(--f-body);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--c-dim);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all .2s var(--ease);
  position: relative;
  white-space: nowrap;
}
.sp-tab::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2.5px;
  background: var(--c-blue);
  border-radius: 2px 2px 0 0;
  transition: width .2s var(--ease);
}
.sp-tab:hover { color: var(--c-sub); }
.sp-tab.is-active {
  color: var(--c-blue);
}
.sp-tab.is-active::after { width: 40px; }
.sp-tab svg { flex-shrink: 0; }

/* ── Card ── */
.sp-card {
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.sp-panel {
  padding-bottom: 1.5rem;
}

/* ── FAQ ── */
.sp-faq-list {
  display: flex;
  flex-direction: column;
}
.sp-faq-item {
  border-bottom: 1px solid rgba(0,0,0,.04);
}
.sp-faq-item:last-child { border-bottom: none; }
.sp-faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .875rem 1.5rem;
  font-family: var(--f-body);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--c-text);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background .15s var(--ease);
}
.sp-faq-q:hover { background: rgba(37,99,235,.02); }
.sp-faq-chevron {
  color: var(--c-dim);
  flex-shrink: 0;
  transition: transform .25s var(--ease);
}
.sp-faq-item.is-open .sp-faq-chevron {
  transform: rotate(180deg);
  color: var(--c-blue);
}
.sp-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s var(--ease);
}
.sp-faq-item.is-open .sp-faq-a {
  max-height: 120px;
}
.sp-faq-a p {
  padding: 0 1.5rem 1rem;
  padding-left: 1.5rem;
  margin: 0;
  font-size: .8125rem;
  color: var(--c-sub);
  line-height: 1.7;
}

/* ── Inquiry Form ── */
.sp-inquiry-form {
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.sp-form-group {
  display: flex;
  flex-direction: column;
  gap: .375rem;
}
.sp-form-label {
  font-size: .6875rem;
  font-weight: 700;
  color: var(--c-dim);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.sp-form-select,
.sp-form-input {
  padding: .625rem .875rem;
  font-family: var(--f-body);
  font-size: .875rem;
  color: var(--c-text);
  background: var(--bg-inset);
  border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  outline: none;
  transition: all .2s var(--ease);
  -webkit-appearance: none;
}
.sp-form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .875rem center;
  padding-right: 2.5rem;
}
.sp-form-input:focus,
.sp-form-select:focus,
.sp-form-textarea:focus {
  border-color: var(--c-blue);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(37,99,235,.08);
}
.sp-form-textarea {
  padding: .75rem .875rem;
  font-family: var(--f-body);
  font-size: .875rem;
  color: var(--c-text);
  background: var(--bg-inset);
  border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  outline: none;
  resize: vertical;
  min-height: 120px;
  transition: all .2s var(--ease);
  line-height: 1.6;
}
.sp-form-counter {
  font-size: .625rem;
  color: var(--c-dim);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.sp-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  align-self: flex-end;
  padding: .6875rem 1.5rem;
  background: var(--c-blue);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--f-body);
  font-size: .8125rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(37,99,235,.15), 0 4px 12px rgba(37,99,235,.12);
  transition: all .2s var(--ease);
}
.sp-submit-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}
.sp-submit-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

/* ── History ── */
.sp-history-body {
  max-height: 600px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.08) transparent;
}
.sp-history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1.5rem;
  gap: .375rem;
  text-align: center;
}
.sp-history-empty p {
  color: var(--c-sub);
  font-size: .8125rem;
  font-weight: 500;
  margin: 0;
}
.sp-history-empty span {
  color: var(--c-dim);
  font-size: .6875rem;
}

.sp-inq-item {
  border-bottom: 1px solid rgba(0,0,0,.04);
  transition: background .15s var(--ease);
}
.sp-inq-item:last-child { border-bottom: none; }
.sp-inq-header {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: 1rem 1.5rem;
  cursor: pointer;
}
.sp-inq-header:hover { background: rgba(37,99,235,.015); }
.sp-inq-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sp-inq-status--pending { background: #f59e0b; }
.sp-inq-status--replied { background: #059669; }
.sp-inq-status--closed { background: var(--c-dim); }
.sp-inq-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .125rem;
  min-width: 0;
}
.sp-inq-subject {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-inq-meta {
  font-size: .6875rem;
  color: var(--c-dim);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.sp-inq-badge {
  padding: .125rem .4375rem;
  font-size: .5625rem;
  font-weight: 700;
  border-radius: var(--r-full);
  text-transform: uppercase;
  flex-shrink: 0;
}
.sp-inq-badge--pending {
  background: rgba(245,158,11,.08);
  color: #d97706;
}
.sp-inq-badge--replied {
  background: rgba(5,150,105,.06);
  color: #059669;
}
.sp-inq-badge--closed {
  background: var(--bg-inset);
  color: var(--c-dim);
}
.sp-inq-chevron {
  color: var(--c-dim);
  flex-shrink: 0;
  transition: transform .2s var(--ease);
}
.sp-inq-item.is-open .sp-inq-chevron {
  transform: rotate(180deg);
}
.sp-inq-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s var(--ease);
}
.sp-inq-item.is-open .sp-inq-detail {
  max-height: 600px;
}
.sp-inq-detail-inner {
  padding: 0 1.5rem 1.25rem;
  padding-left: calc(1.5rem + 8px + .875rem);
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.sp-inq-msg-block {
  padding: .875rem 1rem;
  border-radius: var(--r-sm);
  font-size: .8125rem;
  line-height: 1.65;
}
.sp-inq-msg-block--user {
  background: var(--bg-inset);
  color: var(--c-text);
}
.sp-inq-msg-block--admin {
  background: rgba(37,99,235,.04);
  border-left: 3px solid var(--c-blue);
  color: var(--c-text);
}
.sp-inq-msg-label {
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .25rem;
}
.sp-inq-msg-label--user { color: var(--c-dim); }
.sp-inq-msg-label--admin { color: var(--c-blue); }

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 768px) {
  .sp-tab {
    padding: .75rem .625rem;
    font-size: .75rem;
    gap: .375rem;
  }
  .sp-tab svg { width: 14px; height: 14px; }
  .sp-faq-q {
    padding: .75rem 1.25rem;
    font-size: .8125rem;
  }
  .sp-faq-a p {
    padding: 0 1.25rem .875rem;
    font-size: .75rem;
  }
  .sp-inquiry-form {
    padding: 1.25rem 1.25rem;
  }
  .sp-inq-header {
    padding: .75rem 1.25rem;
  }
  .sp-inq-detail-inner {
    padding-left: 1.25rem;
  }
  .sp-history-empty {
    padding: 2rem 1.25rem;
  }
}

@media (max-width: 520px) {
  .sp-container {
    padding: 0 .75rem;
  }
  .sp-hero {
    padding: 1.5rem 1rem 2.5rem;
  }
  .sp-hero-title {
    font-size: 1.25rem;
  }
  .sp-tabs {
    border-radius: var(--r-md);
  }
  .sp-tab {
    padding: .625rem .375rem;
    font-size: .6875rem;
  }
  .sp-faq-q {
    padding: .6875rem .875rem;
    font-size: .75rem;
  }
  .sp-faq-a p {
    padding: 0 .875rem .75rem;
    font-size: .6875rem;
  }
  .sp-panel {
    padding-bottom: 1.25rem;
  }
  .sp-inquiry-form {
    padding: 1rem .875rem;
    gap: 1rem;
  }
  .sp-submit-btn {
    width: 100%;
  }
  .sp-inq-header {
    padding: .625rem .875rem;
    gap: .5rem;
  }
  .sp-inq-detail-inner {
    padding: 0 .875rem .875rem;
  }
  .sp-history-empty {
    padding: 1.75rem 1rem;
  }
}
