/* Content Translation — admin styles */

.ct-admin { max-width: 1200px; }

.ct-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.ct-header h2 { margin: 0 0 .25rem; }
.ct-header-actions { display: flex; gap: .5rem; }

.ct-flash {
  padding: .65rem .9rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  background: rgba(46, 204, 113, .12);
  border: 1px solid rgba(46, 204, 113, .35);
}
.ct-flash-error {
  background: rgba(231, 76, 60, .12);
  border-color: rgba(231, 76, 60, .35);
}
.ct-flash-warning {
  background: rgba(241, 196, 15, .12);
  border-color: rgba(241, 196, 15, .35);
}

.ct-toolbar {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.ct-toolbar input[type="search"] {
  flex: 1;
  min-width: 200px;
  padding: .45rem .7rem;
  border: 1px solid rgba(127,127,127,.35);
  border-radius: 6px;
  background: transparent;
  color: inherit;
}
.ct-toolbar select {
  padding: .45rem .7rem;
  border: 1px solid rgba(127,127,127,.35);
  border-radius: 6px;
  background: transparent;
  color: inherit;
}

.ct-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--adam-card, transparent);
  border-radius: 8px;
  overflow: hidden;
}
.ct-table th, .ct-table td {
  text-align: left;
  padding: .6rem .8rem;
  border-bottom: 1px solid rgba(127,127,127,.18);
  vertical-align: middle;
}
.ct-table th {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  opacity: .75;
}
.ct-translations-col { width: 220px; }
.ct-translation-select {
  width: 100%;
  min-width: 180px;
  padding: .4rem .6rem;
  border: 1px solid rgba(127,127,127,.35);
  border-radius: 6px;
  background: var(--adam-card, transparent);
  color: inherit;
  font: inherit;
}

.ct-status {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 20px;
  font-size: .82rem;
  text-decoration: none;
}
.ct-status-done {
  background: rgba(46, 204, 113, .15);
  border: 1px solid rgba(46, 204, 113, .4);
  color: inherit;
}
.ct-status-empty {
  background: rgba(127,127,127,.1);
  border: 1px dashed rgba(127,127,127,.45);
  color: inherit;
  opacity: .8;
}

.ct-pagination { margin-top: 1rem; display: flex; gap: .4rem; }
.ct-pagination a, .ct-page-current {
  padding: .3rem .7rem;
  border-radius: 6px;
  border: 1px solid rgba(127,127,127,.3);
  text-decoration: none;
  color: inherit;
}
.ct-page-current {
  background: rgba(127,127,127,.2);
  font-weight: 600;
}

/* Editor */
.ct-editor-stack {
  display: grid;
  gap: 1.25rem;
}

.ct-panel {
  background: var(--adam-card, transparent);
  border: 1px solid rgba(127,127,127,.18);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
}
.ct-panel h3 { margin-top: 0; }
.ct-translation-panel { min-width: 0; }
.ct-source-panel { min-width: 0; }
.ct-source-panel summary {
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
}
.ct-source-panel__body { margin-top: 1.1rem; }
.ct-editor-hint { margin: 0 0 .5rem; }
.ct-source-code {
  box-sizing: border-box;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.ct-translation-panel .CodeMirror {
  border: 1px solid rgba(127,127,127,.35);
  border-radius: 6px;
  font-size: 13px;
}

.ct-field { margin-bottom: 1rem; }
.ct-field > label {
  display: block;
  font-weight: 600;
  font-size: .88rem;
  margin-bottom: .35rem;
}
.ct-field input[type="text"],
.ct-field textarea {
  width: 100%;
  padding: .5rem .7rem;
  border: 1px solid rgba(127,127,127,.35);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  box-sizing: border-box;
}

.ct-readonly {
  padding: .5rem .7rem;
  border: 1px solid rgba(127,127,127,.2);
  border-radius: 6px;
  background: rgba(127,127,127,.06);
  min-height: 1.4rem;
}
.ct-readonly-content {
  max-height: 420px;
  overflow: auto;
}
.ct-readonly-content img { max-width: 100%; }

.ct-check {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-right: 1rem;
  font-weight: 400 !important;
}

.ct-actions { display: flex; gap: .6rem; margin-top: 1.25rem; }

/* Editor panel on post/page edit screen */
.ct-edit-panel {
  margin-top: 1.25rem;
  background: var(--adam-card, transparent);
  border: 1px solid rgba(127,127,127,.18);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}
.ct-edit-panel h3 { margin: 0 0 .6rem; font-size: 1rem; }
.ct-edit-panel ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .6rem; flex-wrap: wrap; }

.ct-editor-translation-control {
  display: block;
  max-width: 440px;
  margin: 1rem 0;
  padding: .8rem .9rem .9rem;
  border: 1px solid rgba(127,127,127,.28);
  border-radius: 8px;
  background: color-mix(in srgb, var(--adam-card, #fff) 88%, transparent);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.ct-editor-translation-control > label {
  display: block;
  margin-bottom: .45rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .78;
}
.ct-editor-translation-control select {
  width: 100%;
  min-height: 2.5rem;
  padding: .45rem .7rem;
  border: 1px solid rgba(127,127,127,.45);
  border-radius: 6px;
  background: var(--adam-card, #fff);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.ct-editor-translation-control select:focus {
  outline: none;
  border-color: var(--adam-primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37,99,235,.16);
}

@media (max-width: 640px) {
  .ct-translations-col { width: auto; }
  .ct-table th:nth-child(3),
  .ct-table td:nth-child(3) { display: none; }
}

/* Frontend language switcher widget */
.widget-lang-switcher .ct-lang-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.widget-lang-switcher .ct-lang-list a {
  display: inline-block;
  padding: .25rem .7rem;
  border-radius: 20px;
  border: 1px solid rgba(127,127,127,.4);
  text-decoration: none;
  font-size: .85rem;
}
.widget-lang-switcher .ct-lang-list li.active a {
  font-weight: 700;
  border-style: solid;
  background: rgba(127,127,127,.15);
}

.widget-lang-switcher .ct-lang-select {
  padding: .35rem .6rem;
  border: 1px solid rgba(127,127,127,.4);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: .85rem;
}
