/* EX SERVER - Download page styles */

.ex-page-download .ex-download-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

.ex-page-download .ex-download-stat {
  padding: 18px;
  border: 1px solid var(--ex-line);
  border-radius: var(--ex-radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016)),
    rgba(0, 0, 0, 0.3);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.ex-page-download .ex-download-stat-label {
  display: block;
  margin-bottom: 8px;
  color: var(--ex-muted);
  font-size: 14px;
  font-weight: 800;
}

.ex-page-download .ex-download-stat-value {
  color: var(--ex-accent-strong);
  font-size: 20px;
  font-weight: 950;
  letter-spacing: 0;
}

.ex-page-download .ex-download-notice {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 226, 163, 0.16);
  border-radius: var(--ex-radius-md);
  background: rgba(0, 0, 0, 0.26);
  color: #d8c7aa;
  font-size: 14px;
  line-height: 1.7;
  word-break: keep-all;
}

.ex-page-download .ex-download-notice b {
  flex: 0 0 auto;
  color: var(--ex-accent-strong);
  font-size: 15px;
  font-weight: 950;
}

/* 다운로드 카드 3개를 한 줄에 균등 배치 */
.ex-page-download .ex-download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.ex-page-download .ex-download-card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 18px;
  border: 1px solid rgba(255, 231, 184, 0.1);
  border-radius: var(--ex-radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.014)),
    rgba(0, 0, 0, 0.28);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.ex-page-download .ex-download-card:hover {
  border-color: rgba(255, 226, 163, 0.3);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.34),
    0 0 0 3px rgba(216, 173, 88, 0.08);
}

.ex-page-download .ex-download-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  border: 1px solid rgba(255, 226, 163, 0.18);
  border-radius: 16px;
  background: rgba(216, 173, 88, 0.1);
  color: var(--ex-accent-strong);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0;
  white-space: nowrap;
}

.ex-page-download .ex-download-title {
  margin: 0 0 9px;
  color: #fff2d5;
  font-size: 20px;
  font-weight: 950;
  line-height: 1.35;
  word-break: keep-all;
}

.ex-page-download .ex-download-desc {
  margin: 0;
  color: #d8c7aa;
  font-size: 14px;
  line-height: 1.7;
  word-break: keep-all;
}

/* 예전 버전/상태 배지가 남아 있어도 숨김 */
.ex-page-download .ex-download-meta {
  display: none;
}

/* 버튼을 카드 하단에 정렬 */
.ex-page-download .ex-download-actions {
  display: block;
  margin-top: auto;
  padding-top: 20px;
}

/* GUIDE 스타일과 같은 계열의 심플한 다운로드 버튼 */
.ex-page-download .ex-download-btn-simple {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  border: 1px solid rgba(216, 173, 88, 0.32);
  border-radius: 12px;
  background: rgba(216, 173, 88, 0.07);
  color: #ffe2ad;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.ex-page-download .ex-download-btn-simple:hover,
.ex-page-download .ex-download-btn-simple:focus-visible {
  border-color: rgba(255, 226, 163, 0.52);
  background: rgba(216, 173, 88, 0.13);
  color: #fff7e5;
  outline: none;
}

/* 링크가 없을 때 비활성 처리용 */
.ex-page-download .ex-download-btn-simple.is-disabled,
.ex-page-download .ex-download-card[data-status="pending"] .ex-download-btn-simple {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(216, 199, 170, 0.62);
  cursor: default;
  pointer-events: none;
}

/* 기존 텍스트 버튼 호환용 */
.ex-page-download .ex-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(246, 180, 79, 0.32);
  border-radius: var(--ex-radius-md);
  background:
    linear-gradient(180deg, rgba(216, 173, 88, 0.22), rgba(184, 134, 50, 0.16)),
    rgba(0, 0, 0, 0.34);
  color: var(--ex-accent-strong);
  font-size: 15px;
  font-weight: 950;
  text-align: center;
}

.ex-page-download .ex-download-btn:hover,
.ex-page-download .ex-download-btn:focus-visible {
  border-color: rgba(255, 226, 163, 0.48);
  color: #fff4dd;
  outline: none;
}

.ex-page-download .ex-download-btn.is-disabled {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(199, 184, 159, 0.72);
  cursor: default;
  pointer-events: none;
}

.ex-page-download .ex-download-sub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 226, 163, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: #eadcc5;
  font-size: 13px;
  font-weight: 900;
}

.ex-page-download .ex-download-content-grid {
  margin-top: 0;
}

.ex-page-download .ex-download-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.ex-page-download .ex-download-step {
  position: relative;
  padding: 14px 15px 14px 54px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--ex-radius-md);
  background: rgba(0, 0, 0, 0.24);
  color: #eadcc5;
  font-size: 14px;
  line-height: 1.65;
  word-break: keep-all;
}

.ex-page-download .ex-download-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(216, 173, 88, 0.14);
  color: var(--ex-accent-strong);
  font-weight: 950;
}

.ex-page-download .ex-download-step b {
  display: block;
  margin-bottom: 4px;
  color: #ffe2ad;
  font-size: 15px;
  font-weight: 950;
}

.ex-page-download .ex-download-faq {
  display: grid;
  gap: 10px;
}

.ex-page-download .ex-download-faq-item {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--ex-radius-md);
  background: rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.ex-page-download .ex-download-faq-button {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border: 0;
  background: transparent;
  color: #ffe2ad;
  font-family: inherit;
  font-size: 15px;
  font-weight: 950;
  text-align: left;
  cursor: pointer;
}

.ex-page-download .ex-download-faq-answer {
  display: none;
  padding: 0 15px 14px;
  color: #d8c7aa;
  font-size: 14px;
  line-height: 1.7;
  word-break: keep-all;
}

.ex-page-download .ex-download-faq-item.is-open .ex-download-faq-answer {
  display: block;
}

@media (max-width: 1080px) {
  .ex-page-download .ex-download-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ex-page-download .ex-download-overview,
  .ex-page-download .ex-download-grid {
    grid-template-columns: 1fr;
  }

  .ex-page-download .ex-download-notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .ex-page-download .ex-download-card {
    min-height: auto;
  }
}
