/* Generate Prompt from Content button */
.aifi-generate-prompt-wrap {
    display: flex;
    align-items: center;
    margin-top: 8px;
    gap: 6px;
}

.aifi-generate-prompt-btn .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
    vertical-align: text-bottom;
    margin-right: 4px;
}

/* Main metabox container */
.aifi-meta-box {
    padding: 0;
    background: transparent;
    border: none;
}

/* Field group containers */
.aifi-field-group {
    margin-bottom: 20px;
}

.aifi-field-group:last-of-type {
    margin-bottom: 24px;
}

/* Label styling */
.aifi-field-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d2327;
    font-size: 13px;
    line-height: 1.3;
}

/* Form input styling */
.aifi-field-group input[type="text"],
.aifi-field-group textarea,
.aifi-field-group select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    background: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Select dropdown arrow styling */
.aifi-field-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.aifi-field-group input[type="text"]:focus,
.aifi-field-group textarea:focus,
.aifi-field-group select:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.aifi-field-group select.widefat {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Description text */
.aifi-field-group .description {
    margin: 6px 0 0 0;
    color: #646970;
    font-size: 12px;
    line-height: 1.4;
    font-style: italic;
}

/* Actions container */
.aifi-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 24px 0 20px 0;
    padding: 0;
}

.aifi-actions .spinner {
    float: none;
    margin: 0 0 0 8px;
}

/* Button styling (keeping existing) */
.aifi-meta-box .button-primary {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    text-shadow: none;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.2);
    transition: all 0.2s ease;
}

.aifi-meta-box .button-primary:hover {
    background: linear-gradient(135deg, #005a87 0%, #004a73 100%);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
    transform: translateY(-1px);
}

/* Loading spinner */
.aifi-loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.aifi-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 115, 170, 0.2);
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: aifi-spin 0.8s linear infinite;
}

@keyframes aifi-spin {
    to { transform: rotate(360deg); }
}

/* Preview area */
.aifi-preview {
    margin: 20px 0 0 0;
    text-align: center;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 16px;
}

.aifi-preview img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Regenerate button */

/* Message styling */
.aifi-message {
    margin: 16px 0 0 0;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
}

.aifi-message.success {
    background-color: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
}

.aifi-message.error {
    background-color: #f2dede;
    border: 1px solid #ebccd1;
    color: #a94442;
}

/* Error styling */
.aifi-error {
    color: #dc3232;
    font-weight: 600;
}

/* Upgrade notice styling */
.aifi-upgrade-notice {
    margin-top: 12px !important;
    padding: 10px 14px;
    background: linear-gradient(135deg, #fff8e5 0%, #fff3cd 100%);
    border: 1px solid #ffc107;
    border-left: 4px solid #f0ad4e;
    border-radius: 4px;
    font-style: normal !important;
    color: #856404 !important;
}

.aifi-upgrade-notice .dashicons {
    vertical-align: middle;
    margin-right: 4px;
}

.aifi-upgrade-notice a {
    color: #0073aa;
    font-weight: 600;
    text-decoration: none;
}

.aifi-upgrade-notice a:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Pro badge styling */
.aifi-pro-badge {
    display: inline-block;
    padding: 2px 6px;
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Stability tools locked state (free users) */
.aifi-stability-tools-locked select,
.aifi-stability-tools-locked .button {
    opacity: 0.55;
    cursor: not-allowed !important;
}
.aifi-tools-upgrade-hint {
    font-size: 12px;
    color: #856404;
    margin: 4px 0 8px;
    line-height: 1.4;
}
.aifi-tools-upgrade-hint a {
    color: #0073aa;
    font-weight: 600;
    text-decoration: none;
}
.aifi-tools-upgrade-hint a:hover {
    text-decoration: underline;
}

/* Settings page styles */
.aifi-settings-section {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.aifi-settings-section h2 {
    margin-top: 0;
}

.aifi-settings-section .form-table th {
    width: 200px;
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    .aifi-settings-section .form-table th {
        width: auto;
    }
}

/* Review request notice (shared with settings.css) */
.aifi-review-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fffbeb 0%, #fff8e5 100%);
    border: 1px solid #fcd34d;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    margin: 16px 20px 5px 0;
}
.aifi-review-notice.aifi-review-hiding {
    opacity: 0;
    transition: opacity 250ms ease;
}
.aifi-review-notice-icon .dashicons {
    color: #f59e0b;
    font-size: 24px;
    width: 24px;
    height: 24px;
}
.aifi-review-notice-body { flex: 1; }
.aifi-review-notice-title {
    margin: 0 0 4px;
    font-size: 14px;
    color: #92400e;
}
.aifi-review-notice-text {
    margin: 0 0 10px;
    color: #78350f;
    font-size: 13px;
    line-height: 1.55;
    max-width: 720px;
}
.aifi-review-notice-actions {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.aifi-review-notice-actions .button .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: text-bottom;
}
.aifi-review-notice-never {
    color: #78350f !important;
    text-decoration: underline;
    font-size: 12px;
}
.aifi-review-notice-never:hover {
    color: #92400e !important;
}

/* Post-list AI Image column */
.column-aifi_image {
    width: 130px;
}
.aifi-col-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}
.aifi-list-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
    transition: opacity 0.2s;
}
.aifi-no-image {
    font-size: 11px;
    color: #888;
}
.aifi-generate-link {
    font-size: 11px;
    white-space: nowrap;
}
.aifi-list-spinner {
    float: none !important;
    margin: 0 !important;
    vertical-align: middle;
}
.aifi-list-ok {
    color: #46b450;
    vertical-align: middle;
}
.aifi-list-error {
    display: block;
    font-size: 11px;
    color: #d63638;
    margin-top: 2px;
}