@import url('admin/core.css');
@import url('admin/components.css');
@import url('admin/settings.css');
@import url('admin/jobs-monitor.css');
@import url('admin/writing-tools.css');
@import url('admin/tooltips.css');

.agenticwp-actions-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.agenticwp-actions-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.agenticwp-manage-groups .dashicons {
    font-size: 16px;
    height: 16px;
    width: 16px;
    margin-right: 4px;
}

.agenticwp-modal-wide {
    max-width: 700px;
}

.agenticwp-groups-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.agenticwp-add-group-form {
    background: var(--agenticwp-background-secondary);
    border: 1px solid var(--agenticwp-border);
    border-radius: var(--agenticwp-border-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.agenticwp-add-group-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.agenticwp-add-group-input-wrapper .agenticwp-group-name-input {
    flex: 1;
}

.agenticwp-add-group-buttons {
    display: flex;
    gap: 0.5rem;
}

.agenticwp-group-error {
    display: block;
    color: var(--agenticwp-error);
    font-size: 13px;
    margin-top: 0.5rem;
}

.agenticwp-groups-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--agenticwp-border);
    border-radius: var(--agenticwp-border-radius);
}

.agenticwp-groups-table thead {
    background: var(--agenticwp-background-secondary);
}

.agenticwp-groups-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--agenticwp-text-primary);
    border-bottom: 2px solid var(--agenticwp-border);
}

.agenticwp-groups-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--agenticwp-border);
}

.agenticwp-groups-table tbody tr:last-child td {
    border-bottom: none;
}

.agenticwp-groups-table tbody tr:hover {
    background: var(--agenticwp-background-hover);
}

.agenticwp-group-name-cell {
    width: 50%;
}

.agenticwp-group-name-input {
    width: 100%;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--agenticwp-border);
    border-radius: var(--agenticwp-border-radius-sm);
    font-size: 14px;
}

.agenticwp-group-name-input:focus {
    outline: none;
    border-color: var(--agenticwp-accent);
    box-shadow: 0 0 0 1px var(--agenticwp-accent);
}

.agenticwp-group-count-cell {
    width: 25%;
    text-align: center;
    color: var(--agenticwp-text-secondary);
}

.agenticwp-group-actions-cell {
    width: 25%;
    text-align: right;
}

.agenticwp-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.agenticwp-category-card {
    background: var(--agenticwp-background-primary);
    border: 1px solid var(--agenticwp-border);
    border-radius: var(--agenticwp-border-radius);
    overflow: hidden;
    transition: all 0.2s ease;
}

.agenticwp-category-card:hover {
    border-color: var(--agenticwp-accent-light);
    box-shadow: 0 4px 12px rgba(var(--agenticwp-accent-rgb), 0.1);
}

.agenticwp-category-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 1rem 0.5rem;
}

.agenticwp-category-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.agenticwp-category-badge {
    background: var(--agenticwp-accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: var(--agenticwp-border-radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.agenticwp-category-badge-default {
    background: var(--agenticwp-text-secondary);
}

.agenticwp-category-delete {
    background: transparent;
    border: none;
    padding: 0.25rem;
    color: var(--agenticwp-text-secondary);
    cursor: pointer;
    border-radius: var(--agenticwp-border-radius-sm);
    transition: all 0.2s ease;
}

.agenticwp-category-delete:hover {
    color: var(--agenticwp-error);
    background: rgba(var(--agenticwp-error-rgb), 0.1);
}

.agenticwp-category-card-body {
    padding: 0.5rem 1rem 1rem;
}

.agenticwp-category-stats {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--agenticwp-border-light);
}

.agenticwp-category-count {
    font-size: 0.75rem;
    color: var(--agenticwp-text-secondary);
    font-weight: 500;
}

.agenticwp-new-category-field {
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        margin-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 100px;
        margin-bottom: 1rem;
    }
}

.agenticwp-category-filter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.agenticwp-category-filter label {
    font-weight: 500;
    color: var(--agenticwp-text-primary);
    margin: 0;
}

.agenticwp-category-filter select {
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--agenticwp-border);
    border-radius: var(--agenticwp-radius);
    background: var(--agenticwp-bg-white);
    color: var(--agenticwp-text-primary);
    font-size: 0.875rem;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23646970' d='M8 10.5L4.5 7 5.5 6l2.5 2.5L10.5 6l1 1z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    padding-right: 40px;
}

.agenticwp-actions-tabs {
    display: flex;
    border-bottom: 1px solid var(--agenticwp-border);
    margin-bottom: 2rem;
    gap: 0;
}

.agenticwp-tab-button {
    background: var(--agenticwp-background-secondary);
    border: 1px solid var(--agenticwp-border);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--agenticwp-text-secondary);
    font-weight: 500;
    position: relative;
    margin-right: -1px;
}

.agenticwp-tab-button:hover {
    background: var(--agenticwp-background-primary);
    color: var(--agenticwp-text-primary);
}

.agenticwp-tab-button.active {
    background: var(--agenticwp-background-primary);
    color: var(--agenticwp-text-primary);
    border-bottom: 1px solid var(--agenticwp-background-primary);
    margin-bottom: -1px;
    z-index: 1;
}

.agenticwp-tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--agenticwp-background-primary);
}

.agenticwp-tab-content {
    display: none;
}

.agenticwp-tab-content.active {
    display: block;
}

.agenticwp-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--agenticwp-text-secondary);
    background: var(--agenticwp-background-secondary);
    border-radius: var(--agenticwp-border-radius);
    border: 2px dashed var(--agenticwp-border);
    margin: 2rem 0;
}

.agenticwp-empty-state p {
    margin: 0;
    font-size: 1.1em;
}

