/* Article Schema Generator — tool-specific styles (loaded on this tool only). */

.art-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ti-border);
}

.art-save {
  margin: 0;
}

.art-jump {
  display: none;
  font-weight: var(--ti-fw-semi);
  text-decoration: none;
}

.art-import {
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: var(--ti-radius-lg);
  background: rgba(79, 70, 229, 0.04);
}

.art-import .ti-actions {
  margin: 12px 0;
}

.art-form__title {
  margin-bottom: 4px;
}

.art-form__intro {
  margin: 0 0 16px;
}

/* Sections */
.art-sec {
  margin-bottom: 12px;
  border: 1px solid var(--ti-border);
  border-radius: var(--ti-radius-lg);
  background: var(--ti-white);
}

.art-sec[hidden] {
  display: none;
}

.art-sec > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  border-radius: var(--ti-radius-lg);
}

.art-sec > summary::-webkit-details-marker {
  display: none;
}

.art-sec > summary::before {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--ti-primary);
  border-bottom: 2px solid var(--ti-primary);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.art-sec[open] > summary::before {
  transform: rotate(45deg);
}

.art-sec > summary:hover {
  background: var(--ti-bg);
}

.art-sec > summary:focus-visible {
  outline: none;
  box-shadow: var(--ti-focus);
}

.art-sec__title {
  flex: 1;
  margin: 0;
  font-size: 18px;
  font-weight: var(--ti-fw-bold);
  letter-spacing: -0.01em;
}

.art-sec__tag {
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.1);
  font-size: 16px;
  font-weight: var(--ti-fw-semi);
  color: #B91C1C;
}

.art-sec__tag--rec {
  background: var(--ti-primary-tint);
  color: var(--ti-primary);
}

.art-sec__tag--opt {
  background: var(--ti-bg);
  color: var(--ti-muted-color);
}

.art-sec__body {
  padding: 4px 18px 18px;
}

.art-textarea-sm {
  min-height: 96px;
}

.art-help-tight {
  margin: -6px 0 16px;
}

.art-help-top {
  margin: 0 0 14px;
}

.art-link-btn {
  display: inline-block;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--ti-font);
  font-size: 16px;
  font-weight: var(--ti-fw-semi);
  color: var(--ti-primary);
  cursor: pointer;
}

.art-link-btn:hover {
  text-decoration: underline;
}

.art-link-btn[hidden] {
  display: none;
}

/* Output */
.art-output {
  min-height: 220px;
  max-height: 56vh;
}

.art-out__actions {
  margin: 14px 0 20px;
}

.art-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.art-summary p {
  margin: 0;
  font-size: 16px;
}

.ti-issue--error { border-left: 4px solid #DC2626; }
.ti-issue--warn  { border-left: 4px solid #D97706; }
.ti-issue--ok    { border-left: 4px solid #16A34A; }
.ti-issue--info  { border-left: 4px solid var(--ti-primary); }

.art-issue-link {
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--ti-font);
  font-size: 16px;
  font-weight: var(--ti-fw-semi);
  color: var(--ti-text-color);
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--ti-border-strong);
  text-underline-offset: 3px;
  cursor: pointer;
}

.art-issue-link:hover {
  color: var(--ti-primary);
}

.art-note {
  margin-top: 14px;
}

@media (max-width: 980px) {
  .art-jump {
    display: inline-block;
  }
}

@media (max-width: 640px) {
  .art-output {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .art-sec__body {
    padding: 4px 14px 16px;
  }

  .art-sec > summary {
    padding: 14px;
  }
}

.art-empty {
  margin: 0;
  padding: 14px 16px;
  border: 1px dashed var(--ti-border-strong);
  border-radius: var(--ti-radius-md);
  color: var(--ti-muted-color);
}

/* Article-specific */
.art-ta-sm { min-height: 88px; }
.art-indent { margin-top: 8px; }
.art-help-top { margin: 0 0 14px; }
.art-list { display: grid; gap: 12px; margin-bottom: 12px; }
.art-item { padding: 14px 16px; border: 1px solid var(--ti-border); border-radius: var(--ti-radius-md); background: var(--ti-bg); }
.art-item__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.art-remove { margin: 0; color: #B91C1C; }
.art-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.art-out__actions { margin: 14px 0 20px; }

.art-dt {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 0 12px;
}

.art-imgs {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.art-imgs[hidden] { display: none; }

.art-img {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--ti-border);
  border-left: 4px solid var(--ti-border-strong);
  border-radius: var(--ti-radius-sm);
  background: var(--ti-white);
}

.art-img--ok { border-left-color: #16A34A; }
.art-img--bad { border-left-color: #DC2626; }
.art-img--bad .art-img__info { color: #991B1B; font-weight: var(--ti-fw-semi); }

.art-img__thumb {
  display: grid;
  place-items: center;
  width: 56px;
  height: 42px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--ti-bg);
}

.art-img__thumb img { width: 100%; height: 100%; object-fit: cover; }

.art-img__url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ti-muted-color);
}

.art-img__info { white-space: nowrap; }

@media (max-width: 560px) {
  .art-img { grid-template-columns: 56px minmax(0, 1fr); }
  .art-img__info { grid-column: 2; white-space: normal; }
  .art-dt { grid-template-columns: minmax(0, 1fr); }
}
