/* ==========================================================================
   1. GENEL DEĞİŞKENLER VE TEMEL YAPI
   ========================================================================== */

.promptor-app {
    /* CSS Değişkenleri PHP tarafından atanacak */
    font-family: var(--promptor-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    font-size: var(--promptor-font-size, 16px);
    background: var(--promptor-widget-bg-color, #ffffff);
    color: #333;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    border-radius: var(--promptor-border-radius, 12px);
}

.promptor-app *, .promptor-app *::before, .promptor-app *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   2. INLINE MODU (KISA KOD İLE)
   ========================================================================== */

.promptor-app-shortcode-wrapper {
    border: 1px solid #e0e0e0;
    border-radius: var(--promptor-border-radius, 12px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
    height: 75vh;
    min-height: 500px;
    max-height: 800px;
    overflow: hidden;
    margin: 20px 0;
}

.promptor-app-shortcode-wrapper .promptor-app {
    border-radius: 0; /* Wrapper zaten ovalliği sağlıyor */
}


/* ==========================================================================
   3. POPUP MODU (PRO)
   ========================================================================== */

.promptor-popup-container {
    position: fixed;
    bottom: 20px;
    z-index: 999999;
}

.promptor-popup-container.position-bottom_right { right: 20px; }
.promptor-popup-container.position-bottom_left { left: 20px; }

.promptor-trigger-button {
    background-color: var(--promptor-primary-color, #0073aa);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease-in-out, background-color 0.2s;
}

.promptor-trigger-button:hover { transform: scale(1.1); }
.promptor-trigger-button svg { width: 32px; height: 32px; transition: opacity 0.2s ease-in-out; }
.promptor-trigger-button .promptor-icon-close { display: none; }

.promptor-chat-window {
    position: absolute;
    bottom: 80px;
    width: 380px;
    height: 70vh;
    max-height: 650px;
    overflow: hidden;
    display: none; /* JS ile yönetilir */
    flex-direction: column;
}

.promptor-chat-window .promptor-app {
    box-shadow: 0 5px 40px rgba(0,0,0,0.16);
}

.position-bottom_right .promptor-chat-window { right: 0; transform-origin: bottom right; }
.position-bottom_left .promptor-chat-window { left: 0; transform-origin: bottom left; }

/* Animasyonlar */
.promptor-chat-window.animation-fade { transition: opacity 0.3s ease; }
.promptor-chat-window.animation-slide { transition: transform 0.3s ease, opacity 0.3s ease; transform: translateY(20px); }
.promptor-chat-window.active.animation-slide { transform: translateY(0); }


/* ==========================================================================
   4. ORTAK UI ELEMANLARI (Header, Form, Mesajlar vb.)
   ========================================================================== */

.promptor-header {
    flex-shrink: 0;
    padding: 12px 15px;
    color: white;
    background-color: var(--promptor-primary-color, #0073aa);
    display: var(--promptor-header-display, flex); /* Dinamik göster/gizle */
    align-items: center;
    gap: 12px;
}
.promptor-header-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,0.9); padding: 2px; }
.promptor-header-text { line-height: 1.3; }
.promptor-header-title { font-weight: 600; font-size: 16px; }
.promptor-header-subtitle { font-size: 13px; opacity: 0.9; }

.promptor-chat-log { flex-grow: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.promptor-message-wrapper { display: flex; align-items: flex-start; gap: 12px; max-width: 85%; animation: promptor-fade-in 0.4s forwards; opacity: 0; transform: translateY(10px); }
.promptor-message-wrapper.user-message { align-self: flex-end; flex-direction: row-reverse; }
.promptor-message-wrapper.ai-message { align-self: flex-start; }
.promptor-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 5px; background: #f0f0f1; }
.promptor-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.promptor-message-bubble { padding: 12px 18px; line-height: 1.6; word-wrap: break-word; border-radius: var(--promptor-border-radius, 12px); }
.user-message .promptor-message-bubble { background-color: var(--promptor-user-bubble-color, #0073aa); color: var(--promptor-user-text-color, #fff); border-bottom-right-radius: 4px; }
.ai-message .promptor-message-bubble { background-color: var(--promptor-ai-bubble-color, #f0f0f1); color: var(--promptor-ai-text-color, #1d2327); border-bottom-left-radius: 4px; }
.ai-message .promptor-message-bubble p { margin: 0 0 10px; }
.ai-message .promptor-message-bubble p:last-child { margin-bottom: 0; }

.promptor-search-form { flex-shrink: 0; display: flex; gap: 10px; padding: 15px 20px; border-top: 1px solid #e0e0e0; }
.promptor-query-input { flex-grow: 1; padding: 12px 18px; border: 1px solid #ccc; border-radius: 25px; transition: all 0.2s ease; font-family: inherit; font-size: inherit; background: #fff; }
.promptor-query-input:focus { border-color: var(--promptor-input-focus-color, #0073aa); box-shadow: 0 0 0 2px color-mix(in srgb, var(--promptor-input-focus-color, #0073aa) 20%, transparent); outline: none; }
.promptor-ask-btn { width: 48px; height: 48px; border-radius: 50%; padding: 0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; background-color: var(--promptor-primary-color, #0073aa); border: none; cursor: pointer; transition: background-color 0.2s; }
.promptor-ask-btn:hover { background-color: color-mix(in srgb, var(--promptor-primary-color, #0073aa) 85%, black); }
.promptor-ask-btn:disabled { background-color: #a0a5aa; cursor: not-allowed; }

/* === İSTENEN DEĞİŞİKLİK BURADA BAŞLIYOR === */

.promptor-session-feedback-bar {
    margin-top: 15px;
    padding: 8px 15px; /* İç boşluğu biraz artırdık */
    background-color: transparent;
    border: 1px solid color-mix(in srgb, var(--promptor-primary-color, #0073aa) 50%, transparent);
    border-radius: 25px;
    display: flex; /* Ana konteyneri flex yaptık */
    justify-content: center; /* Öğeleri merkezde topladık */
    align-items: center; /* Öğeleri dikeyde ortaladık */
    gap: 15px; /* Metin ve buton grubu arasına boşluk ekledik */
    font-size: 13px;
    color: #50575e;
    align-self: center;
    max-width: 320px;
    opacity: 0;
    animation: promptor-fade-in 0.5s ease 0.3s forwards;
}

.promptor-session-feedback-bar .feedback-actions {
    display: flex; /* Butonları yan yana getirmek için flex yaptık */
    align-items: center;
    gap: 10px; /* Butonların arasına boşluk ekledik */
}

.promptor-session-feedback-bar .feedback-text {
    margin: 0; /* Gereksiz boşlukları kaldırdık */
}

.promptor-session-feedback-bar .feedback-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #888;
    transition: transform 0.2s ease, color 0.2s ease;
    padding: 0; /* Butonların iç boşluğunu sıfırladık */
    line-height: 1; /* Dikey hizalamayı iyileştirdik */
    margin-left: 0; /* Eski boşluğu kaldırdık */
}

.promptor-session-feedback-bar .feedback-actions button:hover {
    transform: scale(1.2);
    color: var(--promptor-primary-color, #0073aa);
}

.promptor-session-feedback-bar .feedback-actions button:disabled {
    cursor: not-allowed;
    color: #28a745;
    transform: scale(1.2);
}

.promptor-session-feedback-bar .feedback-thanks {
    font-size: 13px;
    color: #28a745;
    font-weight: 500;
}


/* === İSTENEN DEĞİŞİKLİK BURADA BİTİYOR === */


/* ==========================================================================
   5. AI CEVAP BİLEŞENLERİ (Kartlar, Formlar vb.)
   ========================================================================== */

.promptor-example-questions { padding: 0 20px 15px; text-align: center; }
.promptor-example-questions-title { font-size: 14px; color: #50575e; margin-bottom: 12px; }
.button-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.promptor-example-question-btn { background: #fff; border: 1px solid #ccc; color: #333; padding: 8px 15px; border-radius: 20px; font-size: 14px; cursor: pointer; transition: all 0.2s ease; }
.promptor-example-question-btn:hover { background-color: #f0f0f1; border-color: #999; }

.promptor-actions-wrapper { text-align: left; margin-top: 10px; }
.promptor-section-title { font-weight: 600; font-size: 1.1em; color: #1d2327; margin: 20px 0 15px; border-bottom: 1px solid #e9e9e9; padding-bottom: 8px; }

/* === ÜRÜN KARTLARI === */
.promptor-product-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
.promptor-product-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #e9e9e9; border-radius: calc(var(--promptor-border-radius, 12px) * 0.7); overflow: hidden; transition: box-shadow 0.2s; }
.promptor-product-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.promptor-product-image { position: relative; width: 100%; padding-top: 100%; background-color: #f5f5f5; display: block; }
.promptor-product-image img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.promptor-product-details { display: flex; flex-direction: column; flex-grow: 1; padding: 15px; }
.promptor-product-title { margin: 0 0 5px; font-size: 1em; font-weight: 600; line-height: 1.4; }
.promptor-product-title a { text-decoration: none; color: inherit; }
.promptor-product-title a:hover { color: var(--promptor-primary-color, #0073aa); }
.promptor-product-description {
    font-size: 0.9em;
    color: #555;
    margin: 5px 0 10px;
    line-height: 1.5;
}
.promptor-product-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; }
.promptor-product-price { font-size: 1.1em; font-weight: 700; color: var(--promptor-primary-color, #2271b1); }

.promptor-product-action-btn {
    background-color: var(--promptor-primary-color, #2271b1);
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: background-color 0.2s, opacity 0.2s;
}
.promptor-product-action-btn:hover {
    background-color: color-mix(in srgb, var(--promptor-primary-color, #2271b1) 85%, black);
}
.promptor-product-action-btn.loading {
    opacity: 0.5;
    pointer-events: none;
}
.promptor-product-action-btn.added {
    background-color: #4CAF50;
}
.promptor-product-action-btn.added::after {
    content: '✔';
    margin-left: 6px;
    font-weight: bold;
}

/* === HİZMET/İLETİŞİM FORMU === */
.promptor-contact-form-container { margin-top: 20px; }
.promptor-submit-button { width: 100%; padding: 12px 20px; font-size: 16px; font-weight: 600; color: #fff; background-color: var(--promptor-primary-color, #0073aa); border: none; border-radius: 25px; cursor: pointer; transition: background-color 0.2s; }
.promptor-contact-form { margin-top: 15px; padding: 20px; background: color-mix(in srgb, var(--promptor-widget-bg-color, #fff) 95%, #f1f1f1); border-radius: var(--promptor-border-radius, 12px); }
.promptor-form-field { margin-bottom: 15px; }
.promptor-form-field label { display: block; font-weight: 500; margin-bottom: 5px; font-size: 14px; }
.promptor-contact-form input[type="text"],
.promptor-contact-form input[type="email"],
.promptor-contact-form input[type="tel"],
.promptor-contact-form textarea { width: 100%; background: var(--promptor-widget-bg-color, #fff); border: 1px solid #ddd; border-radius: 5px; padding: 12px; font-size: 1em; }
.promptor-service-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.promptor-service-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--promptor-primary-color, #0073aa); }

/* ==========================================================================
   6. ANİMASYONLAR VE YARDIMCI SINIFLAR
   ========================================================================== */

@keyframes promptor-fade-in {
    to { opacity: 1; transform: translateY(0); }
}

.typing-indicator span {
    height: 8px; width: 8px; float: left; margin: 0 1px;
    background-color: #9e9e9e;
    display: block; border-radius: 50%; opacity: 0.4;
    animation: promptor-typing-bounce 1s infinite ease-in-out;
}
.typing-indicator span:nth-of-type(2) { animation-delay: 0.15s; }
.typing-indicator span:nth-of-type(3) { animation-delay: 0.3s; }

@keyframes promptor-typing-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

.promptor-success-screen { text-align: center; padding: 40px 20px; animation: promptor-fade-in 0.5s ease-in-out; }
.promptor-success-screen .promptor-success-icon { font-size: 64px; color: #4CAF50; }
.promptor-success-screen h3 { margin: 20px 0 10px; }
/* ==========================================================================
   ARTICLE & FAQ CARDS
   ========================================================================== */

.promptor-article-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

@media (min-width: 600px) {
    .promptor-article-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.promptor-article-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e9e9e9;
    border-radius: calc(var(--promptor-border-radius, 12px) * 0.7);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
}

.promptor-article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.promptor-article-image {
    display: block;
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: #f0f0f1;
}

.promptor-article-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.promptor-article-details {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.promptor-article-title {
    margin: 0 0 8px;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.4;
    color: var(--promptor-ai-text-color, #1d2327);
}

.promptor-article-description {
    font-size: 0.9em;
    color: #555;
    margin: 0;
    flex-grow: 1;
}

.promptor-faq-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.promptor-faq-item {
    border: 1px solid #e9e9e9;
    border-radius: 8px;
    font-size: 15px;
}

.promptor-faq-item summary {
    padding: 12px 15px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    list-style-position: inside;
}

.promptor-faq-item[open] summary {
    border-bottom: 1px solid #e9e9e9;
}

.promptor-faq-content {
    padding: 15px;
    line-height: 1.6;
    color: #333;
}