/* BibleAsk Authors studio — matches community / bibleask.org profile chrome */

.ba-author-studio {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ba-author-studio__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  padding: 22px 24px;
}

.ba-author-studio__title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.02em;
}

.ba-author-studio__lede {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.5;
  max-width: 46ch;
}

.ba-author-studio__write {
  flex-shrink: 0;
  padding: 12px 20px;
  white-space: nowrap;
}

.ba-author-studio__write,
.ba-author-studio__write:hover,
.ba-author-studio__write:focus {
  color: #fff;
  text-decoration: none;
}

.ba-author-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ba-author-subnav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.ba-author-subnav a:hover {
  color: #111;
  border-color: rgba(0, 0, 0, 0.16);
}

.ba-author-subnav a.is-active {
  background: #e8f6ec;
  border-color: #b8dfc4;
  color: #1f6b3a;
}

.ba-author-notice {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.ba-author-notice--success {
  background: #e8f6ec;
  color: #1f6b3a;
  border: 1px solid #b8dfc4;
}

.ba-author-notice--error {
  background: #fef3f2;
  color: #b42318;
  border: 1px solid #fecdca;
}

.ba-author-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ba-author-metric {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  padding: 18px 18px 16px;
}

.ba-author-metric__value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #111;
  font-variant-numeric: tabular-nums;
}

.ba-author-metric__label {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.01em;
}

.ba-author-studio__meta {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.ba-author-panel {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  padding: 8px 8px 8px;
  overflow: hidden;
}

.ba-author-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 8px;
}

.ba-author-panel__head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.ba-author-panel__head a {
  color: #1664c0;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.ba-author-panel__head a:hover {
  text-decoration: underline;
}

.ba-author-empty {
  padding: 36px 24px;
  text-align: center;
  color: #64748b;
}

.ba-author-empty p {
  margin: 0 0 16px;
}

.ba-author-empty .bibleask-btn {
  color: #fff;
  text-decoration: none;
}

.ba-author-article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ba-author-article {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.ba-author-article-list > .ba-author-article:first-child {
  border-top: 0;
}

.ba-author-article__thumb {
  display: block;
  width: 96px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: #eef1f4;
}

.ba-author-article__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ba-author-article__title {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.ba-author-article__title a {
  color: #111;
  text-decoration: none;
}

.ba-author-article__title a:hover {
  color: #1664c0;
}

.ba-author-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
}

.ba-author-article__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: 13px;
  color: #475569;
}

.ba-author-article__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.ba-author-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ba-author-status--publish {
  background: #e8f6ec;
  color: #1f6b3a;
}

.ba-author-status--pending {
  background: #fff7ed;
  color: #c2410c;
}

.ba-author-status--draft,
.ba-author-status--private {
  background: #f1f5f9;
  color: #475569;
}

.ba-author-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ba-author-filters a {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.ba-author-filters a.is-active {
  background: #1664c0;
  border-color: #1664c0;
  color: #fff;
}

.ba-author-btn-ghost {
  background: #fff;
  color: #1664c0;
  border: 1px solid #c5d7ef;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.ba-author-btn-ghost:hover {
  background: #f4f8fd;
  color: #0f4c94;
}

.ba-author-link {
  color: #1664c0;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.ba-author-link:hover {
  text-decoration: underline;
}

.ba-author-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 16px;
}

.ba-author-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
}

.ba-author-editor__main,
.ba-author-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.ba-author-editor__main {
  padding: 20px 22px 24px;
}

.ba-author-editor__side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ba-author-card {
  padding: 16px 18px 18px;
}

.ba-author-card h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: #111;
}

.ba-author-field {
  margin-bottom: 16px;
}

.ba-author-field:last-child {
  margin-bottom: 0;
}

.ba-author-field label,
.ba-author-card label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.ba-author-editor input[type="text"],
.ba-author-editor textarea,
.ba-author-editor select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d8dde3;
  border-radius: 12px;
  font-size: 14px;
  background: #f9fafb;
  color: #111;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ba-author-editor #ba-author-title {
  font-size: 20px;
  font-weight: 700;
  padding: 14px 16px;
}