.agenticwp-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.agenticwp-action-card {
    background: var(--agenticwp-bg-light);
    border: 1px solid var(--agenticwp-border-dark);
    border-radius: var(--agenticwp-border-radius);
    overflow: hidden;
    transition: all 0.2s ease;
}

.agenticwp-action-card:hover {
    border-color: var(--agenticwp-accent-light);
    box-shadow: 0 4px 12px rgba(var(--agenticwp-accent-rgb), 0.1);
}

.agenticwp-tab-content.filtered .agenticwp-action-card {
    display: none;
}

.agenticwp-tab-content.filtered .agenticwp-action-card.visible {
    display: block;
}

.agenticwp-action-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 1rem 0.5rem;
}

.agenticwp-action-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.agenticwp-action-category {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--agenticwp-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.agenticwp-action-badge {
    background: var(--agenticwp-accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: var(--agenticwp-border-radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.agenticwp-action-delete {
    background: transparent;
    border: none;
    padding: 0.25rem;
    color: var(--agenticwp-text-secondary);
    cursor: pointer;
    border-radius: var(--agenticwp-border-radius-sm);
    transition: all 0.2s ease;
}

.agenticwp-action-delete:hover {
    color: var(--agenticwp-error);
    background: rgba(var(--agenticwp-error-rgb), 0.1);
}

.agenticwp-action-card-body {
    padding: 0.5rem 1rem 1rem;
}

.agenticwp-field-group {
    margin-bottom: 1rem;
}

.agenticwp-field-group:last-child {
    margin-bottom: 0;
}

.agenticwp-field-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--agenticwp-text-primary);
}

.agenticwp-field-group input,
.agenticwp-field-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--agenticwp-border);
    border-radius: var(--agenticwp-border-radius);
    background: var(--agenticwp-background-primary);
    color: var(--agenticwp-text-primary);
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.agenticwp-field-group input:focus,
.agenticwp-field-group textarea:focus {
    outline: none;
    border-color: var(--agenticwp-accent);
    box-shadow: 0 0 0 3px rgba(var(--agenticwp-accent-rgb), 0.1);
}

.agenticwp-field-group input[readonly] {
    background: var(--agenticwp-background-secondary);
    color: var(--agenticwp-text-secondary);
    cursor: default;
}

.agenticwp-field-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.agenticwp-field-group .description {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: var(--agenticwp-text-secondary);
    line-height: 1.4;
}

.agenticwp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--agenticwp-space-lg);
}

.agenticwp-section-header h2 {
    margin: 0;
}

.agenticwp-section-toggle {
    display: flex;
    align-items: center;
    gap: var(--agenticwp-space-md);
}

.agenticwp-section-toggle label {
    font-weight: 500;
    color: var(--agenticwp-text-primary);
    margin: 0;
}

@media (max-width: 1200px) {
    .agenticwp-actions-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .agenticwp-actions-tabs {
        flex-direction: column;
        border-bottom: none;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .agenticwp-tab-button {
        margin-right: 0;
        margin-bottom: 0;
        border-radius: var(--agenticwp-border-radius);
        border: 1px solid var(--agenticwp-border);
        text-align: center;
    }

    .agenticwp-tab-button.active {
        border: 1px solid var(--agenticwp-primary);
        background: var(--agenticwp-primary);
        color: white;
        margin-bottom: 0;
    }

    .agenticwp-tab-button.active::after {
        display: none;
    }

    .agenticwp-actions-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .agenticwp-category-filter {
        justify-content: space-between;
    }

    .agenticwp-category-filter select {
        min-width: auto;
        flex: 1;
    }

    .agenticwp-actions-grid {
        grid-template-columns: 1fr;
    }
}

.agenticwp-meta-description-meta-box {
    padding-top: 10px;
}

.agenticwp-meta-description-meta-box .description {
    margin-bottom: 15px;
    font-style: italic;
    color: #666;
}

.agenticwp-meta-description-field {
    margin-bottom: 20px;
}

.agenticwp-meta-description-field textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.4;
}

.agenticwp-meta-description-field textarea:focus {
    border-color: #005cee;
    box-shadow: 0 0 0 1px #005cee;
    outline: none;
}

.agenticwp-meta-description-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
}

.agenticwp-meta-description-counter .counter {
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    min-width: 24px;
    text-align: center;
}

.agenticwp-meta-description-counter .counter.good {
    background-color: #d4edda;
    color: #155724;
}

.agenticwp-meta-description-counter .counter.under {
    background-color: #fff3cd;
    color: #856404;
}

.agenticwp-meta-description-counter .counter.over {
    background-color: #f8d7da;
    color: #721c24;
}

.agenticwp-meta-description-counter .counter-label {
    color: #666;
}

.agenticwp-meta-description-counter .counter-guidance {
    color: #888;
    font-style: italic;
}

.agenticwp-schema-meta-box {
    padding-top: 10px;
}

.agenticwp-schema-meta-box .description {
    margin-bottom: 15px;
    font-style: italic;
    color: #666;
}

.agenticwp-schema-field {
    margin-bottom: 20px;
}

.agenticwp-schema-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #23282d;
    font-size: 14px;
}

.agenticwp-schema-field input[type="text"],
.agenticwp-schema-field textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    box-sizing: border-box;
}

.agenticwp-schema-field textarea {
    resize: vertical;
    min-height: 80px;
}

.agenticwp-schema-field input[type="text"]:focus,
.agenticwp-schema-field textarea:focus {
    border-color: #005cee;
    box-shadow: 0 0 0 1px #005cee;
    outline: none;
}

.agenticwp-schema-field .description {
    margin-top: 8px;
    margin-bottom: 0;
    font-size: 12px;
    color: #666;
    font-style: italic;
}
