/**
 * Blank Text Tools – EditPad.ID Theme
 * Red: #c0392b / #922b21   Black: #1a1a1a
 */

/* ── VARIABLES ─────────────────────────────────────────── */
:root {
  --ep-red    : #c0392b;
  --ep-red-d  : #922b21;
  --ep-red-l  : #fdf2f2;
  --ep-black  : #1a1a1a;
  --ep-dark   : #2d2d2d;
  --ep-border : #e5e5e5;
  --ep-bg     : #fafafa;
  --ep-text   : #1a1a1a;
  --ep-muted  : #6b6b6b;
  --ep-light  : #9a9a9a;
  --ep-sh1    : 0 1px 4px rgba(0,0,0,.06);
  --ep-sh2    : 0 4px 16px rgba(0,0,0,.09);
  --ep-r      : 10px;
  --ep-r-sm   : 7px;
  --ep-font   : -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  --ep-mono   : "SF Mono","Fira Code",Consolas,Monaco,monospace;
}

/* ── RESET ─────────────────────────────────────────────── */
.btt-wrapper, .btt-wrapper * { box-sizing: border-box; }
.btt-wrapper {
  font-family: var(--ep-font);
  max-width: 940px;
  margin: 0 auto;
  padding: 30px 20px;
  color: var(--ep-text);
  line-height: 1.65;
}

/* ── CATEGORY ──────────────────────────────────────────── */
.btt-cat-header {
  margin: 38px 0 16px;
  padding-bottom: 11px;
  border-bottom: 2px solid var(--ep-border);
  position: relative;
}
.btt-cat-header::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 44px; height: 2px;
  background: var(--ep-red);
}
.btt-cat-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--ep-black);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 0;
}

/* ── CARD ──────────────────────────────────────────────── */
.btt-card {
  background: #fff;
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-r);
  padding: 26px 28px;
  margin-bottom: 20px;
  box-shadow: var(--ep-sh1);
  transition: box-shadow .2s, border-color .2s;
}
.btt-card:hover { box-shadow: var(--ep-sh2); }

/* ── TYPOGRAPHY ────────────────────────────────────────── */
.btt-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ep-black);
  letter-spacing: -.02em;
  margin: 0 0 8px;
  line-height: 1.3;
}
.btt-desc {
  font-size: .91rem;
  color: var(--ep-muted);
  margin: 0 0 20px;
  line-height: 1.65;
}
.btt-hint {
  font-size: .86rem;
  color: var(--ep-muted);
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  padding: 8px 13px;
  border-radius: 0 5px 5px 0;
  margin: 10px 0 16px;
  line-height: 1.5;
}

/* ── FORM ──────────────────────────────────────────────── */
.btt-label {
  display: block;
  font-size: .84rem;
  font-weight: 600;
  color: var(--ep-text);
  margin-bottom: 6px;
}
.btt-input,
.btt-textarea,
.btt-select {
  display: block;
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--ep-border);
  border-radius: var(--ep-r-sm);
  font-size: .95rem;
  font-family: var(--ep-font);
  background: #fafafa;
  color: var(--ep-text);
  margin-bottom: 14px;
  transition: border-color .17s, box-shadow .17s;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}
