/* Sihirli Lamba — Elif yapay zeka asistanı */
.djinni-assistant {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1001;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.djinni-lamp-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.djinni-teaser {
    max-width: 220px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #1a1428 0%, #2d1f4e 100%);
    color: #f5e6c8;
    border-radius: 14px 14px 14px 4px;
    font-size: 13px;
    line-height: 1.45;
    box-shadow: 0 8px 28px rgba(80, 40, 120, 0.45);
    border: 1px solid rgba(198, 156, 109, 0.35);
    opacity: 0;
    transform: translateY(12px) scale(0.92);
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.djinni-teaser.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.djinni-teaser strong {
    display: block;
    color: #e8c97a;
    font-size: 12px;
    margin-bottom: 4px;
}

.djinni-lamp-btn {
    position: relative;
    width: 62px;
    height: 62px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: radial-gradient(circle at 35% 30%, #f4d03f, #c69c6d 45%, #8b6914 100%);
    box-shadow: 0 4px 20px rgba(198, 156, 109, 0.55), 0 0 30px rgba(255, 200, 80, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    padding: 0;
    outline: none;
}

.djinni-lamp-btn:hover,
.djinni-lamp-btn:focus-visible {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(198, 156, 109, 0.7), 0 0 40px rgba(255, 210, 100, 0.4);
}

.djinni-lamp-btn.is-glowing {
    animation: djinni-pulse 2s ease-in-out infinite;
}

@keyframes djinni-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(198, 156, 109, 0.55), 0 0 24px rgba(255, 200, 80, 0.2); }
    50% { box-shadow: 0 6px 32px rgba(198, 156, 109, 0.85), 0 0 48px rgba(255, 220, 120, 0.55); }
}

.djinni-lamp-icon {
    font-size: 32px;
    line-height: 1;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.djinni-smoke {
    position: absolute;
    top: -8px;
    left: 50%;
    width: 8px;
    height: 8px;
    margin-left: -4px;
    border-radius: 50%;
    background: rgba(200, 180, 255, 0.5);
    opacity: 0;
    pointer-events: none;
}

.djinni-lamp-btn.is-glowing .djinni-smoke,
.djinni-lamp-btn:hover .djinni-smoke {
    animation: djinni-smoke 2.5s ease-out infinite;
}

@keyframes djinni-smoke {
    0% { opacity: 0; transform: translateY(0) scale(0.5); }
    20% { opacity: 0.7; }
    100% { opacity: 0; transform: translateY(-36px) scale(2.2); }
}

/* Sohbet paneli */
.djinni-panel {
    position: absolute;
    bottom: 76px;
    left: 0;
    width: 340px;
    max-width: calc(100vw - 48px);
    max-height: min(480px, calc(100vh - 120px));
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #1e1630 0%, #151020 100%);
    border-radius: 16px;
    border: 1px solid rgba(198, 156, 109, 0.3);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 60px rgba(120, 80, 180, 0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.96);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}

.djinni-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.djinni-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(90deg, rgba(198, 156, 109, 0.2), transparent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.djinni-wizard-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6b4c9a, #3d2a5c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(180, 140, 255, 0.4);
}

.djinni-panel-title {
    flex: 1;
    min-width: 0;
}

.djinni-panel-title h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #f5e6c8;
}

.djinni-panel-title span {
    font-size: 11px;
    color: rgba(245, 230, 200, 0.65);
}

.djinni-panel-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #ccc;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.djinni-panel-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.djinni-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 180px;
    max-height: 280px;
}

.djinni-msg {
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
}

.djinni-msg-bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    color: #e8e0f0;
    border-bottom-left-radius: 4px;
}

.djinni-msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #c69c6d, #a67c4d);
    color: #1a1020;
    border-bottom-right-radius: 4px;
}

.djinni-msg-bot a {
    color: #e8c97a;
    text-decoration: underline;
}

.djinni-msg-typing {
    align-self: flex-start;
    padding: 8px 14px;
}

.djinni-msg-typing span {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 2px;
    background: #c69c6d;
    border-radius: 50%;
    animation: djinni-dot 1.2s infinite;
}

.djinni-msg-typing span:nth-child(2) { animation-delay: 0.15s; }
.djinni-msg-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes djinni-dot {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

.djinni-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 10px;
}

.djinni-quick-btn {
    padding: 6px 10px;
    font-size: 11px;
    border: 1px solid rgba(198, 156, 109, 0.45);
    border-radius: 20px;
    background: transparent;
    color: #e8c97a;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.djinni-quick-btn:hover {
    background: rgba(198, 156, 109, 0.25);
    color: #fff;
}

.djinni-input-row {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
}

.djinni-input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(198, 156, 109, 0.35);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #f5f0ff;
    font-size: 13px;
    outline: none;
}

.djinni-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.djinni-input:focus {
    border-color: #c69c6d;
    box-shadow: 0 0 0 2px rgba(198, 156, 109, 0.2);
}

.djinni-send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: #c69c6d;
    color: #1a1020;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.2s;
}

.djinni-send-btn:hover {
    background: #e8c97a;
    transform: scale(1.05);
}

.djinni-wa-cta {
    display: none;
    margin: 0 16px 12px;
    padding: 10px 14px;
    text-align: center;
    background: #25d366;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
}

.djinni-wa-cta.is-visible {
    display: block;
}

.djinni-wa-cta:hover {
    background: #20bd5a;
    color: #fff !important;
    transform: translateY(-1px);
}

.djinni-wa-cta i {
    margin-right: 6px;
}

@media (max-width: 480px) {
    .djinni-assistant {
        bottom: 18px;
        left: 18px;
    }

    .djinni-panel {
        width: calc(100vw - 36px);
        bottom: 70px;
    }

    .djinni-lamp-btn {
        width: 54px;
        height: 54px;
    }

    .djinni-lamp-icon {
        font-size: 28px;
    }

    .djinni-teaser {
        max-width: 200px;
        font-size: 12px;
    }
}
