/* PXB Multilingual — Frontend CSS v1.0.0 */

/* ── Language switcher ──────────────────────────────────────────── */
.pxb-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}
.pxb-lang-item {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s;
}
a.pxb-lang-item         { opacity: 0.45; }
a.pxb-lang-item:hover   { opacity: 0.9; text-decoration: none; }
span.pxb-lang-active    { border: 1px solid currentColor; opacity: 1; }
.pxb-lang-sep           { opacity: 0.25; font-size: 11px; }

/* ── Edit mode body padding (toolbar is fixed at bottom) ─────── */
.pxb-edit-mode          { padding-bottom: 54px !important; }

/* ── Toolbar ─────────────────────────────────────────────────── */
#pxb-toolbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 999999;
  height: 50px;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  box-shadow: 0 -2px 20px rgba(0,0,0,.3);
}
.pxb-tb-left, .pxb-tb-right, .pxb-tb-center {
  display: flex; align-items: center; gap: 10px;
}
.pxb-tb-center { flex: 1; justify-content: center; }
.pxb-tb-logo   { font-weight: 700; color: #6fcf97; letter-spacing: .04em; font-size: 14px; }
.pxb-tb-badge  { font-size: 12px; background: #1d4d31; color: #6fcf97; padding: 3px 10px; border-radius: 20px; }
.pxb-tb-hint-text { color: rgba(255,255,255,.4); font-size: 12px; }
.pxb-tb-count  { font-size: 11px; color: #6fcf97; }
.pxb-tb-lang-btn {
  font-size: 11px; font-weight: 600; letter-spacing: .06em;
  color: rgba(255,255,255,.45); text-decoration: none;
  padding: 4px 9px; border-radius: 3px;
  border: 1px solid rgba(255,255,255,.15);
  transition: all .15s;
}
.pxb-tb-lang-btn:hover       { color: #fff; border-color: rgba(255,255,255,.4); }
.pxb-tb-lang-btn.pxb-tb-lang-active { color: #fff; border-color: #6fcf97; background: #1d4d31; }

/* ── Shared button ───────────────────────────────────────────── */
.pxb-btn {
  display: inline-flex; align-items: center;
  padding: 6px 14px; border-radius: 3px;
  font-size: 12px; font-family: inherit;
  font-weight: 500; letter-spacing: .03em;
  cursor: pointer; border: none;
  text-decoration: none;
  transition: background .15s, opacity .15s;
  line-height: 1.4;
  white-space: nowrap;
}
.pxb-btn:disabled { opacity: .5; cursor: not-allowed; }
.pxb-btn-exit   { background: rgba(255,255,255,.1); color: #fff; }
.pxb-btn-exit:hover { background: rgba(255,255,255,.2); color: #fff; text-decoration: none; }
.pxb-btn-save   { background: #1d6e43; color: #fff; }
.pxb-btn-save:hover { background: #27904f; }
.pxb-btn-revert { background: transparent; color: #888; border: 1px solid #ddd; margin-left: 4px; }
.pxb-btn-revert:hover { color: #c0392b; border-color: #c0392b; }

/* ── Editable highlights ─────────────────────────────────────── */
.pxb-edit-mode [data-pxb-hash] {
  cursor: pointer;
  border-radius: 2px;
  transition: background .1s, outline .1s;
}
.pxb-edit-mode [data-pxb-hash]:hover {
  outline: 1.5px dashed #27904f;
  outline-offset: 2px;
  background: rgba(39,144,79,.07);
}
.pxb-edit-mode .pxb-has-tr {
  border-bottom: 1.5px solid #6fcf97;
}
.pxb-edit-mode .pxb-el-active {
  outline: 2px solid #1d6e43 !important;
  outline-offset: 2px;
  background: rgba(29,110,67,.1) !important;
}

/* ── Popover ─────────────────────────────────────────────────── */
#pxb-pop {
  display: none;
  position: absolute;
  z-index: 999998;
  width: 340px;
  background: #fff;
  border: 1px solid #e0ddd4;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.08);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  flex-direction: column;
  overflow: hidden;
}
.pxb-pop-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 8px;
  background: #f8f7f3;
  border-bottom: 1px solid #f0ede6;
}
.pxb-pop-title { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #1d6e43; }
.pxb-pop-close { background: none; border: none; cursor: pointer; font-size: 14px; color: #aaa; padding: 0 2px; line-height: 1; }
.pxb-pop-close:hover { color: #555; }

.pxb-pop-orig  { padding: 10px 14px 6px; }
.pxb-pop-tr    { padding: 8px 14px 6px; }
.pxb-pop-orig-label, .pxb-pop-tr-label {
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #aaa; margin-bottom: 4px;
}
.pxb-pop-lang  { color: #1d6e43; font-weight: 600; }
.pxb-pop-orig-text {
  font-size: 12px; color: #777; line-height: 1.5;
  max-height: 48px; overflow: hidden; text-overflow: ellipsis;
}
.pxb-pop-ta {
  width: 100%; box-sizing: border-box;
  border: 1px solid #e0ddd4; border-radius: 3px;
  padding: 7px 9px; font-size: 13px; font-family: inherit;
  resize: vertical; min-height: 64px; line-height: 1.5;
  color: #1a1a18; background: #fefefe;
  transition: border-color .15s;
}
.pxb-pop-ta:focus { outline: none; border-color: #1d6e43; box-shadow: 0 0 0 2px rgba(29,110,67,.1); }

.pxb-pop-ft {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px 10px;
  border-top: 1px solid #f0ede6;
}
.pxb-pop-status { font-size: 12px; margin-left: auto; }
.pxb-st-ok  { color: #1d6e43; font-weight: 600; }
.pxb-st-err { color: #c0392b; }
.pxb-st-warn{ color: #b7860b; }

/* ── Image override ──────────────────────────────────────────── */
.pxb-edit-mode .pxb-img-wrap { position: relative; display: inline-block; }
.pxb-img-btn {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.7); color: #fff; border: none;
  font-size: 11px; padding: 4px 10px; border-radius: 3px;
  cursor: pointer; white-space: nowrap; opacity: 0;
  transition: opacity .15s;
}
.pxb-edit-mode .pxb-img-wrap:hover .pxb-img-btn { opacity: 1; }
.pxb-img-override { outline: 2px solid #6fcf97; }

/* ── Admin bar ───────────────────────────────────────────────── */
#wpadminbar .pxb-editing > a { color: #6fcf97 !important; }

/* ── DeepL ───────────────────────────────────────────────────── */
.pxb-pop-deepl {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 2px;
  border-top: 1px solid #f5f5f5;
  background: #fafdf8;
}
.pxb-btn-deepl {
  background: #0f2b45;
  color: #fff;
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: .03em;
  transition: background .15s;
  white-space: nowrap;
}
.pxb-btn-deepl:hover:not(:disabled) { background: #1a3f5c; }
.pxb-btn-deepl:disabled { opacity: .5; cursor: not-allowed; }
.pxb-deepl-status {
  font-size: 11px;
  color: #888;
}
.pxb-deepl-tr {
  border-bottom-color: #3498db !important;
}
.pxb-btn-deepl-page {
  background: #0f2b45;
  color: #fff;
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: .03em;
  transition: background .15s;
  white-space: nowrap;
}
.pxb-btn-deepl-page:hover { background: #1a3f5c; }
