
:root{--txp-primary:#007CFF;}
.button-primary{background:var(--txp-primary);border-color:var(--txp-primary);}
#txp-keywords-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    border: 1px solid #D9E0E7;
    background: #FFFFFF;
    min-height: 2em;
}
.txp-tag {
    display: inline-flex;
    align-items: center;
    background-color: #e0e0e0;
    color: #424242;
    padding: 0 12px;
    height: 32px;
    border-radius: 16px;
    font-size: 13px;
    margin: 4px 0 4px 4px;
}
.txp-tag .txp-remove-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 8px;
    border-radius: 50%;
    background-color: #135e96;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.txp-tag:hover {
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    transition: box-shadow 0.3s;
}

.txp-tag .txp-remove-tag:hover {
    background-color: rgba(0, 0, 0, 0.2);
    color: rgba(0, 0, 0, 0.87);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    transition: box-shadow 0.3s;
}

/* Material Design for AI Publisher admin pages */
#txp-settings-wrap, #txp-topic-section, #txp-brand-wrap, #txp-keywords-wrap, #txp-generate-wrap, #txp-promote-wrap {
    font-family: 'Roboto', Arial, sans-serif;
    letter-spacing: 0.5px;
    color: #212121;
}
#txp-settings-wrap h1, #txp-brand-wrap h1, #txp-keywords-wrap h1, #txp-generate-wrap h1, #txp-promote-wrap h1 {
    font-weight: 500;
    font-size: 24px;
    margin-bottom: 24px;
}
#txp-settings-wrap h2, #txp-brand-wrap h2, #txp-promote-wrap h2 {
    font-weight: 400;
    font-size: 20px;
    margin-bottom: 16px;
}
/* Card containers */
#txp-settings-wrap .form-table, #txp-topic-section,
#txp-brand-wrap .txp-tab-content,
#txp-keywords-wrap #txp-keywords-container,
#txp-generate-wrap > p,
#txp-generate-wrap #txp-post-result,
#txp-settings-wrap #txp-file-list li,
#txp-promote-list-section,
#txp-promote-detail {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    padding: 16px;
    margin-bottom: 24px;
}
/* Hide post result container until filled by JS */
#txp-generate-wrap #txp-post-result {
    display: none;
}
/* Form table adjustments */
#txp-settings-wrap .form-table th, #txp-settings-wrap .form-table td {
    padding: 30px 0 10px 30px;
    vertical-align: text-top;
}
#txp-brand-wrap table.form-table th,
#txp-brand-wrap table.form-table td {
    padding: 12px;
}
#txp-settings-wrap .form-table label {
    font-weight: 500;
}
/* Inputs and selects */
#txp-settings-wrap input[type="text"], #txp-settings-wrap input[type="password"], #txp-settings-wrap input[type="number"], #txp-settings-wrap select, #txp-settings-wrap textarea,
#txp-brand-wrap textarea, #txp-topic-section input[type="text"], #txp-topic-section select,
#txp-keywords-wrap input#txp-keyword-input, #txp-promote-wrap input[type="text"], #txp-promote-wrap select, #txp-promote-wrap textarea {
    font-size: 16px;
    border: 1px solid #cfd8dc;
    border-radius: 4px;
    background: #fafafa;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    padding: 5px 12px;
}
/* Focus state */
#txp-settings-wrap input:focus, #txp-settings-wrap select:focus, #txp-settings-wrap textarea:focus,
#txp-brand-wrap textarea:focus, #txp-topic-section input:focus,
#txp-keywords-wrap input#txp-keyword-input:focus, #txp-promote-wrap input:focus, #txp-promote-wrap select:focus, #txp-promote-wrap textarea:focus {
    background: #fff;
    border-color: var(--txp-primary);
    outline: none;
    box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}

textarea {
min-height: 140px;
}
#txp-settings-form select, #txp-topic-section select, #txp-promote-wrap select {
    background-image:
    linear-gradient(45deg, transparent 50%, gray 50%),
    linear-gradient(135deg, gray 50%, transparent 50%),
    linear-gradient(to right, #ccc, #ccc);
  background-position:
    calc(100% - 20px) calc(1em + 2px),
    calc(100% - 15px) calc(1em + 2px),
    calc(100% - 2.5em) 0.5em;
  background-size:
    5px 5px,
    5px 5px,
    1px 1.5em;
  background-repeat: no-repeat;
  padding: 5px 12px;
}

#txp-settings-form select:focus {
    background-image:
    linear-gradient(45deg, green 50%, transparent 50%),
    linear-gradient(135deg, transparent 50%, green 50%),
    linear-gradient(to right, #ccc, #ccc);
  background-position:
    calc(100% - 15px) 1em,
    calc(100% - 20px) 1em,
    calc(100% - 2.5em) 0.5em;
  background-size:
    5px 5px,
    5px 5px,
    1px 1.5em;
  background-repeat: no-repeat;
  border-color: green;
  outline: 0;
}
#txp-schedule-interval, #txp-promote-type {
    width: 170px;
}

