/* DentHub — 광고 전용 스타일 */

/* ── 배너 광고 ── */
.ad-banner-wrap {
  position: relative;
  display: inline-flex;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}

.ad-banner-wrap a {
  display: block;
  width: 100%;
  line-height: 0;
}

.ad-banner-wrap img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-sm);
}

/* 광고 라벨 오버레이 */
.ad-label {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(245, 158, 11, 0.92);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  line-height: 1.2;
  pointer-events: none;
  z-index: 2;
  letter-spacing: 0.03em;
}

/* ── 네이티브 광고 카드 ── */
.ad-native-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
  transition: box-shadow var(--transition);
  cursor: pointer;
}
.ad-native-card:hover { box-shadow: var(--shadow-md); }

.ad-native-card .ad-label {
  top: 8px;
  left: 8px;
}

.ad-native-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--color-bg);
}

.ad-native-body {
  padding: 12px 14px;
}

.ad-native-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ad-native-desc {
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ad-native-cta {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
}

/* ── 프리미엄 광고 ── */
.ad-premium-card {
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  padding: 16px;
  position: relative;
  box-shadow: 0 0 0 4px var(--color-primary-light);
}

.ad-premium-card .ad-label {
  position: static;
  display: inline-flex;
  margin-bottom: 10px;
}

/* ── 광고 슬롯 컨테이너 ── */
.ad-slot-top .ad-banner-wrap {
  max-height: 90px;
}
.ad-slot-top .ad-banner-wrap img {
  max-height: 90px;
  object-fit: cover;
}

.ad-slot-side .ad-banner-wrap {
  max-height: 250px;
  width: 300px;
}

.ad-slot-bottom .ad-banner-wrap {
  max-height: 90px;
}
.ad-slot-bottom .ad-banner-wrap img {
  max-height: 90px;
  object-fit: cover;
}

@media (max-width: 768px) {
  .ad-slot-top .ad-banner-wrap,
  .ad-slot-top .ad-banner-wrap img {
    max-height: 50px;
  }
  .ad-slot-bottom .ad-banner-wrap,
  .ad-slot-bottom .ad-banner-wrap img {
    max-height: 100px;
  }
}

/* ── 광고주 대시보드 ── */
.advertiser-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.stat-card-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-primary);
  display: block;
  margin-bottom: 4px;
}

.stat-card-label {
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* 바 차트 */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
  padding: 8px 0 0;
}

.bar-chart-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}

.bar-chart-bar {
  width: 100%;
  background: var(--color-primary);
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: height 0.3s ease;
  opacity: 0.8;
}
.bar-chart-bar:hover { opacity: 1; }

.bar-chart-label {
  font-size: 9px;
  color: var(--color-text-secondary);
  writing-mode: vertical-rl;
  white-space: nowrap;
  transform: rotate(180deg);
}

.chart-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.chart-tab {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 100px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: all var(--transition);
}
.chart-tab.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* 캠페인 테이블 */
.campaign-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.campaign-table th,
.campaign-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.campaign-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-bg);
}
.campaign-table tr:last-child td { border-bottom: none; }
.campaign-table tr:hover td { background: var(--color-bg); }

/* 캠페인 상태 배지 */
.status-draft { background: var(--color-bg); color: var(--color-text-secondary); }
.status-pending_review { background: #FEF3C7; color: #B45309; }
.status-active { background: #D1FAE5; color: var(--color-success); }
.status-paused { background: #E5E7EB; color: #374151; }
.status-ended { background: #F3F4F6; color: #9CA3AF; }
.status-rejected { background: #FEE2E2; color: var(--color-error); }

/* ── 관리자 광고 관리 ── */
.admin-review-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  background: var(--color-surface);
}

.admin-review-card img {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .advertiser-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
