.bbcode-tool {
  max-width: 1100px;
}

.editor-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid #dfe4ec;
}

.editor-tab {
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.editor-tab:hover {
  color: #2563eb;
  background: #f8fafc;
}

.editor-tab[aria-selected="true"] {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.editor-tab:focus-visible,
.html-actions .btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}

.editor-panel,
.html-panel {
  width: 100%;
  min-width: 0;
}

.editor-panel > textarea {
  min-height: 360px;
}

.sceditor-container {
  width: 100% !important;
  max-width: 100%;
  border-color: #d7dce4 !important;
  border-radius: 8px;
  overflow: hidden;
}

.sceditor-container iframe,
.sceditor-container textarea {
  width: 100% !important;
  min-height: 300px;
}

.sceditor-toolbar {
  white-space: normal !important;
}

.sceditor-group {
  margin-bottom: 3px !important;
}

.html-output {
  min-height: 360px;
  margin-top: 8px;
  background: #f8fafc;
  color: #1e293b;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  line-height: 1.55;
  tab-size: 2;
}

.html-output[readonly] {
  cursor: text;
}

.html-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.html-actions .btn {
  min-height: 44px;
}

.editor-status {
  min-height: 24px;
  margin: 12px 0 0;
  font-size: 14px;
}

.editor-status[data-type="success"] {
  color: #047857;
}

.editor-status[data-type="error"] {
  color: #b91c1c;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 768px) {
  .bbcode-tool {
    margin: 20px auto;
    padding: 12px;
  }

  .bbcode-tool .card {
    padding: 18px 14px;
  }

  .editor-tabs {
    gap: 2px;
  }

  .editor-tab {
    flex: 1 1 auto;
    padding: 10px 12px;
  }

  .sceditor-container iframe,
  .sceditor-container textarea,
  .html-output {
    min-height: 280px;
  }
}