.btt-input:focus,
.btt-textarea:focus,
.btt-select:focus {
  border-color: var(--ep-red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(192,57,43,.10);
}
.btt-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b6b6b'%3E%3Cpath d='M5.23 7.21a.75.75 0 011.06.02L10 11.17l3.71-3.94a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0L5.21 8.27a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 18px;
  padding-right: 36px;
}
.btt-textarea {
  resize: vertical;
  min-height: 92px;
  font-family: var(--ep-mono);
  font-size: .88rem;
  line-height: 1.55;
}
.btt-output {
  background: #f6f6f6 !important;
  border-style: dashed !important;
  border-color: #d8d8d8 !important;
}
.btt-test-area::placeholder { color: #bbb; font-style: italic; }
.btt-meta {
  font-size: .8rem;
  color: var(--ep-light);
  text-align: right;
  margin: -8px 0 12px;
}

/* ══════════════════════════════════════════════════════════
   BUTTONS  –  all backgrounds hardcoded with !important
   so WordPress themes cannot override them
   ══════════════════════════════════════════════════════════ */

/* Base reset for ALL .btt-btn */
.btt-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  font-family: var(--ep-font) !important;
  font-weight: 600 !important;
  font-size: .93rem !important;
  border: none !important;
  border-radius: var(--ep-r-sm) !important;
  cursor: pointer !important;
  transition: filter .17s, transform .14s !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  line-height: 1 !important;
  /* Default: primary red */
  background: linear-gradient(135deg,#c0392b 0%,#922b21 100%) !important;
  color: #fff !important;
  padding: 12px 20px !important;
  width: 100% !important;
}
.btt-btn:hover  { filter: brightness(1.09) !important; transform: translateY(-1px) !important; }
.btt-btn:active { transform: translateY(0) !important; filter: brightness(.94) !important; }

/* ── Small buttons (auto width) */
.btt-btn.btt-btn-sm {
  width: auto !important;
  padding: 7px 16px !important;
  font-size: .85rem !important;
  background: linear-gradient(135deg,#c0392b 0%,#922b21 100%) !important;
  color: #fff !important;
}

/* ── Secondary / dark */
.btt-btn.secondary {
  background: linear-gradient(135deg,#444 0%,#1a1a1a 100%) !important;
  color: #fff !important;
}

/* ── Outline */
.btt-btn.btt-btn-outline {
  background: transparent !important;
  color: #c0392b !important;
  border: 1.5px solid #c0392b !important;
}
.btt-btn.btt-btn-outline:hover {
  background: #fdf2f2 !important;
  color: #922b21 !important;
  filter: none !important;
}

/* ── Strip buttons */
.btt-btn.btt-strip-btn {
  flex: 1 1 0 !important;
  min-width: 70px !important;
  width: auto !important;
  padding: 10px 10px !important;
  font-size: .84rem !important;
  background: linear-gradient(135deg,#c0392b 0%,#922b21 100%) !important;
  color: #fff !important;
}

/* ── Button row (inline, auto width) */
.btt-btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.btt-btn-row .btt-btn {
  flex: 1 !important;
  width: auto !important;
  min-width: 110px !important;
  padding: 11px 18px !important;
}

/* ── Copy list row buttons – MUST be auto-width, never overlap */
.btt-copy-list .btt-btn {
  flex-shrink: 0 !important;
  width: auto !important;
  min-width: unset !important;
  padding: 7px 16px !important;
  font-size: .85rem !important;
}

/* ── Unicode action buttons */
.btt-unicode-actions .btt-btn {
  flex: 1 !important;
  width: auto !important;
  min-width: 70px !important;
  padding: 8px 10px !important;
  font-size: .84rem !important;
}

/* ── Table buttons */
.btt-table .btt-btn {
  width: auto !important;
  padding: 6px 13px !important;
  font-size: .82rem !important;
}

/* ── Symbol grid buttons */
.btt-symbol-grid .btt-btn {
  flex: 0 0 auto !important;
  width: auto !important;
  padding: 8px 13px !important;
  font-size: .87rem !important;
}

/* ── Manual area buttons */
.btt-manual-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.btt-manual-actions .btt-btn {
  flex: 1 !important;
  width: auto !important;
  min-width: 110px !important;
  padding: 10px 16px !important;
}

/* ── Hero button */
.btt-hero .btt-btn {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 140px !important;
  padding: 12px 22px !important;
}

/* ── Tag buttons (other tools) */
.btt-tag.btt-btn,
.btt-tag {
  background: #fff !important;
  color: var(--ep-muted) !important;
  border: 1.5px solid var(--ep-border) !important;
  border-radius: 999px !important;
  padding: 7px 16px !important;
  width: auto !important;
  font-weight: 500 !important;
  font-size: .87rem !important;
}
.btt-tag.btt-btn:hover, .btt-tag:hover {
  border-color: #c0392b !important;
  color: #c0392b !important;
  background: #fdf2f2 !important;
  filter: none !important;
  transform: none !important;
}

/* ── ── */

/* ── HERO ─────────────────────────────────────────────── */
.btt-hero .btt-quick-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex-wrap: wrap;
}
.btt-preview-box {
  flex: 1;
  min-width: 140px;
  background: var(--ep-bg);
  border: 1.5px dashed #ccc;
  border-radius: var(--ep-r-sm);
  padding: 13px 16px;
  text-align: center;
  color: var(--ep-muted);
  font-style: italic;
  font-size: .91rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── COPY LIST ─────────────────────────────────────────── */
.btt-copy-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.btt-copy-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  background: #fafafa;
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-r-sm);
  transition: background .15s, border-color .15s;
}
.btt-copy-list li:hover {
  background: #fdf2f2;
  border-color: #f0c0c0;
}
.btt-cl-label {
  font-size: .91rem;
  color: var(--ep-text);
  font-weight: 500;
  flex: 1;
  min-width: 0;
}

/* ── UNICODE GRID ──────────────────────────────────────── */
.btt-unicode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px,1fr));
  gap: 14px;
}
.btt-unicode-card {
  background: #fafafa;
  border: 1.5px solid var(--ep-border);
  border-radius: var(--ep-r-sm);
  padding: 16px 18px;
  transition: border-color .2s, box-shadow .2s;
}
.btt-unicode-card:hover {
  border-color: var(--ep-red);
  box-shadow: 0 3px 12px rgba(192,57,43,.09);
}
.btt-unicode-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 9px;
  font-size: .86rem;
}
.btt-unicode-label {
  color: var(--ep-muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  flex-shrink: 0;
}
.btt-unicode-code,
.btt-unicode-html {
  font-family: var(--ep-mono);
  font-size: .8rem;
  background: #efefef;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ep-dark);
  border: 1px solid #e0e0e0;
}
.btt-unicode-example {
  font-family: var(--ep-mono);
  background: #fff;
  border: 1px solid var(--ep-border);
  padding: 2px 8px;
  border-radius: 4px;
  min-width: 1.3em;
  text-align: center;
}
.btt-unicode-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* ── QUICK STRIP ───────────────────────────────────────── */
.btt-quick-strip .btt-strip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── CHECKBOX ──────────────────────────────────────────── */
.btt-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(210px,1fr));
  gap: 8px;
  margin-bottom: 18px;
}
.btt-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1.5px solid var(--ep-border);
  border-radius: var(--ep-r-sm);
  cursor: pointer;
  font-size: .87rem;
  background: #fff;
  transition: border-color .17s, background .17s;
}
.btt-checkbox-label:hover {
  border-color: var(--ep-red);
  background: #fdf2f2;
}
.btt-checkbox-label input {
  width: 16px; height: 16px;
  flex-shrink: 0;
  accent-color: var(--ep-red);
  cursor: pointer;
  margin: 0;
}

