/* =========================================================
   DayıPet Asistanı – Chat Widget Stilleri
   ========================================================= */

/* ---------- Toggle Butonu ---------- */
#dayipet-chat-wrapper {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#dayipet-toggle-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ff7a00 !important;
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(255, 122, 0, 0.45);
    transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
    margin-left: auto;
    padding: 0;
}

#dayipet-toggle-btn:hover {
    background: #e66900 !important;
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(255, 122, 0, 0.55);
}

#dayipet-toggle-btn:focus-visible {
    outline: 3px solid #ffb566;
    outline-offset: 2px;
}

/* ---------- Chat Kutusu ---------- */
#dayipet-chat-box {
    width: 340px;
    max-height: 480px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 12px;
    animation: dayipet-slide-up 0.22s ease;
}

#dayipet-chat-box[hidden] {
    display: none;
}

@keyframes dayipet-slide-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Header ---------- */
#dayipet-chat-header {
    background: #ff7a00 !important;
    color: #ffffff !important;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    flex-shrink: 0;
}

/* ---------- Mesaj Alanı ---------- */
#dayipet-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
    background: #f8fafc;
}

#dayipet-messages::-webkit-scrollbar {
    width: 5px;
}

#dayipet-messages::-webkit-scrollbar-track {
    background: transparent;
}

#dayipet-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* ---------- Mesaj Balonları ---------- */
.dayipet-msg {
    max-width: 80%;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

/* Bot mesajı – sol */
.dayipet-msg.bot {
    background: #e2e8f0;
    color: #1e293b;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

/* Kullanıcı mesajı – sağ */
.dayipet-msg.user {
    background: #ff7a00 !important;
    color: #ffffff !important;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Yazıyor göstergesi */
.dayipet-msg.typing {
    background: #e2e8f0;
    color: #64748b;
    align-self: flex-start;
    font-style: italic;
    border-bottom-left-radius: 4px;
}

/* ---------- Giriş Alanı ---------- */
#dayipet-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    flex-shrink: 0;
}

#dayipet-user-input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 14px;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s;
    background: #f8fafc;
}

#dayipet-user-input:focus {
    border-color: #ff7a00 !important;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 122, 0, 0.15);
}

#dayipet-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ff7a00 !important;
    color: #ffffff !important;
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
    padding: 0;
}

#dayipet-send-btn:hover {
    background: #e66900 !important;
    transform: scale(1.06);
}

#dayipet-send-btn:disabled {
    background: #ffb566 !important;
    cursor: not-allowed;
    transform: none;
}

#dayipet-send-btn:focus-visible {
    outline: 3px solid #ffb566;
    outline-offset: 2px;
}

/* ---------- Ürün Kartları ---------- */
.dayipet-product-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-self: flex-start;
    width: 100%;
    max-width: 92%;
    margin-top: 2px;
}

.dayipet-product-card {
    background: #ffffff;
    border: 1px solid #ffe0c2;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 1px 4px rgba(255, 122, 0, 0.08);
}

.dayipet-product-card__name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

.dayipet-product-card__price {
    font-size: 12px;
    color: #ff7a00;
    font-weight: 700;
}

.dayipet-product-card__btn {
    display: inline-block;
    margin-top: 6px;
    padding: 5px 12px;
    background: #ff7a00 !important;
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none !important;
    text-align: center;
    transition: background 0.2s;
    align-self: flex-start;
}

.dayipet-product-card__btn:link,
.dayipet-product-card__btn:visited {
    background: #ff7a00 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.dayipet-product-card__btn:hover,
.dayipet-product-card__btn:focus {
    background: #e66900 !important;
    color: #ffffff !important;
}

/* ---------- Quick Replies ---------- */
.dayipet-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-self: flex-start;
    margin-top: 2px;
    max-width: 100%;
}

.dayipet-quick-reply-btn {
    border: 1.5px solid #ff7a00;
    background: #ffffff;
    color: #ff7a00;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    padding: 5px 14px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
    font-family: inherit;
}

.dayipet-quick-reply-btn:hover,
.dayipet-quick-reply-btn:focus {
    background: #ff7a00;
    color: #ffffff;
    outline: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 400px) {
    #dayipet-chat-box {
        width: calc(100vw - 32px);
    }

    #dayipet-chat-wrapper {
        bottom: 16px;
        right: 16px;
    }
}
