/* Beanse AI Crawlability Checker — Public Styles */

:root {
  --bacc-dark:    #0f172a;
  --bacc-navy:    #1e3a5f;
  --bacc-blue:    #2563eb;
  --bacc-green:   #059669;
  --bacc-amber:   #d97706;
  --bacc-red:     #dc2626;
  --bacc-bg:      #f8fafc;
  --bacc-card:    #ffffff;
  --bacc-border:  #e2e8f0;
  --bacc-text:    #1e293b;
  --bacc-muted:   #64748b;
  --bacc-radius:  14px;
  --bacc-shadow:  0 4px 24px rgba(15,23,42,0.09);
}

.bacc-wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 16px 60px;
  font-family: 'Georgia', 'Times New Roman', serif;
  color: var(--bacc-text);
  font-size: 16px;
  line-height: 1.6;
}

.bacc-hidden { display: none !important; }

/* Hero */
.bacc-hero {
  text-align: center;
  padding: 48px 0 32px;
}
.bacc-hero__badge {
  display: inline-block;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  color: var(--bacc-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
  font-family: sans-serif;
}
.bacc-hero__title {
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--bacc-dark);
  margin: 0 0 12px;
}
.bacc-hero__sub {
  color: var(--bacc-muted);
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto;
  font-family: sans-serif;
}

/* Card */
.bacc-card {
  background: var(--bacc-card);
  border: 1px solid var(--bacc-border);
  border-radius: var(--bacc-radius);
  padding: 28px 32px;
  box-shadow: var(--bacc-shadow);
  margin-bottom: 20px;
}
.bacc-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--bacc-dark);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: sans-serif;
}
.bacc-card--center  { text-align: center; }
.bacc-card--cta     { background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%); color: #fff !important; border: none; }
.bacc-card--success { border-color: var(--bacc-green); }
.bacc-card--breakdown { padding-bottom: 20px; }

/* Form fields */
.bacc-field { margin-bottom: 16px; }
.bacc-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--bacc-muted);
  margin-bottom: 6px;
  font-family: sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.bacc-optional { font-weight: 400; font-style: italic; text-transform: none; }
.bacc-fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media(max-width:520px) { .bacc-fields-row { grid-template-columns: 1fr; } }

.bacc-input-group {
  display: flex;
  align-items: stretch;
  border: 2px solid var(--bacc-border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: border-color .2s;
}
.bacc-input-group:focus-within { border-color: var(--bacc-blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.08); }

.bacc-input-prefix {
  padding: 0 13px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--bacc-border);
  flex-shrink: 0;
  color: #64748b;
  min-width: 46px;
}
.bacc-input-prefix svg { display: block; }

/* All inputs inside input-group — unified style */
.bacc-input-group input {
  flex: 1;
  min-width: 0;
  border: none !important;
  border-radius: 0 !important;
  outline: none !important;
  background: transparent;
  padding: 13px 14px;
  font-size: 15px;
  color: var(--bacc-text);
  font-family: sans-serif;
  box-shadow: none !important;
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.bacc-input-group input::placeholder { color: #94a3b8; }
.bacc-input-group input:focus { outline: none; box-shadow: none; }

/* Standalone inputs (outside input-group) */
.bacc-wrap input[type="text"]:not(.bacc-input-group input),
.bacc-wrap input[type="email"]:not(.bacc-input-group input) {
  width: 100%;
  border: 2px solid var(--bacc-border);
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 15px;
  color: var(--bacc-text);
  background: #fff;
  transition: border-color .2s;
  box-sizing: border-box;
  font-family: sans-serif;
}
.bacc-wrap input:focus { outline: none; }

/* Buttons */
.bacc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, opacity .15s;
  font-family: sans-serif;
}
.bacc-btn:hover { transform: translateY(-1px); }
.bacc-btn:active { transform: translateY(0); }
.bacc-btn--primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37,99,235,0.35);
  margin-top: 8px;
  width: 100%;
  justify-content: center;
}
.bacc-btn--primary:hover { box-shadow: 0 6px 20px rgba(37,99,235,0.45); color:#fff; }
.bacc-btn--full { width: 100%; justify-content: center; }
.bacc-btn--ghost {
  background: transparent;
  color: var(--bacc-muted);
  border: 1px solid var(--bacc-border);
  margin-top: 12px;
}
.bacc-btn--ghost:hover { color: var(--bacc-dark); border-color: var(--bacc-dark); }
.bacc-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.bacc-btn__icon { font-size: 17px; }

.bacc-form-note { font-size: 12px; color: var(--bacc-muted); text-align: center; margin: 8px 0 0; font-family: sans-serif; }
.bacc-card--cta .bacc-form-note { color: rgba(255,255,255,0.5); }

/* Trust row */
.bacc-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}
.bacc-trust-row span {
  font-size: 13px;
  color: var(--bacc-muted);
  background: #f1f5f9;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: sans-serif;
}

