/* ==========================================================================
   Bricks Geo Rules — Admin Styles
   File: assets/admin.css
   Scope: Settings page (bricks_page_bgeo-settings)
   ========================================================================= */

/* ---------- CSS Vars (light & dark aware) ---------- */
:root {
  --bgeo-bg: #f8fafc;             /* slate-50 */
  --bgeo-panel: #ffffff;          /* white */
  --bgeo-border: #e5e7eb;         /* gray-200 */
  --bgeo-text: #0f172a;           /* slate-900 */
  --bgeo-muted: #475569;          /* slate-600 */
  --bgeo-primary: #3b82f6;        /* blue-500 */
  --bgeo-primary-600: #2563eb;    /* blue-600 */
  --bgeo-green: #22c55e;          /* green-500 */
  --bgeo-amber: #f59e0b;          /* amber-500 */
  --bgeo-red: #ef4444;            /* red-500 */
  --bgeo-ring: rgba(59, 130, 246, .35);
  --bgeo-radius: 12px;
  --bgeo-radius-sm: 8px;
  --bgeo-shadow: 0 8px 24px rgba(2, 6, 23, 0.08);
  --bgeo-shadow-sm: 0 4px 14px rgba(2, 6, 23, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bgeo-bg: #0b1220;            /* slate-950 */
    --bgeo-panel: #0f172a;         /* slate-900 */
    --bgeo-border: #1f2937;        /* gray-800 */
    --bgeo-text: #e5e7eb;          /* gray-200 */
    --bgeo-muted: #94a3b8;         /* slate-400 */
    --bgeo-shadow: 0 8px 28px rgba(0,0,0,.45);
    --bgeo-shadow-sm: 0 4px 16px rgba(0,0,0,.35);
    --bgeo-ring: rgba(59, 130, 246, .5);
  }
}

/* ---------- Page shell ---------- */
/* Footer container */
.bgeo-footer {
    margin-top: 40px;
    text-align: center;
    padding: 25px 15px;
    border-top: 1px solid #e2e8f0;
    background: linear-gradient(90deg, #fafafa, #f9fafb);
    border-radius: 10px;
    font-size: 14px;
    color: #555;
}

/* Donation button */
.bgeo-donate-btn {
    display: inline-block;
    background: #0a66c2;
    color: #fff !important;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    transition: background 0.2s ease, transform 0.2s ease;
    margin-top: 10px;
}

.bgeo-donate-btn:hover {
    background: #084a8e;
    transform: translateY(-1px);
}

/* Note text */
.bgeo-footer-note {
    margin-top: 14px;
    font-size: 12px;
    color: #888;
}

/* Logo container */
.bgeo-footer-logo {
    margin-top: 12px;
}

/* Logo image hover animation */
.bgeo-logo-img {
    display: inline-block;
    margin: 6px;
    transition: transform 0.2s ease-in-out;
    object-fit: contain;
}

.bgeo-logo-img:hover {
    transform: scale(1.1);
}



.bgeo-footer img:hover {
    transform: scale(1.1);
}




.bricks_page_bgeo-settings{
    background: var(--bgeo-panel);
}
.bgeo-wrap {
  color: var(--bgeo-text);
}

.bgeo-wrap .notice,
.bgeo-wrap .updated,
.bgeo-wrap .error {
  border-radius: var(--bgeo-radius-sm);
}

/* Title */
.bgeo-wrap h1 {
  margin-bottom: 10px !important;
  letter-spacing: -0.02em;
}

/* Subtext under H1 */
.bgeo-wrap > p:first-of-type {
  margin-top: 0;
  color: var(--bgeo-muted);
  font-size: 14px;
}

/* ---------- Panels / Cards ---------- */
.bgeo-card {
  background: var(--bgeo-panel);
  border: 1px solid var(--bgeo-border);
  border-radius: var(--bgeo-radius);
  box-shadow: var(--bgeo-shadow);
  padding: 18px;
}

.bgeo-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
    align-items: stretch;
}

