/* Add Feed Source Component Styles - blog82ai prefixed */

.blog82ai-add-feed-source {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 20px 0;
}

/* Page header styling */
.blog82ai-add-feed-source .blog82ai-page-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 15px;
}

.blog82ai-add-feed-source .blog82ai-page-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #23282d;
}

.blog82ai-add-feed-source .blog82ai-page-header p {
    margin: 5px 0 0;
    color: #666;
    font-size: 14px;
}

/* Form Sections */
.blog82ai-add-feed-source .blog82ai-form-section {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.blog82ai-add-feed-source .blog82ai-form-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #23282d;
}

/* Form rows and groups */
.blog82ai-add-feed-source .blog82ai-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.blog82ai-add-feed-source .blog82ai-form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.blog82ai-add-feed-source .blog82ai-form-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #23282d;
}

.blog82ai-add-feed-source input[type="text"],
.blog82ai-add-feed-source input[type="url"],
.blog82ai-add-feed-source input[type="number"],
.blog82ai-add-feed-source select,
.blog82ai-add-feed-source textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccd0d4;
    border-radius: 3px;
    font-size: 14px;
    color: #23282d;
    margin-top: 4px;
}

/* Dropdown arrow indicator */
.blog82ai-add-feed-source 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 8px center;
    background-size: 16px;
    padding-right: 32px;
}

.blog82ai-add-feed-source .blog82ai-form-group small {
    margin-top: 6px;
    color: #666;
    font-size: 12px;
}

@media (max-width: 768px) {
    .blog82ai-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* URL Input Group */
.blog82ai-url-input-group {
    display: flex;
    gap: 8px;
}

.blog82ai-url-input-group input {
    flex: 1;
}

.blog82ai-url-input-group .button {
    flex-shrink: 0;
    padding: 8px 16px;
    height: auto;
}

/* Checkboxes */
.blog82ai-form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    margin-bottom: 0;
}

.blog82ai-form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: flex-start;
    font-weight: 500;
    margin-bottom: 4px;
}

/* Filter Options */
.blog82ai-filter-options {
    margin-top: 16px;
    padding: 16px;
    background: #f6f7f7;
    border-radius: 6px;
    border-left: 3px solid #2271b1;
}

/* Validation Results */
.blog82ai-validation-result {
    margin-top: 10px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
}

.blog82ai-validation-loading {
    color: #2271b1;
    font-weight: 500;
}

.blog82ai-validation-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.blog82ai-validation-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.blog82ai-feed-info,
.blog82ai-error-details {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
}

/* Form actions */
.blog82ai-add-feed-source .blog82ai-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.blog82ai-add-feed-source .blog82ai-form-actions .button {
    padding: 8px 16px;
    font-size: 14px;
}

/* Feed Preview */
.blog82ai-feed-preview {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 24px;
    margin-top: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.blog82ai-feed-preview h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f1;
}

.blog82ai-loading {
    text-align: center;
    padding: 40px;
    color: #646970;
    font-size: 16px;
}

.blog82ai-preview-posts h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.blog82ai-preview-post {
    padding: 16px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    margin-bottom: 12px;
    background: #fafafa;
}

.blog82ai-preview-post:last-child {
    margin-bottom: 0;
}

.blog82ai-preview-post h5 {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 600;
    color: #2271b1;
}

.blog82ai-preview-post p {
    margin: 4px 0;
    font-size: 13px;
    color: #646970;
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog82ai-add-feed-source {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .blog82ai-add-feed-source {
        padding: 10px;
    }

    .blog82ai-form-section {
        padding: 16px;
        margin-bottom: 16px;
    }

    .blog82ai-form-actions {
        text-align: center;
        margin: 16px -16px -16px -16px;
        padding: 16px;
    }

    .blog82ai-form-actions .button {
        margin: 4px;
        display: inline-block;
    }

    .blog82ai-url-input-group {
        flex-direction: column;
    }

    .blog82ai-url-input-group .button {
        margin-top: 8px;
    }
}

/* Loading States */
.blog82ai-form-section.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Success/Error States */
.blog82ai-form-group.has-error input,
.blog82ai-form-group.has-error select,
.blog82ai-form-group.has-error textarea {
    border-color: #d63638;
    box-shadow: 0 0 0 1px #d63638;
}

.blog82ai-form-group.has-success input,
.blog82ai-form-group.has-success select,
.blog82ai-form-group.has-success textarea {
    border-color: #00a32a;
    box-shadow: 0 0 0 1px #00a32a;
}

/* WordPress Admin Integration */
.blog82ai-add-feed-source .button-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.blog82ai-add-feed-source .button-primary:hover {
    background: #135e96;
    border-color: #135e96;
}

.blog82ai-add-feed-source .button-secondary {
    background: #f6f7f7;
    border-color: #dcdcde;
    color: #2c3338;
}

.blog82ai-add-feed-source .button-secondary:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
}
