/**
 * 十月飛雲 (twots.top) - Advertising Service
 * 廣告業務組件樣式 (Components CSS)
 */

/* 5 大廣告版位展示外框 */
.ad-slot-container {
  margin: 1.5rem 0;
  position: relative;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  background-color: var(--bg-card);
}

.ad-slot-label {
  position: absolute;
  top: -10px;
  left: 15px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.1rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* 1. 首頁頂部大型輪播橫幅 */
.ad-hero-banner {
  width: 100%;
  height: 320px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  background-color: #0F172A;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.5rem;
  background-size: cover;
  background-position: center;
}

.ad-hero-content {
  max-width: 60%;
  z-index: 2;
}

.ad-hero-title {
  font-size: 1.875rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.ad-hero-headline {
  font-size: 1.125rem;
  color: #E2E8F0;
  margin-bottom: 1rem;
}

.ad-hero-body {
  font-size: 0.875rem;
  color: #94A3B8;
  margin-bottom: 1.5rem;
}

/* 2. 側邊欄推薦卡片 */
.ad-sidebar-card {
  width: 100%;
  max-width: 320px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.ad-sidebar-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.ad-sidebar-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* 3. 感謝頁/結帳推薦卡片 */
.ad-checkout-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.ad-checkout-thumb {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

/* 4. 浮動公告/彈窗 */
.ad-modal-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ad-modal-popup.active {
  display: flex;
}

.ad-popup-box {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.ad-popup-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: rgba(0, 0, 0, 0.5);
  color: #FFFFFF;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  z-index: 10;
}

/* 統計資訊方塊群 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Maker-Checker 待覆核審批卡片 */
.checker-alert-card {
  background-color: var(--warning-bg);
  border: 1px solid var(--warning);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checker-title {
  font-size: 1rem;
  font-weight: 700;
  color: #B45309;
}

/* 頁籤導覽 (Tabs) */
.nav-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--brand-primary);
  border-bottom-color: var(--brand-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* 表格樣式 */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.table th, .table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background-color: var(--bg-secondary);
}

/* 狀態徽章 */
.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
}

.badge-success { background-color: var(--success-bg); color: var(--success); }
.badge-warning { background-color: var(--warning-bg); color: var(--warning); }
.badge-danger  { background-color: var(--danger-bg);  color: var(--danger); }
.badge-info    { background-color: var(--info-bg);    color: var(--info); }

