/* n8n Content Generator Styles - AI Blue Theme */

.n8n-content-generator {
    max-width: 800px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.n8n-generator-header {
    background: #f8f9fa;
    padding: 25px 30px;
    color: #000000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.n8n-generator-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.02) 0%, transparent 70%);
    animation: glow 4s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { transform: translate(0, 0); opacity: 0.5; }
    50% { transform: translate(10px, 10px); opacity: 0.8; }
}

.n8n-generator-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    position: relative;
    z-index: 1;
    color: #000000;
}

.n8n-generator-chat-container {
    background: #ffffff;
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.n8n-generator-messages {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.n8n-message {
    padding: 15px 20px;
    border-radius: 10px;
    max-width: 85%;
    line-height: 1.6;
    animation: fadeIn 0.3s ease-in;
    position: relative;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.n8n-message-user {
    background: #000000;
    color: #ffffff;
    align-self: flex-end;
    margin-left: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #000000;
}

.n8n-message-assistant {
    background: #f8f9fa;
    color: #000000;
    align-self: flex-start;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.n8n-message-system {
    background: #f8f9fa;
    color: #6c757d;
    align-self: center;
    text-align: center;
    font-size: 14px;
    max-width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.n8n-message p {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.n8n-message-timestamp {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 5px;
    display: block;
    color: #6c757d;
}

.n8n-generator-input-container {
    padding: 20px 30px 30px;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.n8n-prompt-input {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #ffffff;
    color: #000000 !important;
}

.n8n-prompt-input::-webkit-input-placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.n8n-prompt-input:-moz-placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.n8n-prompt-input::-moz-placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.n8n-prompt-input:-ms-input-placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.n8n-prompt-input:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    color: #000000 !important;
}

.n8n-generate-btn {
    width: 100%;
    margin-top: 15px;
    padding: 15px 30px;
    background: #000000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.n8n-generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1a1a1a;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.n8n-generate-btn:hover::before {
    opacity: 1;
}

.n8n-generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.n8n-generate-btn:active {
    transform: translateY(0);
}

.n8n-generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.n8n-btn-text,
.n8n-btn-loader {
    position: relative;
    z-index: 1;
}

.n8n-btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spinner {
    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);
    }
}

.n8n-generator-error {
    margin: 0 30px 20px;
    padding: 15px;
    background: rgba(239, 68, 68, 0.1);
    color: #ffffff;
    border-radius: 8px;
    border-left: 4px solid #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Scrollbar styling */
.n8n-generator-chat-container::-webkit-scrollbar {
    width: 8px;
}

.n8n-generator-chat-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.n8n-generator-chat-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.n8n-generator-chat-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive design */
@media (max-width: 768px) {
    .n8n-content-generator {
        margin: 20px 15px;
        border-radius: 8px;
    }
    
    .n8n-generator-header {
        padding: 20px;
    }
    
    .n8n-generator-header h2 {
        font-size: 20px;
    }
    
    .n8n-message {
        max-width: 90%;
    }
    
    .n8n-generator-input-container {
        padding: 15px 20px 20px;
    }
}

/* Loading dots animation */
.n8n-loading-dots {
    display: flex;
    gap: 4px;
    padding: 10px 0;
}

.n8n-loading-dots span {
    width: 8px;
    height: 8px;
    background: #000000;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.n8n-loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.n8n-loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Clean minimal design - no floating particles */

/* AI Chat bubble effect */
.n8n-message-assistant::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 15px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent #f8f9fa transparent transparent;
}

.n8n-message-user::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 15px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent #000000;
}

/* Additional text visibility fixes */
textarea.n8n-prompt-input,
input.n8n-prompt-input {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    background: #ffffff !important;
}

textarea.n8n-prompt-input:focus,
input.n8n-prompt-input:focus {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    background: #ffffff !important;
}

textarea.n8n-prompt-input:blur,
input.n8n-prompt-input:blur,
textarea.n8n-prompt-input:not(:focus),
input.n8n-prompt-input:not(:focus) {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    background: #ffffff !important;
}

textarea.n8n-prompt-input:hover,
input.n8n-prompt-input:hover {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    background: #ffffff !important;
}

textarea.n8n-prompt-input:active,
input.n8n-prompt-input:active {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    background: #ffffff !important;
}