/* Spinner */
.bacc-spinner {
  width: 56px;
  height: 56px;
  border: 5px solid #e2e8f0;
  border-top-color: var(--bacc-blue);
  border-radius: 50%;
  animation: bacc-spin 0.9s linear infinite;
  margin: 0 auto 24px;
}
@keyframes bacc-spin { to { transform: rotate(360deg); } }

.bacc-scanning__title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 24px;
  color: var(--bacc-dark);
  font-family: sans-serif;
}
.bacc-progress-steps { text-align: left; max-width: 320px; margin: 0 auto; }
.bacc-prog-item {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--bacc-muted);
  font-family: sans-serif;
  transition: all .3s;
}
.bacc-prog-item.active  { color: var(--bacc-blue); background: #eff6ff; font-weight: 600; }
.bacc-prog-item.done    { color: var(--bacc-green); }

/* Score ring */
.bacc-results-header {
  display: flex;
  align-items: center;
  gap: 28px;
  background: linear-gradient(135deg, #0f172a, #1e3a5f);
  border-radius: var(--bacc-radius);
  padding: 32px;
  margin-bottom: 20px;
  color: #fff;
}
@media(max-width:480px) {
  .bacc-results-header { flex-direction: column; text-align: center; }
}
.bacc-score-ring { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.bacc-ring-svg { width: 120px; height: 120px; transform: rotate(-90deg); }
.bacc-ring-bg  { fill: none; stroke: rgba(255,255,255,0.15); stroke-width: 10; }
.bacc-ring-fill {
  fill: none;
  stroke: #34d399;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  transition: stroke-dashoffset 1.2s cubic-bezier(.4,0,.2,1), stroke .5s;
}
.bacc-score-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.bacc-score-num {
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.bacc-score-label { font-size: 13px; color: rgba(255,255,255,0.6); font-family: sans-serif; }
.bacc-results-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; color: #ffffff !important; }
.bacc-results-url   { font-size: 13px; color: rgba(255,255,255,0.65); margin: 0 0 6px; word-break: break-all; font-family: sans-serif; }
.bacc-results-grade { font-size: 15px; color: #34d399; font-weight: 600; margin: 0; font-family: sans-serif; }

/* Breakdown */
.bacc-breakdown-grid { display: flex; flex-direction: column; gap: 10px; }
.bacc-breakdown-item { display: grid; grid-template-columns: 160px 1fr 60px; align-items: center; gap: 12px; font-family: sans-serif; font-size: 14px; }
@media(max-width:480px) { .bacc-breakdown-item { grid-template-columns: 1fr 1fr; } }
.bacc-breakdown-label { color: var(--bacc-muted); }
.bacc-bar-track { background: #e2e8f0; border-radius: 999px; height: 8px; overflow: hidden; }
.bacc-bar-fill  { height: 100%; border-radius: 999px; transition: width 1s cubic-bezier(.4,0,.2,1); }
.bacc-breakdown-val { font-weight: 700; text-align: right; }

/* Issues & Recs */
.bacc-issues-list,
.bacc-recs-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.bacc-issues-list li,
.bacc-recs-list li {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-family: sans-serif;
  line-height: 1.5;
}
.bacc-issues-list li.error   { background: #fef2f2; color: #991b1b; border-left: 3px solid var(--bacc-red); }
.bacc-issues-list li.warning { background: #fffbeb; color: #92400e; border-left: 3px solid var(--bacc-amber); }
.bacc-recs-list li           { background: #f0fdf4; color: #065f46; border-left: 3px solid var(--bacc-green); }
.bacc-gate-notice {
  margin-top: 14px;
  padding: 12px 16px;
  background: linear-gradient(90deg, #eff6ff, #f0f9ff);
  border-radius: 8px;
  font-size: 13px;
  color: var(--bacc-blue);
  font-family: sans-serif;
}

/* Badge */
.bacc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  padding: 0 7px;
  font-family: sans-serif;
}
.bacc-badge--red { background: var(--bacc-red); color: #fff; }

/* CTA Card */
.bacc-cta-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  font-family: sans-serif;
}
.bacc-cta-title { color: #ffffff !important; font-size: 22px; font-weight: 700; margin: 0 0 8px; font-family: sans-serif; }
.bacc-cta-sub   { color: rgba(255,255,255,0.75); margin: 0 0 12px; font-family: sans-serif; font-size: 14px; }
.bacc-cta-list  { list-style: none; padding: 0; margin: 0 0 20px; }
.bacc-cta-list li { color: rgba(255,255,255,0.85); font-size: 14px; padding: 4px 0; font-family: sans-serif; }
.bacc-card--cta .bacc-btn--primary {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 4px 14px rgba(5,150,105,0.4);
}

/* Success */
.bacc-success-icon { font-size: 48px; margin-bottom: 12px; }
.bacc-card--success h3 { font-size: 22px; color: var(--bacc-green); justify-content: center; margin-bottom: 10px; }
.bacc-card--success p  { color: var(--bacc-muted); font-family: sans-serif; }

/* Required field marker */
.bacc-required { color: #e53e3e; font-weight: 700; }

/* Sending status row */
.bacc-sending-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  font-family: sans-serif;
}

/* Small spinner */
.bacc-spinner--sm {
  width: 20px;
  height: 20px;
  border-width: 3px;
  margin: 0;
  flex-shrink: 0;
  border-color: rgba(255,255,255,0.2);
  border-top-color: #fff;
}

/* CTA action button (green outline style) */
.bacc-btn--cta-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  padding: 13px 24px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  width: 100%;
  box-sizing: border-box;
  font-family: sans-serif;
  transition: background .2s, border-color .2s;
}
/* ─── Download card ─── */
#bacc-download-card {
  margin-top: 0;
}
.bacc-btn--cta-action:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}

/* ─── Field error states ─── */
.bacc-field--error .bacc-input-group,
.bacc-field--error input {
  border-color: #e53e3e !important;
  background: #fff5f5 !important;
}
.bacc-field-error {
  color: #e53e3e;
  font-size: 12px;
  margin: 4px 0 0;
  font-family: sans-serif;
  display: flex;
  align-items: center;
  gap: 4px;
}
.bacc-field-error::before { content: '⚠ '; }

/* ─── Good/info issue items ─── */
.bacc-issues-list li.good { background: #f0fdf4; color: #065f46; border-left-color: var(--bacc-green); }
.bacc-issues-list li.info { background: #f0f9ff; color: #0369a1; border-left-color: #0ea5e9; font-size: 13px; }

/* ─── Page Speed panel ─── */
.bacc-card--speed {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border: none;
  color: #fff;
  padding: 22px 28px;
}
.bacc-ps-panel { display: flex; flex-direction: column; gap: 14px; }
.bacc-ps-title {
  font-size: 14px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: sans-serif;
}
.bacc-ps-metrics {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.bacc-ps-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.bacc-ps-num {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  font-family: sans-serif;
}
.bacc-ps-lbl {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: sans-serif;
}
.bacc-ps-mobile {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  display: inline-block;
  font-family: sans-serif;
  width: fit-content;
}
.bacc-ps-mobile.good { background: rgba(5,150,105,0.2); color: #34d399; }
.bacc-ps-mobile.fail { background: rgba(220,38,38,0.2);  color: #f87171; }

/* ─── Force white headings on dark backgrounds ─── */
#bacc-checker .bacc-results-title,
#bacc-checker h2.bacc-results-title {
  color: #ffffff !important;
}

#bacc-checker .bacc-card--cta .bacc-cta-title,
#bacc-checker .bacc-card--cta h3.bacc-cta-title {
  color: #ffffff !important;
}

#bacc-checker .bacc-card--cta h3 {
  color: #ffffff !important;
}