/* ============================================
   DPA Real-time Status Page
   ============================================ */

.dpa-header {
  text-align: center;
  padding: 48px 0 16px;
}
.dpa-header .page-title {
  font-size: 1.4rem;
}
.dpa-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 8px;
}
.dpa-update {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 12px;
  font-family: "Inter", sans-serif;
}
.dpa-update .live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4caf50;
  margin-right: 4px;
  animation: dpaPulse 2s infinite;
}
@keyframes dpaPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Park Switch */
.dpa-park-switch {
  display: flex;
  gap: 0;
  margin: 24px auto 20px;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
  width: fit-content;
}
.dpa-park-btn {
  padding: 10px 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.dpa-park-btn:hover { color: #334155; }
.dpa-park-btn.active {
  background: #fff;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.dpa-park-btn[data-park="tdl"].active { color: #d81b72; }
.dpa-park-btn[data-park="tds"].active { color: #2563a8; }

/* Summary bar */
.dpa-summary {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.dpa-summary-item {
  text-align: center;
}
.dpa-summary-num {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}
.dpa-summary-num--available { color: #27ae60; }
.dpa-summary-num--sold { color: #e74c3c; }
.dpa-summary-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* DPA Cards Grid */
.dpa-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.dpa-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.dpa-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.dpa-card--available {
  border-left: 4px solid #27ae60;
}
.dpa-card--sold {
  border-left: 4px solid #e74c3c;
}
.dpa-card--closed {
  border-left: 4px solid #94a3b8;
  opacity: 0.6;
}

.dpa-card-status {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.dpa-card-status--available {
  background: rgba(39, 174, 96, 0.1);
}
.dpa-card-status--sold {
  background: rgba(231, 76, 60, 0.1);
}
.dpa-card-status--closed {
  background: rgba(148, 163, 184, 0.1);
}
.dpa-status-icon {
  font-size: 1.4rem;
  line-height: 1;
}
.dpa-status-text {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.dpa-status-text--available { color: #27ae60; }
.dpa-status-text--sold { color: #e74c3c; }
.dpa-status-text--closed { color: #94a3b8; }

.dpa-card-info {
  flex: 1;
  min-width: 0;
}
.dpa-card-name {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.dpa-card-name a {
  color: inherit;
}
.dpa-card-name a:hover {
  color: var(--accent);
}
.dpa-card-area {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.dpa-card-meta {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  align-items: center;
}
.dpa-card-price {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-sub);
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 4px;
}
.dpa-card-wait {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  color: var(--text-sub);
}
.dpa-card-wait strong {
  font-weight: 700;
  font-size: 1rem;
}

/* Standby Pass Section */
.dpa-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}
.dpa-section-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: -8px 0 16px;
}

/* Standby pass list (compact) */
.sp-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 32px;
}
.sp-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  gap: 12px;
}
.sp-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sp-status-dot--available { background: #27ae60; }
.sp-status-dot--sold { background: #e74c3c; }
.sp-name {
  flex: 1;
  font-size: 0.82rem;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}
.sp-badge--available {
  color: #27ae60;
  background: rgba(39, 174, 96, 0.1);
}
.sp-badge--sold {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
}
.sp-wait {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 50px;
  text-align: right;
  flex-shrink: 0;
}
.sp-wait small {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Guide Section */
.dpa-guide {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
}
.dpa-guide-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
}
.dpa-guide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.dpa-tip-card {
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
}
.dpa-tip-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.dpa-tip-text {
  font-size: 0.82rem;
  color: var(--text-sub);
  line-height: 1.6;
}
.dpa-more-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
}
.dpa-more-link:hover {
  text-decoration: underline;
}

/* Loading & Error */
.dpa-loading {
  text-align: center;
  padding: 48px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.dpa-loading::before {
  content: "";
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: dash-spin 0.7s linear infinite;
}
@keyframes dash-spin {
  to { transform: rotate(360deg); }
}

/* Pre-open message */
.dpa-preopen {
  text-align: center;
  padding: 40px 20px;
  background: var(--surface);
  border-radius: 12px;
  margin-bottom: 24px;
}
.dpa-preopen-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.dpa-preopen-text {
  font-size: 0.82rem;
  color: var(--text-sub);
}

/* Note */
.dpa-note {
  padding: 24px 0 40px;
  border-top: 1px solid var(--border-light);
  margin-top: 20px;
}
.dpa-note p {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Responsive */
@media (max-width: 768px) {
  .dpa-cards {
    grid-template-columns: 1fr;
  }
  .dpa-guide-cards {
    grid-template-columns: 1fr;
  }
  .dpa-card {
    padding: 16px;
    gap: 12px;
  }
}
@media (max-width: 480px) {
  .dpa-header { padding: 32px 0 12px; }
  .dpa-header .page-title { font-size: 1.15rem; }
  .dpa-park-btn { padding: 8px 24px; font-size: 0.82rem; }
  .dpa-card-status { width: 48px; height: 48px; }
  .dpa-status-icon { font-size: 1.2rem; }
  .dpa-card-name { font-size: 0.82rem; }
  .sp-name { font-size: 0.75rem; }
}
