Files
wp-agentic-writer/assets/css/admin.css
2026-01-28 00:26:00 +07:00

964 lines
18 KiB
CSS

/**
* WP Agentic Writer - Admin Settings Styles
*
* @package WP_Agentic_Writer
*/
/* ===========================
BASE STYLES
=========================== */
.wpaw-settings-wrap {
max-width: 1200px;
margin: 20px auto;
padding: 0 20px;
}
.wpaw-settings-header {
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 30px;
padding-bottom: 20px;
border-bottom: 1px solid #e0e0e0;
}
.wpaw-settings-logo {
width: 48px;
height: 48px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 24px;
}
.wpaw-settings-title {
margin: 0;
font-size: 28px;
font-weight: 600;
color: #1d2327;
}
.wpaw-settings-subtitle {
margin: 4px 0 0;
color: #646970;
font-size: 14px;
}
/* ===========================
NAVIGATION TABS
=========================== */
.wpaw-settings-nav {
display: flex;
gap: 4px;
margin-bottom: 24px;
border-bottom: 1px solid #e0e0e0;
padding-bottom: 0;
}
.wpaw-settings-nav-btn {
padding: 12px 20px;
background: transparent;
border: none;
border-bottom: 3px solid transparent;
cursor: pointer;
font-size: 14px;
font-weight: 500;
color: #646970;
transition: all 0.2s ease;
margin-bottom: -1px;
}
.wpaw-settings-nav-btn:hover {
color: #2271b1;
}
.wpaw-settings-nav-btn.active {
color: #2271b1;
border-bottom-color: #2271b1;
}
.wpaw-settings-nav-btn .dashicons {
margin-right: 6px;
font-size: 16px;
vertical-align: middle;
}
/* ===========================
CARD SECTIONS
=========================== */
.wpaw-settings-section {
background: #fff;
border: 1px solid #e0e0e0;
border-radius: 8px;
margin-bottom: 24px;
overflow: hidden;
}
.wpaw-section-header {
display: flex;
align-items: center;
gap: 12px;
padding: 16px 20px;
background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
border-bottom: 1px solid #e0e0e0;
}
.wpaw-section-icon {
width: 36px;
height: 36px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 18px;
}
.wpaw-section-title {
margin: 0;
font-size: 16px;
font-weight: 600;
color: #1d2327;
}
.wpaw-section-desc {
margin: 2px 0 0;
font-size: 13px;
color: #646970;
}
.wpaw-section-body {
padding: 20px;
}
/* ===========================
PRESET CARDS (AI Models)
=========================== */
.wpaw-preset-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 16px;
margin-bottom: 24px;
}
.wpaw-preset-card {
border: 2px solid #e0e0e0;
border-radius: 8px;
padding: 16px;
cursor: pointer;
transition: all 0.2s ease;
position: relative;
}
.wpaw-preset-card:hover {
border-color: #2271b1;
box-shadow: 0 2px 8px rgba(34, 113, 177, 0.15);
}
.wpaw-preset-card.selected {
border-color: #2271b1;
background: rgba(34, 113, 177, 0.05);
}
.wpaw-preset-card.selected::after {
content: '✓';
position: absolute;
top: 8px;
right: 8px;
width: 24px;
height: 24px;
background: #2271b1;
color: #fff;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
}
.wpaw-preset-name {
font-size: 16px;
font-weight: 600;
color: #1d2327;
margin-bottom: 4px;
}
.wpaw-preset-cost {
font-size: 13px;
color: #646970;
margin-bottom: 12px;
}
.wpaw-preset-models {
font-size: 12px;
color: #8c8f94;
line-height: 1.6;
}
.wpaw-preset-badge {
display: inline-block;
padding: 2px 8px;
background: #f0f6fc;
color: #2271b1;
border-radius: 4px;
font-size: 11px;
font-weight: 500;
margin-left: 8px;
}
.wpaw-preset-badge.recommended {
background: #d4edda;
color: #155724;
}
/* ===========================
FORM FIELDS
=========================== */
.wpaw-field-row {
display: flex;
align-items: flex-start;
gap: 20px;
padding: 16px 0;
border-bottom: 1px solid #f0f0f0;
}
.wpaw-field-row:last-child {
border-bottom: none;
padding-bottom: 0;
}
.wpaw-field-label {
flex: 0 0 200px;
font-weight: 500;
color: #1d2327;
padding-top: 8px;
}
.wpaw-field-label small {
display: block;
font-weight: 400;
color: #646970;
font-size: 12px;
margin-top: 4px;
}
.wpaw-field-input {
flex: 1;
}
.wpaw-field-input input[type="text"],
.wpaw-field-input input[type="password"],
.wpaw-field-input input[type="number"],
.wpaw-field-input select {
width: 100%;
max-width: 400px;
padding: 8px 12px;
border: 1px solid #d0d5dd;
border-radius: 6px;
font-size: 14px;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.wpaw-field-input input:focus,
.wpaw-field-input select:focus {
border-color: #2271b1;
box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
outline: none;
}
.wpaw-field-input .description {
margin-top: 8px;
color: #646970;
font-size: 13px;
}
.wpaw-field-input .description a {
color: #2271b1;
text-decoration: none;
}
.wpaw-field-input .description a:hover {
text-decoration: underline;
}
/* ===========================
TOGGLE SWITCHES
=========================== */
.wpaw-toggle {
display: flex;
align-items: center;
gap: 12px;
}
.wpaw-toggle-switch {
position: relative;
width: 44px;
height: 24px;
background: #c3c4c7;
border-radius: 12px;
cursor: pointer;
transition: background 0.2s ease;
}
.wpaw-toggle-switch::after {
content: '';
position: absolute;
top: 2px;
left: 2px;
width: 20px;
height: 20px;
background: #fff;
border-radius: 50%;
transition: transform 0.2s ease;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.wpaw-toggle input {
display: none;
}
.wpaw-toggle input:checked + .wpaw-toggle-switch {
background: #2271b1;
}
.wpaw-toggle input:checked + .wpaw-toggle-switch::after {
transform: translateX(20px);
}
.wpaw-toggle-label {
font-size: 14px;
color: #1d2327;
}
/* ===========================
BUDGET DISPLAY
=========================== */
.wpaw-budget-display {
display: flex;
align-items: center;
gap: 20px;
padding: 16px;
background: #f8f9fa;
border-radius: 8px;
margin-bottom: 16px;
}
.wpaw-budget-stat {
text-align: center;
}
.wpaw-budget-stat-value {
font-size: 24px;
font-weight: 600;
color: #1d2327;
}
.wpaw-budget-stat-label {
font-size: 12px;
color: #646970;
margin-top: 4px;
}
.wpaw-budget-bar-wrapper {
flex: 1;
}
.wpaw-budget-bar-label {
display: flex;
justify-content: space-between;
font-size: 12px;
color: #646970;
margin-bottom: 6px;
}
.wpaw-budget-bar-track {
height: 8px;
background: #e0e0e0;
border-radius: 4px;
overflow: hidden;
}
.wpaw-budget-bar-fill {
height: 100%;
background: linear-gradient(90deg, #4caf50, #66bb6a);
border-radius: 4px;
transition: width 0.5s ease;
}
.wpaw-budget-bar-fill.warning {
background: linear-gradient(90deg, #ff9800, #ffa726);
}
.wpaw-budget-bar-fill.danger {
background: linear-gradient(90deg, #f44336, #ef5350);
}
/* ===========================
SUBMIT BUTTON
=========================== */
.wpaw-submit-section {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px;
background: #f8f9fa;
border-radius: 8px;
margin-top: 24px;
}
.wpaw-submit-section .button-primary {
padding: 10px 24px;
font-size: 14px;
height: auto;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
border-radius: 6px;
cursor: pointer;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wpaw-submit-section .button-primary:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
.wpaw-submit-info {
color: #646970;
font-size: 13px;
}
/* ===========================
ALERTS & NOTICES
=========================== */
.wpaw-notice {
padding: 12px 16px;
border-radius: 6px;
margin-bottom: 16px;
display: flex;
align-items: center;
gap: 12px;
}
.wpaw-notice-info {
background: #f0f6fc;
border: 1px solid #c5d9ed;
color: #2271b1;
}
.wpaw-notice-warning {
background: #fcf9e8;
border: 1px solid #f0c33c;
color: #826200;
}
.wpaw-notice-success {
background: #edfaef;
border: 1px solid #46b450;
color: #2a6f31;
}
.wpaw-notice-error {
background: #fcf0f1;
border: 1px solid #d63638;
color: #8a1f1f;
}
/* ===========================
COST ESTIMATE BOX
=========================== */
.wpaw-cost-estimate-box {
margin-top: 20px;
padding: 16px 20px;
background: linear-gradient(135deg, #f0f6fc 0%, #e8f4fd 100%);
border: 1px solid #c5d9ed;
border-radius: 8px;
text-align: center;
}
.wpaw-cost-estimate-label {
font-size: 13px;
color: #646970;
margin-bottom: 4px;
}
.wpaw-cost-estimate-value {
font-size: 24px;
font-weight: 700;
color: #2271b1;
}
.wpaw-cost-estimate-note {
margin: 8px 0 0;
font-size: 12px;
color: #8c8f94;
}
/* ===========================
TAB CONTENT
=========================== */
.wpaw-tab-content {
display: none;
}
.wpaw-tab-content.active {
display: block;
}
/* ===========================
GUIDE TABLES
=========================== */
.wpaw-guide-table {
width: 100%;
border-collapse: collapse;
font-size: 13px;
}
.wpaw-guide-table th,
.wpaw-guide-table td {
padding: 12px 16px;
text-align: left;
border-bottom: 1px solid #e0e0e0;
}
.wpaw-guide-table th {
background: #f8f9fa;
font-weight: 600;
color: #1d2327;
}
.wpaw-guide-table tbody tr:hover {
background: #f8f9fa;
}
.wpaw-guide-row-highlight {
background: #f0f6fc !important;
}
.wpaw-guide-row-highlight:hover {
background: #e5f0fa !important;
}
/* Model Badges */
.wpaw-model-badge {
display: inline-block;
padding: 4px 10px;
border-radius: 12px;
font-size: 11px;
font-weight: 500;
white-space: nowrap;
}
.wpaw-model-badge.planning {
background: #e8f4fd;
color: #0073aa;
}
.wpaw-model-badge.execution {
background: #fef3e8;
color: #b54708;
}
.wpaw-model-badge.chat {
background: #e8fdf0;
color: #067647;
}
.wpaw-model-badge.search {
background: #f3e8fd;
color: #6941c6;
}
.wpaw-model-badge.image {
background: #fde8f0;
color: #c01574;
}
/* ===========================
COST EXAMPLES
=========================== */
.wpaw-cost-examples {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 16px;
}
.wpaw-cost-example {
background: #f8f9fa;
border: 1px solid #e0e0e0;
border-radius: 8px;
padding: 16px;
}
.wpaw-cost-example-title {
font-weight: 600;
color: #1d2327;
margin-bottom: 12px;
font-size: 14px;
}
.wpaw-cost-example-breakdown {
display: flex;
flex-direction: column;
gap: 6px;
font-size: 13px;
color: #646970;
margin-bottom: 12px;
}
.wpaw-cost-example-total {
font-size: 14px;
color: #1d2327;
padding-top: 12px;
border-top: 1px solid #e0e0e0;
}
.wpaw-cost-example-total strong {
color: #2271b1;
}
/* ===========================
SELECT2 CUSTOMIZATION
=========================== */
.wpaw-settings-section .select2-container {
width: 100% !important;
}
.wpaw-settings-section .select2-container--default .select2-selection--single {
height: 38px;
border: 1px solid #8c8f94;
border-radius: 4px;
}
.wpaw-settings-section .select2-container--default .select2-selection--single .select2-selection__rendered {
line-height: 36px;
padding-left: 12px;
}
.wpaw-settings-section .select2-container--default .select2-selection--single .select2-selection__arrow {
height: 36px;
}
.select2-dropdown {
border: 1px solid #8c8f94;
border-radius: 4px;
}
.select2-search--dropdown .select2-search__field {
border: 1px solid #8c8f94;
border-radius: 4px;
padding: 8px 12px;
}
.select2-results__option--highlighted[aria-selected] {
background-color: #2271b1 !important;
}
span.select2-search.select2-search--inline textarea {
display: none;
}
ul.select2-results__options li {
margin-bottom: 0px;
}
.select2-results__option {
padding: 8px 12px;
}
.select2-results__option.select2-results__option--selectable.select2-results__option--selected{
display: flex;
justify-content: space-between;
}
.select2-results__option.select2-results__option--selectable.select2-results__option--selected:hover > span{
color: white!important;
}
.select2-results__option.select2-results__option--selectable.select2-results__option--selected::after {
content: 'SELECTED';
font-size: smaller;
font-family: ui-monospace, monospace;
color: #868686;
}
.select2-results__option.select2-results__option--selectable.select2-results__option--selected:hover::after {
color: #d6d6d6!important;
}
/* ===========================
RESPONSIVE
=========================== */
@media (max-width: 782px) {
.wpaw-preset-grid {
grid-template-columns: 1fr;
}
.wpaw-field-row {
flex-direction: column;
gap: 8px;
}
.wpaw-field-label {
flex: none;
padding-top: 0;
}
.wpaw-settings-nav {
flex-wrap: wrap;
}
}
/* ===========================
LANGUAGE PREFERENCES
=========================== */
.wpaw-language-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 12px;
margin-bottom: 12px;
}
.wpaw-language-checkbox {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 12px;
border: 1px solid #dcdcde;
border-radius: 4px;
cursor: pointer;
transition: all 0.2s ease;
background: #fff;
}
.wpaw-language-checkbox:hover {
border-color: #2271b1;
background: #f6f7f7;
}
.wpaw-language-checkbox input[type="checkbox"] {
margin: 0;
cursor: pointer;
}
.wpaw-language-checkbox input[type="checkbox"]:checked + span {
font-weight: 500;
color: #2271b1;
}
.wpaw-custom-language-item {
display: flex;
gap: 8px;
margin-bottom: 8px;
}
.wpaw-custom-language-item input[type="text"] {
flex: 1;
padding: 8px 12px;
border: 1px solid #dcdcde;
border-radius: 4px;
font-size: 14px;
}
.wpaw-custom-language-item .wpaw-remove-language {
padding: 8px 12px;
background: #dc3232;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background 0.2s ease;
}
.wpaw-custom-language-item .wpaw-remove-language:hover {
background: #a00;
}
#wpaw-add-custom-language {
margin-top: 8px;
}
/* ===========================
COST SHORTCUTS
=========================== */
.wpaw-cost-shortcuts {
margin-top: 16px;
padding-top: 16px;
border-top: 1px solid #e0e0e0;
text-align: center;
}
.wpaw-cost-shortcut-link {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 8px 16px;
background: #f0f6fc;
border: 1px solid #0066cc;
border-radius: 6px;
color: #0066cc;
text-decoration: none;
font-weight: 500;
transition: all 0.2s;
}
.wpaw-cost-shortcut-link:hover {
background: #0066cc;
color: #fff;
transform: translateY(-1px);
}
.wpaw-cost-shortcut-link .dashicons {
font-size: 18px;
width: 18px;
height: 18px;
}
/* ===========================
COST STATS GRID
=========================== */
.wpaw-cost-stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 16px;
margin-bottom: 24px;
}
.wpaw-cost-stat-card {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 12px;
padding: 20px;
text-align: center;
color: #fff;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.wpaw-cost-stat-icon {
font-size: 32px;
margin-bottom: 8px;
}
.wpaw-cost-stat-value {
font-size: 28px;
font-weight: 700;
margin-bottom: 4px;
}
.wpaw-cost-stat-label {
font-size: 13px;
opacity: 0.9;
}
/* ===========================
COST FILTERS
=========================== */
.wpaw-cost-filters {
background: #f9f9f9;
padding: 20px;
border-radius: 8px;
}
.wpaw-filter-row {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 16px;
align-items: end;
}
.wpaw-filter-field {
display: flex;
flex-direction: column;
gap: 6px;
}
.wpaw-filter-field label {
font-size: 13px;
font-weight: 500;
color: #1d2327;
}
.wpaw-filter-field input,
.wpaw-filter-field select {
padding: 6px 10px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
}
.wpaw-filter-actions {
display: flex;
gap: 8px;
align-items: center;
}
/* ===========================
COST LOG TABLE
=========================== */
.wpaw-cost-log-table-wrapper {
overflow-x: auto;
margin-top: 16px;
}
.wpaw-cost-log-table {
width: 100%;
border-collapse: collapse;
background: #fff;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.wpaw-cost-log-table thead {
background: #f9f9f9;
border-bottom: 2px solid #e0e0e0;
}
.wpaw-cost-log-table th {
padding: 12px 16px;
text-align: left;
font-weight: 600;
font-size: 13px;
color: #1d2327;
white-space: nowrap;
}
.wpaw-cost-log-table td {
padding: 12px 16px;
border-bottom: 1px solid #f0f0f0;
font-size: 13px;
color: #1d2327;
}
.wpaw-cost-log-table tbody tr:hover {
background: #f9f9f9;
}
.wpaw-cost-log-table code {
background: #f0f0f0;
padding: 2px 6px;
border-radius: 3px;
font-size: 12px;
font-family: 'Courier New', monospace;
}
.wpaw-removed-post {
color: #999;
font-style: italic;
}
/* ===========================
PAGINATION
=========================== */
.wpaw-pagination {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
margin-top: 24px;
padding-top: 24px;
border-top: 1px solid #e0e0e0;
}
.wpaw-pagination-info {
padding: 6px 12px;
background: #f0f0f0;
border-radius: 4px;
font-size: 13px;
font-weight: 500;
}