/* ── Google Ads ROI Calculator — calculator.css ──────────────── */
:root {
  --roi-primary:   #2563eb;
  --roi-success:   #16a34a;
  --roi-warning:   #d97706;
  --roi-danger:    #dc2626;
  --roi-bg:        #f8fafc;
  --roi-surface:   #ffffff;
  --roi-border:    #e2e8f0;
  --roi-text:      #0f172a;
  --roi-muted:     #64748b;
  --roi-radius:    12px;
  --roi-radius-sm: 8px;
}

.gads-roi-wrap * { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.gads-roi-wrap { max-width: 680px; margin: 0 auto; padding: 1.5rem 1rem; color: var(--roi-text); }

/* ── Tabs ── */
.gads-tab-bar { display: flex; gap: 4px; border-bottom: 1.5px solid var(--roi-border); margin-bottom: 1.25rem; }
.gads-tab { background: none; border: none; padding: 8px 16px; font-size: 13px; font-weight: 500; color: var(--roi-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1.5px; transition: color .15s; display: flex; align-items: center; gap: 6px; }
.gads-tab.active { color: var(--roi-primary); border-bottom-color: var(--roi-primary); }
.gads-tab:hover { color: var(--roi-text); }

/* ── Score Card ── */
.gads-score-card { display: flex; align-items: center; gap: 1.5rem; background: var(--roi-surface); border: 1px solid var(--roi-border); border-radius: var(--roi-radius); padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
.gads-score-ring { position: relative; flex-shrink: 0; }
.gads-score-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gads-score-num { font-size: 26px; font-weight: 700; line-height: 1; color: var(--roi-text); }
.gads-score-slash { font-size: 11px; color: var(--roi-muted); }
.gads-score-info { flex: 1; }
.gads-score-badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; margin-bottom: 6px; }
.gads-score-badge.boncos  { background: #fee2e2; color: #991b1b; }
.gads-score-badge.optimasi { background: #fef3c7; color: #92400e; }
.gads-score-badge.scaling  { background: #dcfce7; color: #166534; }
.gads-score-desc { font-size: 13px; color: var(--roi-muted); line-height: 1.5; margin-bottom: 10px; }
.gads-score-bars { display: flex; flex-direction: column; gap: 5px; }
.gads-sub-bar-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--roi-muted); }
.gads-sub-bar-label { width: 80px; flex-shrink: 0; }
.gads-sub-bar-wrap { flex: 1; height: 5px; background: var(--roi-border); border-radius: 3px; overflow: hidden; }
.gads-sub-bar-fill { height: 100%; border-radius: 3px; transition: width .4s ease; }
.gads-sub-bar-val { width: 30px; text-align: right; font-weight: 500; color: var(--roi-text); }

/* ── Sections ── */
.gads-section { background: var(--roi-surface); border: 1px solid var(--roi-border); border-radius: var(--roi-radius); padding: 1.25rem; margin-bottom: 1rem; }
.gads-section-results { background: var(--roi-bg); }
.gads-section-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--roi-muted); margin-bottom: 1rem; display: flex; align-items: center; gap: 6px; }
.gads-section-title .dashicons { font-size: 14px; width: 14px; height: 14px; }

/* ── Inputs ── */
.gads-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gads-field { display: flex; flex-direction: column; gap: 4px; }
.gads-field label { font-size: 12px; font-weight: 500; color: var(--roi-muted); }
.gads-field input { font-size: 14px; padding: 8px 12px; border: 1px solid var(--roi-border); border-radius: var(--roi-radius-sm); background: var(--roi-surface); color: var(--roi-text); transition: border-color .15s; }
.gads-field input:focus { outline: none; border-color: var(--roi-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.gads-hint { font-size: 11px; color: var(--roi-muted); }

/* ── Metrics ── */
.gads-metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 1rem; }
.gads-metric { background: var(--roi-surface); border: 1px solid var(--roi-border); border-radius: var(--roi-radius-sm); padding: 10px 12px; }
.gads-metric-label { font-size: 10px; font-weight: 500; color: var(--roi-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.gads-metric-value { font-size: 16px; font-weight: 700; color: var(--roi-text); }

/* ── Funnel ── */
.gads-funnel { display: flex; flex-direction: column; gap: 8px; margin-bottom: 1rem; }
.gads-funnel-row { display: flex; align-items: center; gap: 10px; }
.gads-funnel-label { font-size: 12px; color: var(--roi-muted); width: 130px; flex-shrink: 0; }
.gads-funnel-bar-wrap { flex: 1; height: 8px; background: var(--roi-border); border-radius: 4px; overflow: hidden; }
.gads-funnel-bar { height: 100%; border-radius: 4px; transition: width .4s ease; }
.gads-funnel-val { font-size: 12px; font-weight: 600; color: var(--roi-text); width: 70px; text-align: right; }

/* ── Alerts ── */
.gads-alert { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: var(--roi-radius-sm); font-size: 13px; line-height: 1.5; margin-bottom: 6px; }
.gads-alert .dashicons { flex-shrink: 0; font-size: 16px; width: 16px; height: 16px; margin-top: 1px; }
.gads-alert-danger  { background: #fee2e2; color: #991b1b; }
.gads-alert-warning { background: #fef3c7; color: #92400e; }
.gads-alert-success { background: #dcfce7; color: #166534; }
.gads-alert-info    { background: #dbeafe; color: #1e40af; }

/* ── Status badges inline ── */
.gads-badge { display: inline-block; font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 99px; margin-top: 3px; }
.gads-badge-ok  { background: #dcfce7; color: #166534; }
.gads-badge-bad { background: #fee2e2; color: #991b1b; }

/* ── Divider ── */
.gads-divider { height: 1px; background: var(--roi-border); margin: 1rem 0; }

/* ── Actions ── */
.gads-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ── Buttons ── */
.gads-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 9px 18px; border-radius: var(--roi-radius-sm); border: 1.5px solid transparent; cursor: pointer; transition: all .15s; }
.gads-btn-primary   { background: var(--roi-primary); color: #fff; border-color: var(--roi-primary); }
.gads-btn-primary:hover { background: #1d4ed8; }
.gads-btn-secondary { background: var(--roi-surface); color: var(--roi-text); border-color: var(--roi-border); }
.gads-btn-secondary:hover { background: var(--roi-bg); }
.gads-btn-ghost     { background: transparent; color: var(--roi-muted); border-color: var(--roi-border); }
.gads-btn-ghost:hover { background: var(--roi-bg); }
.gads-btn-full      { width: 100%; justify-content: center; }
.gads-btn:disabled  { opacity: .5; cursor: not-allowed; }
.gads-btn .dashicons { font-size: 16px; width: 16px; height: 16px; }

/* ── Lead card ── */
.gads-lead-card { background: var(--roi-surface); border: 1px solid var(--roi-border); border-radius: var(--roi-radius); padding: 2rem; max-width: 480px; margin: 0 auto; }
.gads-lead-header { text-align: center; margin-bottom: 1.5rem; }
.gads-lead-score-badge { margin-bottom: 12px; }
.gads-lead-title { font-size: 20px; font-weight: 700; color: var(--roi-text); margin-bottom: 8px; }
.gads-lead-subtitle { font-size: 13px; color: var(--roi-muted); line-height: 1.6; }
.gads-lead-what { display: flex; flex-direction: column; gap: 6px; background: var(--roi-bg); border-radius: var(--roi-radius-sm); padding: 12px 14px; margin-bottom: 1.5rem; }
.gads-lead-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--roi-text); }
.gads-lead-item .dashicons { color: var(--roi-success); font-size: 16px; width: 16px; height: 16px; }

/* ── Result card ── */
.gads-result-card { background: var(--roi-surface); border: 1px solid var(--roi-border); border-radius: var(--roi-radius); padding: 2rem; text-align: center; max-width: 480px; margin: 0 auto; }
.gads-result-icon { font-size: 48px; margin-bottom: 12px; }
.gads-result-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.gads-result-card p { font-size: 14px; color: var(--roi-muted); margin-bottom: 1rem; line-height: 1.6; }
.gads-ai-output { font-size: 13px; line-height: 1.8; color: var(--roi-text); background: var(--roi-bg); border-radius: var(--roi-radius-sm); padding: 1rem; text-align: left; white-space: pre-wrap; }

/* ── History ── */
.gads-history-item { border: 1px solid var(--roi-border); border-radius: var(--roi-radius-sm); padding: 12px 14px; margin-bottom: 8px; }
.gads-history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.gads-history-month { font-size: 14px; font-weight: 600; }
.gads-history-meta  { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; font-size: 11px; color: var(--roi-muted); }

/* ── Loading dots ── */
.gads-dot { animation: gadsBlink 1.2s infinite; display: inline-block; }
.gads-dot:nth-child(2) { animation-delay: .2s; }
.gads-dot:nth-child(3) { animation-delay: .4s; }
@keyframes gadsBlink { 0%,80%,100%{opacity:.2} 40%{opacity:1} }

/* ── Responsive ── */
@media (max-width: 480px) {
  .gads-metrics-grid { grid-template-columns: repeat(2,1fr); }
  .gads-score-card   { flex-direction: column; text-align: center; }
  .gads-actions      { flex-direction: column-reverse; }
  .gads-btn          { width: 100%; justify-content: center; }
}