/* ── FAQ ACCORDION ─────────────────────────────────────── */
.btt-accordion {
  border: 1.5px solid var(--ep-border);
  border-radius: var(--ep-r-sm);
  overflow: hidden;
}
.btt-accordion-item { border-bottom: 1px solid var(--ep-border); }
.btt-accordion-item:last-child { border-bottom: none; }
.btt-accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  background: #fff !important;
  border: none !important;
  font-family: var(--ep-font);
  font-size: .95rem;
  font-weight: 600;
  text-align: left;
  color: var(--ep-text) !important;
  cursor: pointer;
  transition: background .17s, color .17s;
  /* Override .btt-btn if class present */
  border-radius: 0 !important;
  transform: none !important;
  line-height: 1.4 !important;
}
.btt-accordion-trigger:hover {
  background: #fdf2f2 !important;
  color: #922b21 !important;
  filter: none !important;
  transform: none !important;
}
.btt-accordion-trigger[aria-expanded="true"] { color: var(--ep-red) !important; }
.btt-accordion-trigger::after {
  content: "";
  flex-shrink: 0;
  width: 18px; height: 18px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") no-repeat center;
  mask-size: 100%;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask-size: 100%;
  opacity: .5;
  transition: transform .2s;
}
.btt-accordion-trigger[aria-expanded="true"]::after { transform: rotate(180deg); opacity: .9; }
.btt-accordion-panel { background: #fafafa; border-top: 1px solid var(--ep-border); }
.btt-accordion-panel[hidden] { display: none; }
.btt-accordion-panel p { padding: 13px 18px 17px; font-size: .91rem; color: var(--ep-muted); line-height: 1.6; margin: 0; }

/* ── TABLE ─────────────────────────────────────────────── */
.btt-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-r-sm);
  margin-bottom: 4px;
}
.btt-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.btt-table th {
  background: var(--ep-black) !important;
  color: #fff !important;
  padding: 12px 14px;
  text-align: left;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.btt-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--ep-border);
  vertical-align: middle;
}
.btt-table tbody tr:last-child td { border-bottom: none; }
.btt-table tbody tr:hover { background: #fafafa; }
.btt-table code {
  font-family: var(--ep-mono);
  font-size: .8rem;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ep-dark);
  border: 1px solid #e0e0e0;
}
.btt-table td:last-child { white-space: nowrap; }

