/**
 * Te Puna Hiro'a — Download Section Styles
 * Mana Flow design: Deep Ocean Teal + Living Coral + Sand Ivory
 */

/* ─── Section Container ─────────────────────────────────── */
.tph-download-section {
  margin-top: 2.5rem;
  border-top: 1px solid rgba(10, 61, 92, 0.12);
  padding-top: 2rem;
}

/* ─── Header ────────────────────────────────────────────── */
.tph-download-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.tph-download-icon {
  color: #0A3D5C;
  display: flex;
  align-items: center;
}

.tph-download-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0A3D5C;
  margin: 0;
}

/* ─── File List ─────────────────────────────────────────── */
.tph-download-files {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ─── Individual File Item ──────────────────────────────── */
.tph-download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #F5F0E8;
  border-radius: 2px;
  transition: background 0.2s ease;
}

.tph-download-item:hover {
  background: #EDE5D8;
}

.tph-download-item-info {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

/* ─── File Type Icons ───────────────────────────────────── */
.tph-download-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 2px;
  flex-shrink: 0;
}

.tph-icon-pdf {
  background: rgba(232, 114, 90, 0.12);
  color: #E8725A;
}

.tph-icon-audio {
  background: rgba(10, 61, 92, 0.1);
  color: #0A3D5C;
}

/* ─── File Info Text ────────────────────────────────────── */
.tph-download-item-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tph-download-item-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #1a2a3a;
  line-height: 1.3;
}

.tph-download-item-format {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5a6a7a;
}

/* ─── Download Button ───────────────────────────────────── */
.tph-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  background: #0A3D5C;
  color: #FEFCF9;
  border: none;
  border-radius: 2px;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.tph-download-btn:hover {
  background: #0c4d73;
}

.tph-download-btn:active {
  transform: translateY(1px);
}

.tph-download-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Loading spinner animation */
.tph-download-btn.tph-downloading {
  background: #5a6a7a;
}

.tph-download-btn.tph-download-done {
  background: #2d7a4f;
}

@keyframes tph-spin {
  to { transform: rotate(360deg); }
}

.tph-spin {
  animation: tph-spin 0.8s linear infinite;
}

/* ─── Locked State ──────────────────────────────────────── */
.tph-download-locked {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(10, 61, 92, 0.04);
  border: 1px dashed rgba(10, 61, 92, 0.2);
  border-radius: 2px;
}

.tph-lock-icon {
  color: #5a6a7a;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.tph-download-locked-text {
  margin: 0;
  font-size: 0.875rem;
  color: #5a6a7a;
  line-height: 1.6;
}

.tph-download-locked-text a {
  color: #0A3D5C;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tph-download-locked-text a:hover {
  color: #E8725A;
}

/* ─── Error Message ─────────────────────────────────────── */
.tph-download-error {
  margin: 0.5rem 0 0;
  padding: 0.6rem 1rem;
  background: rgba(232, 114, 90, 0.1);
  border-left: 2px solid #E8725A;
  border-radius: 2px;
  font-size: 0.85rem;
  color: #c95d47;
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 480px) {
  .tph-download-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
  }

  .tph-download-btn {
    width: 100%;
    justify-content: center;
  }
}