#txp-default-post-status {
    width: 180px;
}
/* Buttons */
#txp-settings-wrap .button, #txp-brand-wrap .button, #txp-keywords-wrap .button, #txp-generate-wrap .button, #txp-promote-wrap .button {
    border-radius: 4px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    transition: background-color 0.3s, box-shadow 0.3s;
    text-transform: uppercase;
    padding: 10px 20px;
}
#txp-settings-wrap .button:hover, #txp-brand-wrap .button:hover, #txp-keywords-wrap .button:hover, #txp-generate-wrap .button:hover, #txp-promote-wrap .button:hover {
    box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}
/* Secondary button */
.button-secondary {
    background: #eceff1;
    border-color: #cfd8dc;
    color: #37474f;
}
.button-secondary:hover {
    background: #e0e0e0;
}
/* Nav tabs */
#txp-brand-wrap .nav-tab-wrapper {
    background: #f5f5f5;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
    padding: 0 8px;
    margin-bottom: 0;
}
#txp-brand-wrap .nav-tab {
    font-weight: 500;
    margin-right: 4px;
    border-radius: 4px 4px 0 0;
}
#txp-brand-wrap .nav-tab.nav-tab-active {
    background: #135e96;
    color: #fff;
    box-shadow: 0 -1px 1px rgba(0,0,0,0.1);
    border-bottom-color: transparent;
}
/* Notices */
.notice.notice-success, .notice.notice-error, .notice.notice-warning, .notice.notice-info {
    border-left: 4px solid;
    padding: 16px;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    margin-bottom: 24px;
}
.notice.notice-success {
    border-color: #4caf50;
}
.notice.notice-error {
    border-color: #f44336;
}
.notice.notice-warning {
    border-color: #ff9800;
}
.notice.notice-info {
    border-color: #2196f3;
}
/* File list items */
#txp-file-list li {
    display: inline-block;
    background: #fafafa;
    padding: 4px 8px;
    border: 1px solid #cfd8dc;
    border-radius: 16px;
    margin: 4px 4px 0 0;
}
/* Tags input override */
#txp-keywords-tags {
    background: #fafafa;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

#txp-add-keyword{
    margin-top: 6px;
    margin-left: 10px;
    padding: 0 10px !important;
}
/* Paragraph spacing */
#txp-settings-wrap p, #txp-brand-wrap p, #txp-keywords-wrap p, #txp-generate-wrap p, #txp-promote-wrap p {
    margin-bottom: 16px;
}

.aipub_help a {
    text-decoration: none;
    margin-left: 20px;
}

#txp-topic-mode {
    width: 170px;
}

/* Manual topic keyword dropdown */
#txp-keyword-select-wrap {
    position: relative;
}
#txp-keyword-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
#txp-keyword-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    z-index: 999;
    border: 1px solid #cfd8dc;
    background: #fff;
    max-height: 50vh;
    overflow-y: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
#txp-keyword-options .txp-option {
    padding: 4px 8px;
    cursor: pointer;
}
#txp-keyword-options .txp-option:hover {
    background: #f0f0f0;
}

/* Topic suggestions */
#txp-topic-suggestions .txp-suggest-item {
    display: block;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #cfd8dc;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    cursor: pointer;
}
#txp-topic-suggestions .txp-suggest-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
#txp-topic-suggestions .txp-suggest-item input[type="radio"] {
    margin-right: 12px;
    accent-color: var(--txp-primary);
    vertical-align: middle;
}
#txp-topic-suggestions .txp-topic-title {
    font-weight: 500;
}
#txp-topic-suggestions .txp-topic-kws {
    color: #757575;
    margin-left: 28px;
}

#txp-topic-section {
    padding: 40px 0 40px 40px;
}
#txp-promote-list li {
    padding: 8px;
    border-bottom: 1px solid #cfd8dc;
    cursor: pointer;
}
#txp-promote-list li:hover {
    background: #f5f5f5;
}
#txp-promote-list li a {
    text-decoration: none;
    color: var(--txp-primary);
    display: block;
    padding: 4px 0;
}
#txp-promote-list li a:hover {
    text-decoration: underline;
}
#txp-promote-back {
    margin-bottom: 20px;
}
#txp-promote-network {
    width: 220px;
    margin-right: 10px;
}
#txp-promote-text {
    width: 100%;
    min-height: 120px;
}
#txp-promote-pagination {
    margin-top: 20px;
}

.txp-required {
    color: #f44336;
    margin-left: 4px;
}

.txp-input-error {
    border-color: #f44336 !important;
}

#txp-promote-list {
    width: 40%;
}

#txp-promote-text {
    width: 40%;
    height: 400px;
}

#txp-promote-status {
    width: 37.8%;
}
.txp-post-spinner {
float: left;
margin-top: 15px;
margin-left: 10px;
}