@media (max-width: 1100px) {
  .bgeo-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Settings form ---------- */
.bgeo-settings {
  display: grid;
  gap: 16px;
}

.bgeo-field {
  display: grid;
  gap: 6px;
}

.bgeo-label {
  font-weight: 600;
}

.bgeo-inline-help {
  color: var(--bgeo-muted);
  font-size: 12px;
}

/* WP form controls enhanced */
.bgeo-wrap input.regular-text,
.bgeo-wrap select.regular-text,
.bgeo-wrap select,
.bgeo-wrap input[type="text"] {
  background: var(--bgeo-panel);
  color: var(--bgeo-text);
  border: 1px solid var(--bgeo-border);
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: var(--bgeo-shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease, transform .04s ease;
}

.bgeo-wrap input[type="text"]:focus,
.bgeo-wrap select:focus {
  outline: none;
  border-color: var(--bgeo-primary);
  box-shadow: 0 0 0 4px var(--bgeo-ring);
}

.bgeo-wrap .description {
  color: var(--bgeo-muted);
  margin-top: 6px;
}

/* ---------- Buttons (enhanced WP) ---------- */
.bgeo-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bgeo-wrap .button {
  border-radius: 999px;
  padding: 7px 14px;
  border: 1px solid var(--bgeo-border);
  box-shadow: var(--bgeo-shadow-sm);
  transition: transform .04s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}

.bgeo-wrap .button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(2,6,23,0.08);
}

.bgeo-wrap .button:active {
  transform: translateY(0);
}

.bgeo-wrap .button.button-primary {
  background: linear-gradient(180deg, var(--bgeo-primary) 0%, var(--bgeo-primary-600) 100%);
  border: none;
  color: #fff;
}

/* ---------- Section dividers ---------- */
.bgeo-divider {
  height: 1px;
  background: var(--bgeo-border);
  margin: 18px 0;
  border-radius: 6px;
}

/* ---------- Test area ---------- */
#bgeo-test-output {
    background: var(--bgeo-panel) !important;
    color: var(--bgeo-text) !important;
    border: 1px solid var(--bgeo-border) !important;
    border-radius: var(--bgeo-radius) !important;
    box-shadow: var(--bgeo-shadow-sm);
    font-size: 12px;
    line-height: 1.5;
    max-height: 360px;
    max-width: 500px;
    position: relative;
    overflow: auto;
    padding: 20px;
}
/* Inputs + buttons row */
#bgeo-test-ip {
  border-radius: 10px !important;
}

/* ---------- “How to use” list ---------- */
.bgeo-howto ol {
  margin: 0;
  padding-left: 18px;
}

.bgeo-howto li {
  padding-left: 6px;
  margin: 8px 0;
}

/* ---------- Badges & hints ---------- */
.bgeo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #eef2ff;  /* indigo-50 */
  color: #3730a3;       /* indigo-800 */
  border: 1px solid #e0e7ff;
}

.bgeo-badge--ok {
  background: #ecfdf5;  /* emerald-50 */
  color: #065f46;       /* emerald-800 */
  border-color: #d1fae5;
}

.bgeo-badge--warn {
  background: #fffbeb;  /* amber-50 */
  color: #92400e;       /* amber-800 */
  border-color: #fef3c7;
}

.bgeo-badge--err {
  background: #fef2f2;  /* red-50 */
  color: #7f1d1d;       /* red-900 */
  border-color: #fee2e2;
}

/* ---------- Kicker / footer note ---------- */
.bgeo-footer {
  margin-top: 18px;
  color: var(--bgeo-muted);
  font-size: 13px;
}

.bgeo-footer a {
  text-decoration: none;
  /*border-bottom: 1px dotted currentColor;*/
}

.bgeo-footer a:hover {
  opacity: .9;
}

/* ---------- Cards layout on the settings page ---------- */
.bgeo-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 1100px) {
  .bgeo-columns {
    grid-template-columns: 1fr;
  }
}

/* ---------- Headings inside cards ---------- */
.bgeo-card h2,
.bgeo-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.2;
}

.bgeo-card h2 {
  font-size: 18px;
}

.bgeo-card h3 {
  font-size: 16px;
  color: var(--bgeo-muted);
}

