/**
 * AI Content Rewriter - Frontend Styles
 *
 * @package AICT_Core
 * @since 1.4.0
 */

/* Tool Container */
.aict-content-rewriter {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Tool Header */
.aict-tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.aict-tool-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.aict-tool-description {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
}

/* Form Styles */
.aict-tool-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.aict-form-group {
    margin-bottom: 25px;
}

.aict-form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.aict-input, .aict-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.aict-input:focus, .aict-textarea:focus {
    outline: none;
    border-color: #4A90E2;
}

.aict-textarea {
    min-height: 200px;
    resize: vertical;
    font-family: inherit;
}

.aict-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .aict-form-row {
        grid-template-columns: 1fr;
    }
}

/* Character Counter */
.aict-char-counter {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    text-align: right;
}

/* Button Styles */
.aict-button {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.aict-button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.aict-button-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.aict-button-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.aict-button-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    margin-right: 10px;
}

.aict-button-secondary:hover {
    background: #667eea;
    color: white;
}

/* Spinner */
.aict-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Result Section */
.aict-tool-result {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.aict-result-header h3 {
    font-size: 24px;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.aict-result-metrics {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.aict-metric {
    background: #f8f9fa;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.aict-result-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

#aict-rewritten-text {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

/* Score Indicators */
.aict-metric span {
    color: #1a1a1a;
    font-weight: 700;
}

.aict-metric span.excellent {
    color: #10b981;
}

.aict-metric span.good {
    color: #f59e0b;
}

.aict-metric span.needs-work {
    color: #ef4444;
}

/* Result Actions */
.aict-result-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Error Display */
.aict-tool-error {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    padding: 16px;
    border-radius: 8px;
    color: #991b1b;
    margin-bottom: 20px;
}

/* Tips Section */
.aict-tool-tips {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.aict-tool-tips h4 {
    font-size: 18px;
    color: #1e40af;
    margin-bottom: 15px;
}

.aict-tool-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aict-tool-tips li {
    padding: 8px 0;
    color: #1e3a8a;
    font-size: 14px;
    line-height: 1.6;
}

.aict-tool-tips strong {
    color: #1e40af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .aict-content-rewriter {
        padding: 20px 15px;
    }

    .aict-tool-header h2 {
        font-size: 24px;
    }

    .aict-tool-description {
        font-size: 16px;
    }

    .aict-tool-form {
        padding: 20px;
    }

    .aict-result-metrics {
        flex-direction: column;
    }
}
