/* Ad Creative Inspector */

/* ── Layout ───────────────────────────────────────── */
.adci-wrapper {
    height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 500px;
}

.options-row { flex: 1; display: flex; align-items: center; justify-content: flex-end; }

.adci-main-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 12px;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* ── Tabs ─────────────────────────────────────────── */
.tab-content { display: none; flex-direction: column; overflow: auto; flex: 1; }
.tab-content.active { display: flex; }

/* ── Info Grid ────────────────────────────────────── */
.info-grid { border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.info-row  { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid #f1f5f9; font-size: 12px; }
.info-row:last-child { border-bottom: none; }
.info-key  { color: #64748b; font-weight: 600; }

/* ── Bookmarklet ──────────────────────────────────── */
.bookmarklet-drop-zone { display: flex; flex-direction: column; align-items: center; padding: 15px; background: #f8fafc; border: 2px dashed #cbd5e1; border-radius: 10px; }
.bookmarklet-btn { display: inline-block; padding: 10px 20px; background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; border-radius: 8px; font-weight: 700; font-size: 13px; text-decoration: none; cursor: grab; transition: background 0.2s; }
.bookmarklet-btn:hover { background: #dbeafe; }

/* ── Button variants ──────────────────────────────── */
.dark-mode { background: #334155 !important; color: #cbd5e1 !important; border-color: #475569 !important; }
.dark-mode:hover { background: #475569 !important; color: #fff !important; }

/* ── Alerts ───────────────────────────────────────── */
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; padding: 10px 12px; border-radius: 8px; color: #1e40af; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; padding: 10px 12px; border-radius: 8px; color: #92400e; }

/* ── Type badges ──────────────────────────────────── */
.type-badge   { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.type-label   { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.type-msg-hook   { background: #ef4444; color: #fff; }
.type-gpt-api    { background: #3b82f6; color: #fff; }
.type-json-scan  { background: #ec4899; color: #fff; }
.type-adk        { background: #292524; color: #f5d0a9; }
.type-query-crid { background: #14532d; color: #4ade80; }
.type-adk-url    { background: #8b5cf6; color: #fff; }
.type-simgad     { background: #1e3a5f; color: #60a5fa; }
.type-imgad      { background: #1e3a5f; color: #60a5fa; }
.type-aclk       { background: #3b1c5a; color: #c084fc; }

.capture-type .info-key { font-family: 'JetBrains Mono', monospace; }
.id-suffix { display: inline-block; margin-left: 4px; font-size: 9px; color: #94a3b8; background: #0f172a; border: 1px solid #334155; padding: 1px 4px; border-radius: 3px; vertical-align: middle; }

/* ── Ad Thumbnail ─────────────────────────────────── */
.thumb-cell { width: 60px; padding: 4px 8px !important; }
.ad-thumb   { width: 56px; height: 36px; object-fit: contain; border-radius: 3px; background: #0f172a; border: 1px solid #334155; display: block; }
.no-img     { color: #475569; font-size: 11px; }

/* ── Action buttons ───────────────────────────────── */
.action-cell { white-space: nowrap; }
.btn-action  { display: inline-block; padding: 3px 6px; border-radius: 4px; font-size: 13px; text-decoration: none; margin-right: 3px; border: 1px solid #334155; transition: background 0.15s; }
.btn-view    { background: #1e3a5f; } .btn-view:hover   { background: #1d4ed8; }
.btn-review  { background: #14532d; } .btn-review:hover { background: #15803d; }

/* ── Creative Table ───────────────────────────────── */
.creative-table                  { border-collapse: collapse; font-size: 11px; }
.creative-table thead tr         { background: #1e293b; position: sticky; top: 0; z-index: 1; }
.creative-table th               { padding: 8px 10px; text-align: left; color: #94a3b8; font-weight: 700; border-bottom: 1px solid #334155; white-space: nowrap; }
.creative-table td               { padding: 7px 10px; border-bottom: 1px solid #1e293b; color: #cbd5e1; vertical-align: middle; }
.creative-table tr:hover td      { background: #1e293b; }
.creative-table .empty-row td    { color: #475569; font-style: italic; }
.crid-code { background: #1e293b; color: #fbbf24; padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 11px; }
.url-link  { color: #60a5fa; text-decoration: none; word-break: break-all; }
.url-link:hover { text-decoration: underline; }
.btn-report { display: inline-block; padding: 3px 8px; background: #fef2f2; color: #ef4444; border: 1px solid #fecaca; border-radius: 4px; font-size: 10px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn-report:hover { background: #ef4444; color: #fff; }

/* ── Badges ───────────────────────────────────────── */
.bg-green        { background: #10b981; color: #fff; }
.text-dark-gray  { color: #475569; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 1099px) {
    .adci-wrapper     { height: auto; }
    .adci-main-layout { grid-template-columns: 1fr; overflow: visible; }
    .console-body     { min-height: 500px; }
}

@media (max-width: 767px) {
    .adci-wrapper { gap: 8px; }
}

/* ── RFC-V4 P? : inline style 외부화 ─────────────── */
.aci-header { align-items: stretch; gap: 10px; }
.aci-stats-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.aci-stat-card { background: #0f172a; border-color: #1e293b; text-align: center; }
.aci-stat-value { font-size: 1.3rem; }
.aci-stat-label { color: #64748b; }
.aci-stat-msg-hook { color: #22c55e; }
.aci-stat-gpt-api  { color: #f59e0b; }
.aci-stat-json-scan{ color: #a855f7; }
.aci-stat-other    { color: #94a3b8; }
.aci-stat-last     { font-size: 0.95rem; color: #38bdf8; }
