/* Admin styles for n8n Chat Bot WP */

.n8n-chatbot-admin-container {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.n8n-chatbot-settings-form {
    flex: 1;
    max-width: 600px;
}

.n8n-chatbot-preview {
    flex: 0 0 350px;
    background: #f9f9f9;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.n8n-chatbot-preview h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.preview-container {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    overflow: hidden;
}

/* Border radius slider styling */
.border-radius-slider {
    width: 200px;
    margin-right: 10px;
}

.border-radius-value {
    font-weight: bold;
    color: #0073aa;
    min-width: 40px;
    display: inline-block;
}

/* Preview widget styling */
.chat-widget-preview {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-widget-preview[data-position="left"] {
    left: 20px;
    right: auto;
}

.chat-icon-preview {
    width: 60px;
    height: 60px;
    border-radius: var(--preview-border-radius, 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    margin-bottom: 10px;
    margin-left: auto;
}

.chat-widget-preview[data-position="left"] .chat-icon-preview {
    margin-left: 0;
    margin-right: auto;
}

.chat-box-preview {
    width: 300px;
    height: 400px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 10px;
    margin-left: auto;
}

.chat-widget-preview[data-position="left"] .chat-box-preview {
    margin-left: 0;
    margin-right: auto;
}

.chat-header {
    padding: 15px;
    font-weight: bold;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.4;
}

.user-message {
    align-self: flex-end;
    color: white;
}

.bot-message {
    align-self: flex-start;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

.chat-input button {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

/* Theme-specific preview styles */
.chat-widget-preview[data-theme="dark"] .chat-icon-preview {
    background: #2c3e50;
    color: #ffffff;
}

.chat-widget-preview[data-theme="dark"] .chat-box-preview {
    background: #2c3e50;
    color: #ffffff;
}

.chat-widget-preview[data-theme="dark"] .user-message {
    background: #3498db;
}

.chat-widget-preview[data-theme="dark"] .bot-message {
    background: #34495e;
    color: #ffffff;
}

.chat-widget-preview[data-theme="dark"] .chat-input input {
    background: #34495e;
    color: #ffffff;
}

.chat-widget-preview[data-theme="dark"] .chat-input button {
    background: #3498db;
    color: #ffffff;
}

.chat-widget-preview[data-theme="white"] .chat-icon-preview {
    background: #ffffff;
    color: #333333;
}

.chat-widget-preview[data-theme="white"] .chat-box-preview {
    background: #ffffff;
    color: #333333;
}

.chat-widget-preview[data-theme="white"] .user-message {
    background: #007bff;
}

.chat-widget-preview[data-theme="white"] .bot-message {
    background: #e9ecef;
    color: #333333;
}

.chat-widget-preview[data-theme="white"] .chat-input input {
    background: #f8f9fa;
    color: #333333;
}

.chat-widget-preview[data-theme="white"] .chat-input button {
    background: #007bff;
    color: #ffffff;
}

.chat-widget-preview[data-theme="yellow"] .chat-icon-preview {
    background: #f1c40f;
    color: #2c3e50;
}

.chat-widget-preview[data-theme="yellow"] .chat-box-preview {
    background: #fff9c4;
    color: #2c3e50;
}

.chat-widget-preview[data-theme="yellow"] .user-message {
    background: #f39c12;
    color: #2c3e50;
}

.chat-widget-preview[data-theme="yellow"] .bot-message {
    background: #fef9e7;
    color: #2c3e50;
}

.chat-widget-preview[data-theme="yellow"] .chat-input input {
    background: #fef9e7;
    color: #2c3e50;
}

.chat-widget-preview[data-theme="yellow"] .chat-input button {
    background: #f39c12;
    color: #2c3e50;
}

.chat-widget-preview[data-theme="red"] .chat-icon-preview {
    background: #e74c3c;
    color: #ffffff;
}

.chat-widget-preview[data-theme="red"] .chat-box-preview {
    background: #e74c3c;
    color: #ffffff;
}

.chat-widget-preview[data-theme="red"] .user-message {
    background: #c0392b;
}

.chat-widget-preview[data-theme="red"] .bot-message {
    background: #d63031;
    color: #ffffff;
}

.chat-widget-preview[data-theme="red"] .chat-input input {
    background: #c0392b;
    color: #ffffff;
}

.chat-widget-preview[data-theme="red"] .chat-input button {
    background: #c0392b;
    color: #ffffff;
}

/* Info section styling */
.n8n-chatbot-info {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.n8n-chatbot-info h3 {
    margin-top: 0;
    color: #333;
}

.n8n-chatbot-info ol {
    margin: 15px 0;
}

.n8n-chatbot-info li {
    margin-bottom: 8px;
}

/* Responsive design */
@media (max-width: 1200px) {
    .n8n-chatbot-admin-container {
        flex-direction: column;
    }
    
    .n8n-chatbot-preview {
        flex: none;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .chat-box-preview {
        width: 250px;
        height: 350px;
    }
    
    .preview-container {
        height: 350px;
    }
}
