/* ===========================================
   Elementor AI Design Generator - Frontend CSS
   =========================================== */

/* Widget Wrapper */
.eadg-widget-wrapper {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100%;
}

/* Prompt Section */
.eadg-prompt-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.eadg-prompt-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.eadg-prompt-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 10px;
    color: #ffffff;
}

.eadg-prompt-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

/* Prompt Input */
.eadg-prompt-input {
    width: 100%;
    min-height: 80px;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    background-color: #f9fafb;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.eadg-prompt-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background-color: #ffffff;
}

.eadg-prompt-input::placeholder {
    color: #9ca3af;
}

.eadg-prompt-input.eadg-input-error {
    border-color: #ef4444;
    animation: eadg-shake 0.4s ease;
}

@keyframes eadg-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Prompt Actions */
.eadg-prompt-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

/* Generate Button */
.eadg-generate-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    font-family: inherit;
}

.eadg-generate-btn:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.eadg-generate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.eadg-generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.eadg-generate-btn .eadg-btn-icon {
    display: flex;
    align-items: center;
}

/* Copy Button */
.eadg-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.eadg-copy-btn:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.eadg-copy-btn.eadg-copied {
    background: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.eadg-copy-btn .eadg-btn-icon {
    display: flex;
    align-items: center;
}

/* Loading */
.eadg-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.eadg-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: eadg-spin 0.8s linear infinite;
}

@keyframes eadg-spin {
    to { transform: rotate(360deg); }
}

.eadg-loading-text {
    margin-top: 20px;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
}

.eadg-loading-subtext {
    margin-top: 6px;
    font-size: 13px;
    color: #9ca3af;
}

/* Design Output */
.eadg-design-output {
    min-height: 100px;
    border-radius: 12px;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.eadg-design-output.eadg-output-loading {
    opacity: 0.4;
    pointer-events: none;
}

.eadg-generated-content {
    width: 100%;
}

.eadg-generated-content img {
    max-width: 100%;
    height: auto;
}

/* Editor Placeholder */
.eadg-editor-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: #f9fafb;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    text-align: center;
}

/* Error Message */
.eadg-error-message {
    margin-top: 16px;
}

.eadg-error-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #dc2626;
    font-size: 14px;
}

.eadg-error-inner svg {
    flex-shrink: 0;
}

/* ========================
   Responsive
   ======================== */
@media (max-width: 768px) {
    .eadg-prompt-section {
        padding: 16px;
    }

    .eadg-prompt-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .eadg-generate-btn,
    .eadg-copy-btn {
        justify-content: center;
        width: 100%;
    }

    .eadg-prompt-input {
        font-size: 16px; /* iOS zoom engelleme */
    }
}

@media (max-width: 480px) {
    .eadg-prompt-section {
        padding: 14px;
        border-radius: 10px;
    }

    .eadg-prompt-header {
        margin-bottom: 12px;
    }

    .eadg-prompt-title {
        font-size: 14px;
    }
}
