/* Skill AI Generator Pro - Frontend Styles */

.skill-ai-generator-wrap {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.skill-ai-generator-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 16px 24px;
}

.skill-ai-generator-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.skill-ai-generator-body {
    padding: 20px 24px;
}

.skill-ai-field {
    margin-bottom: 15px;
}

.skill-ai-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.skill-ai-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.skill-ai-input:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.1);
}

textarea.skill-ai-input {
    resize: vertical;
    min-height: 100px;
}

.skill-ai-settings-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.skill-ai-settings-row select {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.skill-ai-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.2s, transform 0.1s;
}

.skill-ai-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.skill-ai-btn:active {
    transform: translateY(0);
}

.skill-ai-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Progress Bar */
.skill-ai-progress {
    margin: 12px 0;
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
}

.skill-ai-progress .skill-ai-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    background-size: 200% 100%;
    border-radius: 2px;
    animation: skill-ai-front-progress 1.5s ease-in-out infinite;
}

@keyframes skill-ai-front-progress {
    0% { background-position: 200% 0; width: 0%; }
    50% { width: 70%; }
    100% { background-position: -200% 0; width: 100%; }
}

/* Result Area */
.skill-ai-result {
    margin: 0 24px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.skill-ai-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #e9ecef;
    border-bottom: 1px solid #dee2e6;
}

.skill-ai-result-header strong {
    font-size: 13px;
    color: #555;
}

.skill-ai-result-content {
    padding: 16px;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 500px;
    overflow-y: auto;
}

.skill-ai-code-block {
    margin: 0;
    padding: 16px;
    background: #1e1e1e;
    color: #d4d4d4;
    overflow-x: auto;
}

.skill-ai-code-block .skill-ai-result-content {
    background: transparent;
    color: inherit;
    padding: 0;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
}

.skill-ai-copy-btn {
    padding: 4px 12px;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.skill-ai-copy-btn:hover {
    background: #5a6268;
}

.skill-ai-note {
    margin: 10px 16px;
    color: #888;
    font-size: 12px;
    font-style: italic;
}

.skill-ai-hint {
    color: #888;
    font-size: 12px;
    margin-top: 4px;
}

/* Full App Layout */
.skill-ai-full-app {
    display: flex;
    max-width: 1100px;
    margin: 20px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    overflow: hidden;
    min-height: 500px;
}

.skill-ai-sidebar {
    width: 260px;
    min-width: 260px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    padding: 0;
    overflow-y: auto;
    max-height: 600px;
}

.skill-ai-sidebar h3 {
    margin: 0;
    padding: 16px 20px;
    font-size: 14px;
    color: #764ba2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e9ecef;
}

.skill-ai-cat-group {
    border-bottom: 1px solid #e9ecef;
}

.skill-ai-cat-title {
    margin: 0;
    padding: 8px 20px;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f0f0f0;
}

.skill-ai-tool-item {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 13px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}

.skill-ai-tool-item:hover {
    background: #e8e8e8;
}

.skill-ai-tool-item.active {
    background: #fff;
    color: #764ba2;
    font-weight: 600;
    border-left-color: #764ba2;
}

.skill-ai-tool-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.skill-ai-main-area {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.skill-ai-tool-header h2 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: #333;
}

.skill-ai-placeholder {
    color: #888;
    text-align: center;
    padding: 60px 20px;
}

/* ChatBot */
.skill-ai-chatbot-wrap {
    max-width: 600px;
    margin: 20px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    overflow: hidden;
}

.skill-ai-chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 16px 20px;
}

.skill-ai-chatbot-header h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.skill-ai-chatbot-header select {
    padding: 6px 10px;
    border-radius: 6px;
    border: none;
    font-size: 12px;
}

.skill-ai-chat-messages {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
    background: #f8f9fa;
}

.skill-ai-chat-msg {
    margin-bottom: 12px;
    display: flex;
}

.skill-ai-chat-user {
    justify-content: flex-end;
}

.skill-ai-chat-bot {
    justify-content: flex-start;
}

.skill-ai-chat-bubble {
    max-width: 80%;
    padding: 10px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.skill-ai-chat-user .skill-ai-chat-bubble {
    background: #764ba2;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.skill-ai-chat-bot .skill-ai-chat-bubble {
    background: #e9ecef;
    color: #333;
    border-bottom-left-radius: 4px;
}

.skill-ai-chat-input-area {
    display: flex;
    padding: 12px 16px;
    border-top: 1px solid #e9ecef;
    gap: 10px;
    align-items: flex-end;
}

.skill-ai-chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    resize: none;
    outline: none;
}

.skill-ai-chat-input:focus {
    border-color: #764ba2;
}

.skill-ai-chat-send {
    border-radius: 20px;
    padding: 10px 20px;
}

/* Floating Chat */
.skill-ai-floating-chat {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.skill-ai-chat-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(118, 75, 162, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform 0.2s;
}

.skill-ai-chat-toggle:hover {
    transform: scale(1.1);
}

.skill-ai-chat-label {
    display: none;
}

.skill-ai-floating-chat-body {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    max-height: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    overflow: hidden;
}

.skill-ai-floating-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.skill-ai-chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.skill-ai-floating-chat-messages {
    padding: 12px;
    max-height: 350px;
    overflow-y: auto;
    background: #f8f9fa;
}

.skill-ai-floating-chat-input {
    display: flex;
    padding: 10px 12px;
    border-top: 1px solid #e9ecef;
    gap: 8px;
}

.skill-ai-floating-chat-input textarea {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 18px;
    font-size: 13px;
    resize: none;
    outline: none;
}

.skill-ai-floating-send {
    background: #764ba2;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 14px;
}

/* Error message */
.skill-ai-error {
    color: #f44336;
    padding: 12px 16px;
    background: #ffebee;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .skill-ai-full-app {
        flex-direction: column;
    }
    .skill-ai-sidebar {
        width: 100%;
        min-width: 100%;
        max-height: 250px;
    }
    .skill-ai-settings-row {
        flex-direction: column;
    }
    .skill-ai-floating-chat-body {
        width: 300px;
        right: -10px;
    }
}