.ba-author-editor input[type="text"]:focus,
.ba-author-editor textarea:focus,
.ba-author-editor select:focus {
  outline: none;
  background: #fff;
  border-color: #1664c0;
}

.ba-author-help,
.ba-author-counter {
  margin: 8px 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

.ba-author-counter.is-over {
  color: #c2410c;
}

.ba-author-submit {
  display: block;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
  margin-top: 8px;
  color: #fff;
}

.ba-author-submit.ba-author-btn-ghost {
  color: #1664c0;
}

.ba-author-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
}

.ba-author-cats {
  max-height: 220px;
  overflow: auto;
}

.ba-author-thumb-preview {
  margin-bottom: 10px;
  border-radius: 12px;
  overflow: hidden;
  background: #eef1f4;
  aspect-ratio: 16 / 9;
}

.ba-author-thumb-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba-author-delete-link {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: #b42318;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.ba-author-delete-form {
  display: none;
}

.ba-author-file {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border: 1px dashed #c5d0dc;
  border-radius: 12px;
  background: #f9fafb;
  color: #1664c0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.ba-author-file input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.ba-author-file:hover {
  background: #f4f8fd;
  border-color: #1664c0;
}

.ba-author-quill-host {
  position: relative;
  display: inline-block;
  width: auto;
  height: auto;
  line-height: 0;
  vertical-align: middle;
  max-width: 100%;
}

.ba-author-quill {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28%;
  height: 28%;
  min-width: 16px;
  min-height: 16px;
  max-width: 32px;
  max-height: 32px;
  overflow: hidden;
  box-sizing: border-box;
  border-radius: 50%;
  background: #D99A2B;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 2px 10px rgba(217, 154, 43, 0.35);
  transform: translate(18%, -18%);
  pointer-events: none;
}

.ba-author-quill .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.bibleask-profile-avatar-wrap,
.bibleask-user-box__avatar-wrap {
  overflow: visible;
}

.ba-author-has-quill {
  position: relative;
}

.bibleask-profile-menu[data-ba-author]::before {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  z-index: 1003;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #D99A2B;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z'/%3E%3Cline x1='16' y1='8' x2='2' y2='22'/%3E%3Cline x1='17.5' y1='15' x2='9' y2='15'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px 11px;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 6px rgba(217, 154, 43, 0.35);
  box-sizing: border-box;
  pointer-events: none;
}

.ba-author-quill svg {
  width: 50% !important;
  height: 50% !important;
  max-width: 16px !important;
  max-height: 16px !important;
  min-width: 0 !important;
  flex-shrink: 0;
  display: block;
}

.bibleask-profile-avatar-wrap .ba-author-quill {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  max-width: 32px;
  max-height: 32px;
}

.bibleask-profile-avatar-wrap .ba-author-quill svg {
  width: 15px !important;
  height: 15px !important;
  max-width: 15px !important;
  max-height: 15px !important;
}

.ba-author-sidebar-btn,
.ba-author-sidebar-btn:visited {
  display: block;
  margin: 0 0 16px;
  background: #D99A2B;
  color: #fff;
  text-decoration: none;
}

.ba-author-sidebar-btn:hover,
.ba-author-sidebar-btn:focus {
  background: #C08624;
  color: #fff;
  text-decoration: none;
}

.ba-author-field--editor .wp-editor-wrap,
.ba-author-field--editor .mce-tinymce {
  border-radius: 12px;
  overflow: hidden;
}

.ba-author-field--editor .wp-editor-container {
  border-color: #d8dde3;
}

@media (max-width: 960px) {
  .ba-author-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .ba-author-editor {
    grid-template-columns: 1fr;
  }

  .ba-author-studio__header {
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .ba-author-article {
    grid-template-columns: 72px 1fr;
  }

  .ba-author-article__thumb {
    width: 72px;
    height: 56px;
  }

  .ba-author-article__actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .ba-author-metrics {
    grid-template-columns: 1fr;
  }
}