/* ── DIFF / 2-COL ──────────────────────────────────────── */
.btt-diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── LANGUAGES ─────────────────────────────────────────── */
.btt-lang-list { display: flex; flex-wrap: wrap; gap: 7px; }
.btt-lang {
  display: inline-block;
  padding: 5px 13px;
  background: #fafafa;
  border: 1.5px solid var(--ep-border);
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ep-muted);
  letter-spacing: .04em;
  transition: border-color .17s, color .17s;
}
.btt-lang:hover { border-color: var(--ep-red); color: var(--ep-red); }

/* ── TAGS ──────────────────────────────────────────────── */
.btt-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── SYMBOL GRID ───────────────────────────────────────── */
.btt-symbol-grid { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }

/* ── WORD COUNT ────────────────────────────────────────── */
.btt-wc-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 12px 16px;
  background: #fafafa;
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-r-sm);
  font-size: .89rem;
  margin-bottom: 14px;
}
.btt-wc-stats strong { color: var(--ep-red); font-weight: 700; }

/* ── TOAST ─────────────────────────────────────────────── */
#btt-toast {
  position: fixed;
  left: 50%; bottom: 30px;
  transform: translateX(-50%) translateY(70px);
  min-width: 250px; max-width: 88vw;
  padding: 12px 22px;
  background: var(--ep-black);
  color: #fff;
  font-size: .91rem;
  font-weight: 600;
  text-align: center;
  border-radius: var(--ep-r-sm);
  box-shadow: 0 8px 30px rgba(0,0,0,.22);
  border-left: 4px solid var(--ep-red);
  z-index: 99999;
  opacity: 0; visibility: hidden;
  transition: transform .28s cubic-bezier(.34,1.56,.64,1), opacity .22s, visibility .22s;
}
#btt-toast.btt-toast-show {
  transform: translateX(-50%) translateY(0);
  opacity: 1; visibility: visible;
}

/* ── SIDEBAR ───────────────────────────────────────────── */
.btt-widget-wrap.btt-sidebar { max-width: 100%; padding: 0; }
.btt-sidebar .btt-card         { padding: 15px; margin-bottom: 0; }
.btt-sidebar .btt-title        { font-size: 1rem; margin-bottom: 7px; }
.btt-sidebar .btt-desc         { font-size: .82rem; margin-bottom: 10px; }
.btt-sidebar .btt-input,
.btt-sidebar .btt-textarea     { padding: 8px 11px; font-size: .86rem; margin-bottom: 9px; }
.btt-sidebar .btt-textarea     { min-height: 56px; }
.btt-sidebar .btt-btn          { padding: 8px 13px !important; font-size: .86rem !important; }
.btt-sidebar .btt-unicode-grid { grid-template-columns: 1fr; gap: 9px; }
.btt-sidebar .btt-checkbox-grid{ grid-template-columns: 1fr; }
.btt-sidebar .btt-strip-grid   { flex-direction: column; }
.btt-sidebar .btt-strip-btn    { width: 100% !important; }
.btt-sidebar .btt-accordion-trigger { padding: 10px 13px; font-size: .86rem; }

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 640px) {
  .btt-wrapper { padding: 18px 14px; }
  .btt-card    { padding: 20px 18px; }
  .btt-title   { font-size: 1.1rem; }
  .btt-unicode-grid   { grid-template-columns: 1fr; }
  .btt-checkbox-grid  { grid-template-columns: 1fr; }
  .btt-diff-grid      { grid-template-columns: 1fr; }
  .btt-hero .btt-quick-row { flex-direction: column; }
  .btt-hero .btt-btn  { width: 100% !important; }
  .btt-btn-row        { flex-direction: column; }
  .btt-btn-row .btt-btn { width: 100% !important; }
  .btt-manual-actions { flex-direction: column; }
  .btt-manual-actions .btt-btn { width: 100% !important; }
}
@media (max-width: 400px) {
  .btt-card  { padding: 16px 14px; }
  .btt-title { font-size: 1rem; }
}