/* ---------- Custom inline code style ---------- */
.bgeo-code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid var(--bgeo-border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

@media (prefers-color-scheme: dark) {
  .bgeo-code {
    background: rgba(255,255,255,0.06);
  }
}

/* ---------- Subtle focus ring for clickables in page ---------- */
.bgeo-wrap a:focus,
.bgeo-wrap button:focus,
.bgeo-wrap input:focus,
.bgeo-wrap select:focus {
  outline: none !important;
  box-shadow: 0 0 0 4px var(--bgeo-ring) !important;
  border-color: var(--bgeo-primary) !important;
  border-radius: 10px;
}

/* ---------- Tiny “pill” title row helper (optional) ---------- */
.bgeo-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.bgeo-title-row .bgeo-actions {
  gap: 6px;
}

.bgeo-title-row .button {
  padding: 6px 12px;
  font-size: 12px;
}

/* ---------- Fancy separators between sections ---------- */
.bgeo-sep {
  position: relative;
  height: 20px;
  margin: 8px 0 18px;
}

.bgeo-sep::before {
  content: "";
  position: absolute;
  inset: 9px 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bgeo-border), transparent);
}

/* ---------- Animations ---------- */
@media (prefers-reduced-motion: no-preference) {
  .bgeo-card {
    animation: bgeo-fade-in .25s ease-out;
  }
}

@keyframes bgeo-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ---------- How To Use (Compact) ---------- */
.bgeo-howto.is-compact { padding-top: 18px; }
.bgeo-howto-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.bgeo-howto-title {
  margin: 0;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .2px;
}
.bgeo-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  line-height: 1;
  border: 1px solid #e0e7ff;
}

/* Steps grid */
.bgeo-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 8px 0 14px;
}
@media (max-width: 1100px) {
  .bgeo-steps { grid-template-columns: 1fr; }
}
.bgeo-step {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
}
.bgeo-step .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
  color: #4f46e5;
  margin-right: 6px;
  vertical-align: middle;
}
.bgeo-step h4 {
  margin: 6px 0 8px;
  font-size: 14px;
  font-weight: 700;
}
.bgeo-step ol, .bgeo-step ul {
  margin: 0 0 6px 18px;
  padding: 0;
}
.bgeo-step li { margin: 3px 0; }
.bgeo-bullets { list-style: disc; }
.bgeo-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: #4b5563;
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
  padding: 8px 10px;
  border-radius: 8px;
}

/* Guides row */
.bgeo-guides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 6px;
}
@media (max-width: 1100px) {
  .bgeo-guides { grid-template-columns: 1fr; }
}
.bgeo-guide {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
}
.bgeo-guide-title {
  display: inline-block;
  font-weight: 700;
  margin-bottom: 6px;
}
.bgeo-guide ul { margin: 0; padding-left: 18px; }
.bgeo-guide li { margin: 5px 0; }

/* FAQ collapsibles */
.bgeo-faq {
  margin-top: 12px;
  border-top: 1px solid #eef2f7;
  padding-top: 10px;
}
.bgeo-faq details {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 8px 0;
}
.bgeo-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: #111827;
}
.bgeo-faq p { margin: 8px 0 0; color: #374151; }

/* Small helper: pill badges reused elsewhere */
.bgeo-badge, .bgeo-pill {
  font-weight: 600;
  letter-spacing: .25px;
}


/* ===== Test Result UI ===== */
.bgeo-result {
  margin-top: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.bgeo-result-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.bgeo-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 8px;
  font-size: 12px;
  line-height: 1;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}
.bgeo-pill--ok {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.bgeo-pill--warn {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}
.bgeo-pill--error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}
.bgeo-pill--muted {
  background: #f3f4f6;
  color: #4b5563;
  border-color: #e5e7eb;
}

.bgeo-status-text {
  font-size: 12px;
  color: #4b5563;
}

.bgeo-kv {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.bgeo-kv__row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px dashed #e5e7eb;
}
.bgeo-kv__row:first-child {
  border-top: 0;
}
.bgeo-kv__key {
  font-size: 12px;
  color: #6b7280;
}
.bgeo-kv__val {
  font-size: 13px;
  color: #111827;
  word-break: break-word;
}
