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

.org-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);
}

.org-save {
  margin: 0;
}

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

.org-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);
}

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

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

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

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

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

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

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

.org-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;
}

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

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

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

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

.org-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;
}

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

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

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

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

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

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

.org-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;
}

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

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

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

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

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

.org-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); }

.org-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;
}

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

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

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

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

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

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

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

/* Organization-specific */
.org-ta-sm { min-height: 88px; }
.org-ta-md { min-height: 140px; }

.org-indent { margin: 8px 0 4px; }

.org-website-check { margin-top: 6px; }

.org-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: -4px 0 16px;
  padding: 12px;
  border: 1px solid var(--ti-border);
  border-radius: var(--ti-radius-md);
  background: var(--ti-bg);
}

.org-logo[hidden] { display: none; }

.org-logo__box {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 112px;
  height: 112px;
  overflow: hidden;
  border: 1px solid var(--ti-border-strong);
  border-radius: var(--ti-radius-sm);
  background: #fff;
}

.org-logo__box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.org-logo__box img:not([src]) { display: none; }

.org-logo__info { margin: 0; color: var(--ti-muted-color); }

.org-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.org-platforms[hidden] { display: none; }

.org-plat {
  margin: 0;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--ti-primary-tint);
  font-weight: var(--ti-fw-semi);
  color: var(--ti-primary);
}

.org-plat--bad { background: rgba(220, 38, 38, 0.1); color: #991B1B; }

.org-list { display: grid; gap: 12px; margin-bottom: 12px; }

.org-item {
  padding: 14px 16px;
  border: 1px solid var(--ti-border);
  border-radius: var(--ti-radius-md);
  background: var(--ti-bg);
}

.org-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.org-remove { margin: 0; color: #B91C1C; }

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

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

.org-place { margin: 0 0 16px; }
