/* ============================================================
   BeCreative Tools — Global Stylesheet v3.0
   Style: "Cupertino" — Apple-inspired, minimal & tech.
   System SF Pro typography, monochrome + single blue accent,
   pill controls, segmented tabs, generous whitespace.
   Vanilla CSS. Compatible with GeneratePress + GenerateBlocks.
   ============================================================ */

:root {
  /* Neutrals (Apple grays) */
  --bct-bg:          #ffffff;
  --bct-bg-alt:      #f5f5f7;
  --bct-bg-soft:     #fafafa;
  --bct-fill:        #f5f5f7;
  --bct-fill-2:      #e8e8ed;
  --bct-border:      #d2d2d7;
  --bct-hairline:    #e8e8ed;
  --bct-text:        #1d1d1f;
  --bct-text-muted:  #6e6e73;
  --bct-text-faint:  #86868b;

  /* Accent + semantics (Apple system colors) */
  --bct-blue:        #0071e3;
  --bct-blue-h:      #0077ed;
  --bct-blue-press:  #006edb;
  --bct-primary:     #0071e3;
  --bct-accent:      #0071e3;
  --bct-red:         #ff3b30;
  --bct-error:       #d70015;
  --bct-green:       #34c759;
  --bct-success:     #1d8a3f;
  --bct-orange:      #ff9500;

  --bct-radius:      20px;
  --bct-radius-sm:   12px;
  --bct-radius-key:  14px;
  --bct-pill:        980px;

  --bct-shadow:      0 4px 24px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --bct-shadow-key:  0 1px 2px rgba(0,0,0,.06);
  --bct-ring:        0 0 0 4px rgba(0,113,227,.30);

  --bct-font:        -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bct-font-mono:   ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ── Wrapper / Card ──────────────────────────────────────── */
.bct-tool-wrap {
  font-family: var(--bct-font);
  color: var(--bct-text);
  background: var(--bct-bg);
  border: 1px solid var(--bct-hairline);
  border-radius: var(--bct-radius);
  box-shadow: var(--bct-shadow);
  padding: 2.5rem;
  margin: 1.5rem 0;
  max-width: 720px;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.bct-theme-dark {
  --bct-bg:         #1d1d1f;
  --bct-bg-alt:     #2a2a2c;
  --bct-fill:       #2a2a2c;
  --bct-fill-2:     #3a3a3c;
  --bct-border:     #424245;
  --bct-hairline:   #38383a;
  --bct-text:       #f5f5f7;
  --bct-text-muted: #a1a1a6;
  --bct-text-faint: #86868b;
}

/* ── Title ───────────────────────────────────────────────── */
.bct-tool-title {
  font-family: var(--bct-font);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -.022em;
  margin: 0 0 1.6rem;
  padding-bottom: 1.1rem;
  color: var(--bct-text);
  border-bottom: 1px solid var(--bct-hairline);
}

/* ── Form elements ───────────────────────────────────────── */
.bct-group { margin-bottom: 1.15rem; }

.bct-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: .45rem;
  color: var(--bct-text-muted);
  letter-spacing: -.005em;
}

.bct-input,
.bct-select {
  width: 100%;
  padding: .8rem 1rem;
  border: 1px solid var(--bct-border);
  border-radius: var(--bct-radius-sm);
  font-family: var(--bct-font);
  font-size: 17px;
  background: var(--bct-fill);
  color: var(--bct-text);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

.bct-input::placeholder { color: var(--bct-text-faint); }

.bct-select {
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
}

.bct-input:hover,
.bct-select:hover { border-color: var(--bct-text-faint); }

.bct-input:focus,
.bct-select:focus {
  outline: none;
  background: var(--bct-bg);
  border-color: var(--bct-blue);
  box-shadow: var(--bct-ring);
}

/* ── Row layout ──────────────────────────────────────────── */
.bct-row { display: grid; gap: 1rem; }
.bct-row-2 { grid-template-columns: 1fr 1fr; }
.bct-row-3 { grid-template-columns: 1fr 1fr 1fr; }

@media (max-width: 540px) {
  .bct-tool-wrap { padding: 1.6rem; }
  .bct-row-2, .bct-row-3 { grid-template-columns: 1fr; }
}

/* ── Buttons (pill) ──────────────────────────────────────── */
.bct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.6rem;
  min-height: 46px;
  border: none;
  border-radius: var(--bct-pill);
  font-family: var(--bct-font);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: background .18s ease, transform .12s ease, box-shadow .18s ease, color .18s ease;
}

.bct-btn:active { transform: scale(.97); }
.bct-btn:focus-visible { outline: none; box-shadow: var(--bct-ring); }

.bct-btn-primary { background: var(--bct-blue); color: #fff; }
.bct-btn-primary:hover { background: var(--bct-blue-h); }
.bct-btn-primary:active { background: var(--bct-blue-press); }

.bct-btn-secondary {
  background: var(--bct-fill-2);
  color: var(--bct-text);
}
.bct-btn-secondary:hover { background: #dcdce1; }

.bct-btn-accent { background: var(--bct-text); color: var(--bct-bg); }
.bct-btn-accent:hover { opacity: .85; }

.bct-btn-group { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ── Result panel (dark readout) ─────────────────────────── */
.bct-result {
  background: var(--bct-text);            /* near-black panel */
  border-radius: var(--bct-radius-sm);
  padding: 1.4rem 1.5rem;
  margin-top: 1.5rem;
  color: #fff;
  display: none;
}
.bct-result.visible { display: block; animation: bct-rise .4s cubic-bezier(.22,1,.36,1) both; }

.bct-result-label {
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--bct-text-faint);
  margin-bottom: .45rem;
}

.bct-result-value {
  font-family: var(--bct-font-mono);
  font-size: 2rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.bct-result-sub { font-size: .9rem; color: #a1a1a6; margin-top: .45rem; }

/* ── Result grid (multi-value) ───────────────────────────── */
.bct-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .8rem;
  margin-top: 1.5rem;
  animation: bct-rise .4s cubic-bezier(.22,1,.36,1) both;
}

.bct-result-card {
  background: var(--bct-fill);
  border-radius: var(--bct-radius-sm);
  padding: 1rem 1.1rem;
  text-align: center;
}
.bct-result-card .bct-result-label { margin-bottom: .3rem; color: var(--bct-text-muted); }
.bct-result-card .bct-result-value { font-size: 1.4rem; color: var(--bct-text); }

/* ── Calculator ──────────────────────────────────────────── */
.bct-calc-display {
  background: #1d1d1f;
  color: #fff;
  font-family: var(--bct-font-mono);
  font-size: 2.3rem;
  font-weight: 500;
  text-align: right;
  padding: 1.1rem 1.2rem;
  border-radius: var(--bct-radius-sm);
  margin-bottom: 1rem;
  min-height: 3.8rem;
  word-break: break-all;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.bct-calc-display .bct-calc-expr {
  font-size: .82rem;
  color: #86868b;
  display: block;
  min-height: 1.2em;
  font-weight: 400;
}

.bct-calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .55rem; }

.bct-calc-btn {
  padding: 1rem .4rem;
  min-height: 54px;
  border: none;
  border-radius: var(--bct-radius-key);
  font-family: var(--bct-font);
  font-size: 1.2rem;
  font-weight: 500;
  cursor: pointer;
  transition: filter .15s ease, transform .1s ease, background .15s ease;
  user-select: none;
  box-shadow: var(--bct-shadow-key);
}
.bct-calc-btn:hover  { filter: brightness(.97); }
.bct-calc-btn:active { transform: scale(.95); }

.bct-calc-btn-num   { background: var(--bct-fill);   color: var(--bct-text); }
.bct-calc-btn-op    { background: var(--bct-blue);   color: #fff; }
.bct-calc-btn-op:hover { background: var(--bct-blue-h); filter: none; }
.bct-calc-btn-eq    { background: var(--bct-blue);   color: #fff; }
.bct-calc-btn-eq:hover { background: var(--bct-blue-h); filter: none; }
.bct-calc-btn-clear { background: var(--bct-fill-2); color: var(--bct-red); }
.bct-calc-btn-del   { background: var(--bct-fill-2); color: var(--bct-text); }
.bct-calc-btn-span2 { grid-column: span 2; }

/* ── Zodiac ──────────────────────────────────────────────── */
.bct-zodiac-result { text-align: center; padding: 1.5rem; }
.bct-zodiac-symbol { font-size: 4rem; display: block; margin-bottom: .5rem; }
.bct-zodiac-name   { font-size: 1.8rem; font-weight: 700; letter-spacing: -.02em; color: var(--bct-text); }
.bct-zodiac-desc   { margin-top: .5rem; color: var(--bct-text-muted); }

/* ── QR Code ─────────────────────────────────────────────── */
.bct-qr-output { text-align: center; margin-top: 1.3rem; }
.bct-qr-holder { display: inline-block; line-height: 0; }
.bct-qr-output canvas,
.bct-qr-output img {
  border: 8px solid #fff;
  border-radius: var(--bct-radius-sm);
  box-shadow: var(--bct-shadow);
  max-width: 240px;
  height: auto;
}

.bct-hint {
  font-size: .85rem;
  color: var(--bct-text-muted);
  margin: .3rem 0 .4rem;
  line-height: 1.5;
}

.bct-qr-download {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1.1rem;
  padding: .6rem 1.4rem;
  background: var(--bct-blue);
  color: #fff;
  border-radius: var(--bct-pill);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: background .18s ease;
}
.bct-qr-download:hover { background: var(--bct-blue-h); }

/* ── Currency ────────────────────────────────────────────── */
.bct-currency-rate {
  font-family: var(--bct-font-mono);
  font-size: .82rem;
  color: var(--bct-text-muted);
  margin-top: .5rem;
}

/* ── BMI gauge ───────────────────────────────────────────── */
.bct-bmi-bar {
  height: 12px;
  border-radius: var(--bct-pill);
  background: linear-gradient(to right, #34c759, #a3e635, #ffd60a, #ff9500, #ff3b30);
  margin: 1rem 0;
  position: relative;
}
.bct-bmi-marker {
  position: absolute;
  top: -5px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--bct-border);
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  transform: translateX(-50%);
  transition: left .45s cubic-bezier(.22,1,.36,1);
}
.bct-bmi-labels {
  display: flex; justify-content: space-between;
  font-size: .72rem; color: var(--bct-text-muted); font-weight: 500;
}

/* ── Messages ────────────────────────────────────────────── */
.bct-msg {
  padding: .75rem 1rem;
  border-radius: var(--bct-radius-sm);
  font-size: .92rem;
  font-weight: 500;
  margin-top: 1rem;
}
.bct-msg-error   { background: #fff0f0; color: var(--bct-error);   }
.bct-msg-success { background: #effaf1; color: var(--bct-success); }
.bct-msg-info    { background: #eef5ff; color: var(--bct-blue);    }

/* ── Tabs (segmented control) ────────────────────────────── */
.bct-tabs {
  display: inline-flex;
  gap: 2px;
  margin-bottom: 1.4rem;
  padding: 2px;
  background: var(--bct-fill);
  border-radius: var(--bct-radius-sm);
  flex-wrap: wrap;
}
.bct-tab-btn {
  padding: .45rem 1.1rem;
  border: none;
  border-radius: 10px;
  font-family: var(--bct-font);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--bct-text-muted);
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.bct-tab-btn:hover { color: var(--bct-text); }
.bct-tab-btn.active {
  background: var(--bct-bg);
  color: var(--bct-text);
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

/* ── Credit ──────────────────────────────────────────────── */
.bct-tool-credit {
  font-size: .78rem;
  color: var(--bct-text-faint);
  text-align: right;
  margin: 1.6rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--bct-hairline);
}
.bct-tool-credit a { color: var(--bct-blue); text-decoration: none; font-weight: 500; }
.bct-tool-credit a:hover { text-decoration: underline; }

/* ── Editor placeholder ──────────────────────────────────── */
.bct-editor-preview {
  background: var(--bct-fill);
  border: 1px solid var(--bct-border);
  border-radius: var(--bct-radius);
  padding: 2rem;
  text-align: center;
  color: var(--bct-text-muted);
}
.bct-editor-preview .bct-ep-icon { font-size: 2.5rem; display: block; margin-bottom: .5rem; }
.bct-editor-preview .bct-ep-name { font-size: 1rem; font-weight: 700; color: var(--bct-text); }
.bct-editor-preview .bct-ep-cat  { font-size: .8rem; margin-top: .2rem; }

/* ── Motion ──────────────────────────────────────────────── */
@keyframes bct-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bct-tool-wrap, .bct-tool-wrap * {
    animation: none !important;
    transition: none !important;
  }
}
