/* AI Writer Plugin Styles */
.ai-writer-container {
    max-width: 800px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* Card Layout */
.ai-writer-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

/* Header Section */
.ai-writer-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.ai-writer-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.ai-writer-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.ai-writer-description {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
    line-height: 1.5;
}

/* Form Styles */
.ai-writer-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
    font-size: 0.95rem;
}

.form-label i {
    margin-right: 0.5rem;
    color: #667eea;
    width: 16px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #d1d5db;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Output Section */
.ai-writer-output {
    padding: 0 2rem 2rem;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.output-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.output-actions {
    display: flex;
    gap: 0.5rem;
}

.output-content {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    line-height: 1.6;
    color: #374151;
}

.output-content h3 {
    color: #1f2937;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.output-content h3:first-child {
    margin-top: 0;
}

.output-content p {
    margin-bottom: 1rem;
}

.output-content ol,
.output-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.output-content li {
    margin-bottom: 0.5rem;
}

/* Loading State */
.ai-writer-loading {
    padding: 3rem 2rem;
    text-align: center;
}

.loading-spinner {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.loading-text {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-writer-container {
        margin: 1rem;
    }
    
    .ai-writer-header {
        padding: 1.5rem;
    }
    
    .ai-writer-form {
        padding: 1.5rem;
    }
    
    .ai-writer-output {
        padding: 0 1.5rem 1.5rem;
    }
    
    .output-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .output-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .btn {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .ai-writer-title {
        font-size: 1.5rem;
    }
    
    .ai-writer-description {
        font-size: 0.9rem;
    }
    
    .form-input,
    .form-textarea,
    .form-select {
        padding: 0.625rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .output-content {
        padding: 1rem;
        font-size: 0.9rem;
    }
}

/* Accessibility Improvements */
.form-input:focus-visible,
.form-textarea:focus-visible,
.form-select:focus-visible,
.btn:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .btn,
    .form-input,
    .form-textarea,
    .form-select {
        transition: none;
    }
    
    .loading-spinner {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ai-writer-card {
        border: 2px solid;
    }
    
    .form-input,
    .form-textarea,
    .form-select {
        border-width: 2px;
    }
}