/* XML Formatter — DevStack Hub / Techoral theme */
.xml-tool-page {
  padding-top: 74px;
  min-height: 100vh;
  background: var(--light-color, #f8f9fa);
}

.xml-tool-hero {
  background: linear-gradient(135deg, var(--primary-dark, #1e40af) 0%, var(--primary-color, #2563eb) 55%, var(--accent-color, #0d9488) 100%);
  color: #fff;
  padding: 2.5rem 0 2rem;
}

.xml-tool-hero h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.xml-tool-hero .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.xml-tool-hero .breadcrumb-item.active,
.xml-tool-hero .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.65);
}

.xml-workspace {
  padding: 1.25rem 0 3rem;
}

.xml-toolbar {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.xml-toolbar .btn {
  border-radius: 50px;
  font-size: 0.8125rem;
  padding: 0.35rem 0.85rem;
}

.xml-options-panel {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.xml-format-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.06) 0%, rgba(13, 148, 136, 0.08) 50%, rgba(37, 99, 235, 0.06) 100%);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 0.5rem;
  position: sticky;
  top: 130px;
  z-index: 90;
  flex-wrap: wrap;
}

.xml-format-btn {
  min-width: 9rem;
  font-weight: 600;
  border-radius: 50px;
  padding: 0.65rem 1.75rem;
  box-shadow: 0 0.25rem 0.75rem rgba(37, 99, 235, 0.35);
}

.xml-panel-card {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.xml-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--light-color, #f8f9fa);
  border-bottom: 1px solid var(--gray-light, #e9ecef);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.xml-panel-header h2 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}

.xml-panel-status {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
}

.xml-panel-status.valid {
  background: rgba(25, 135, 84, 0.12);
  color: var(--success-color, #198754);
}

.xml-panel-status.invalid {
  background: rgba(220, 53, 69, 0.12);
  color: var(--danger-color, #dc3545);
}

.xml-panel-status.empty {
  background: rgba(108, 117, 125, 0.12);
  color: var(--gray-color, #6c757d);
}

.xml-editor-wrap {
  display: flex;
  min-height: 420px;
  max-height: 65vh;
}

.xml-line-numbers {
  padding: 0.75rem 0.35rem;
  font-family: Consolas, Monaco, 'Courier New', monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--gray-color, #6c757d);
  background: #f1f3f5;
  text-align: right;
  user-select: none;
  overflow: auto;
  min-width: 2.75rem;
  border-right: 1px solid var(--gray-light, #e9ecef);
  scrollbar-width: none;
}

.xml-line-numbers::-webkit-scrollbar {
  display: none;
}

.xml-editor {
  flex: 1;
  border: none;
  resize: vertical;
  padding: 0.75rem;
  font-family: Consolas, Monaco, 'Courier New', monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
  outline: none;
  min-height: 420px;
  max-height: 65vh;
  tab-size: 2;
  white-space: pre;
  word-wrap: normal;
}

.xml-panel-footer {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--gray-color, #6c757d);
  border-top: 1px solid var(--gray-light, #e9ecef);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.xml-tree-card {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
  margin-top: 1rem;
  overflow: hidden;
}

.xml-tree-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-light, #e9ecef);
  font-weight: 600;
  font-size: 0.9rem;
}

.xml-tree-body {
  padding: 0.75rem 1rem;
  max-height: 280px;
  overflow: auto;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.8rem;
}

.xml-tree-body ul {
  list-style: none;
  padding-left: 1.25rem;
  margin: 0;
}

.xml-tree-body .tree-tag {
  color: var(--primary-color, #2563eb);
  font-weight: 600;
}

.xml-tree-body .tree-attr {
  color: #e67700;
}

.xml-tree-body .tree-val {
  color: #2b8a3e;
}

.xml-error-box {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.25);
  color: #842029;
  font-size: 0.875rem;
  display: none;
}

.xml-error-box.show {
  display: block;
}

@media (max-width: 575.98px) {
  .xml-format-bar {
    top: 108px;
  }
  .xml-format-btn {
    width: 100%;
    max-width: 280px;
  }
}
