/* Pulsar Advisor — Signal Advisor Widget v1.7 */

.pa-floating-wrap,
.pa-inline-wrap {
    display: flex;
    flex-direction: column;
    background: #0a0a0a;
    border: 1px solid #333333;
    border-radius: 12px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: #f0ece4;
}

.pa-inline-wrap {
    height: 600px;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
}

.pa-floating-wrap {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 400px;
    height: 580px;
    z-index: 99999;
    box-shadow: 0 8px 40px rgba(0,0,0,0.7), 0 0 0 1px rgba(200,169,110,0.15);
    animation: paSlideUp 0.25s ease;
}

@keyframes paSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Launcher button ---- */
.pa-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px 12px 14px;
    background: #0a0a0a;
    border: 1px solid rgba(200,169,110,0.5);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.pa-launcher:hover { border-color: #c8a96e; box-shadow: 0 4px 24px rgba(200,169,110,0.25); }
.pa-launcher svg { width: 18px; height: 18px; color: #c8a96e; flex-shrink: 0; }
.pa-launcher-label { font-size: 13px; font-weight: 600; letter-spacing: 0.05em; color: #c8a96e; white-space: nowrap; }

/* ---- Header ---- */
.pa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 12px;
    border-bottom: 1px solid #252525;
    flex-shrink: 0;
    background: #0d0d0d;
}
.pa-logo-label { font-size: 10px; font-weight: 600; letter-spacing: 0.2em; color: #c8a96e; text-transform: uppercase; margin-bottom: 3px; }
.pa-logo-name { font-size: 18px; font-weight: 700; color: #f0ece4; line-height: 1; }
.pa-logo-name span { color: #c8a96e; }
.pa-header-right { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: #b0ada8; letter-spacing: 0.03em; }
.pa-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #4a9a6a; box-shadow: 0 0 6px rgba(74,154,106,0.7); flex-shrink: 0; }
.pa-close-btn { background: none; border: none; padding: 2px; cursor: pointer; color: #888480; transition: color 0.15s ease; display: flex; align-items: center; margin-left: 4px; }
.pa-close-btn svg { width: 16px; height: 16px; }
.pa-close-btn:hover { color: #c8a96e; }

/* ---- Chat area ---- */
.pa-chat {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}
.pa-chat::-webkit-scrollbar { width: 4px; }
.pa-chat::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

/* ---- Empty state ---- */
.pa-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; text-align: center; padding: 16px 10px; gap: 10px; }
.pa-empty-icon { width: 38px; height: 38px; color: #c8a96e; margin-bottom: 2px; }
.pa-empty-title { font-size: 15px; font-weight: 700; color: #c8a96e; letter-spacing: 0.02em; }
.pa-empty-sub { font-size: 13px; font-weight: 400; color: #c8c4bc; line-height: 1.65; max-width: 300px; }

/* ---- Chips ---- */
.pa-chips { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-top: 6px; }
.pa-chip {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 7px 14px;
    border: 1px solid #444440;
    border-radius: 100px;
    color: #c8c4bc;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    background: rgba(255,255,255,0.04);
}
.pa-chip:hover { border-color: #c8a96e; color: #f0ece4; background: rgba(200,169,110,0.08); }
.pa-chip-support { border-color: #5a4a30; color: #c8a96e; }
.pa-chip-support:hover { border-color: #c8a96e; color: #f0ece4; background: rgba(200,169,110,0.08); }

/* ---- Messages ---- */
.pa-message { display: flex; flex-direction: column; gap: 4px; max-width: 88%; animation: paFadeIn 0.2s ease; }
@keyframes paFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.pa-message.user { align-self: flex-end; }
.pa-message.assistant { align-self: flex-start; }

.pa-msg-meta { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; color: #888480; text-transform: uppercase; }
.pa-message.user .pa-msg-meta { text-align: right; }

.pa-msg-body {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;
    padding: 12px 15px;
    border-radius: 10px;
    word-break: break-word;
}
.pa-message.user .pa-msg-body { background: #1e1e1e; border: 1px solid #333; color: #f0ece4; }
.pa-message.assistant .pa-msg-body { background: #141414; border: 1px solid rgba(200,169,110,0.2); color: #e4e0d8; }
.pa-msg-body strong { color: #c8a96e; font-weight: 700; }
.pa-msg-body a { color: #c8a96e; text-decoration: underline; text-underline-offset: 2px; }
.pa-msg-body a:hover { color: #e8d4a0; }

.pa-ticket-link {
    display: inline-block; margin-top: 12px; padding: 9px 16px;
    background: rgba(200,169,110,0.1); border: 1px solid #c8a96e; border-radius: 6px;
    color: #c8a96e !important; text-decoration: none !important;
    font-size: 12px; font-weight: 600; letter-spacing: 0.04em; cursor: pointer; transition: background 0.15s ease;
}
.pa-ticket-link:hover { background: rgba(200,169,110,0.18) !important; }

/* ---- Typing indicator ---- */
.pa-typing { display: flex; gap: 5px; align-items: center; padding: 12px 15px; background: #141414; border: 1px solid rgba(200,169,110,0.2); border-radius: 10px; align-self: flex-start; }
.pa-typing-dot { width: 6px; height: 6px; border-radius: 50%; background: #c8a96e; animation: paTyping 1.2s infinite; }
.pa-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.pa-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes paTyping { 0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); } 30% { opacity: 1; transform: scale(1.1); } }

/* ---- Ticket form ---- */
.pa-ticket-form {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: #0a0a0a; padding: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 10; overflow-y: auto;
}
.pa-ticket-title { font-size: 15px; font-weight: 700; color: #c8a96e; letter-spacing: 0.03em; margin-bottom: 2px; }
.pa-ticket-input {
    background: #181818; border: 1px solid #333; border-radius: 7px; padding: 10px 13px;
    color: #f0ece4; font-family: inherit; font-size: 14px; font-weight: 400;
    outline: none; transition: border-color 0.15s ease; width: 100%; box-sizing: border-box;
}
.pa-ticket-input:focus { border-color: #c8a96e; }
.pa-ticket-textarea { resize: vertical; min-height: 90px; }
.pa-ticket-actions { display: flex; gap: 10px; margin-top: 2px; }
.pa-ticket-cancel {
    flex: 1; padding: 10px; background: transparent; border: 1px solid #333; border-radius: 7px;
    color: #b0ada8; font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.15s ease;
}
.pa-ticket-cancel:hover { border-color: #888; color: #f0ece4; }
.pa-ticket-send {
    flex: 2; padding: 10px; background: rgba(200,169,110,0.12); border: 1px solid #c8a96e; border-radius: 7px;
    color: #c8a96e; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s ease;
}
.pa-ticket-send:hover { background: rgba(200,169,110,0.22); }
.pa-ticket-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Input row ---- */
.pa-input-row { display: flex; align-items: flex-end; gap: 9px; padding: 10px 14px; border-top: 1px solid #1e1e1e; flex-shrink: 0; background: #0d0d0d; }
.pa-input {
    flex: 1; background: #1a1a1a; border: 1px solid #333; border-radius: 9px; padding: 10px 14px;
    color: #f0ece4; font-family: inherit; font-size: 14px; font-weight: 400;
    resize: none; outline: none; max-height: 100px; overflow-y: auto; transition: border-color 0.15s ease; line-height: 1.5;
}
.pa-input:focus { border-color: #c8a96e; }
.pa-input::placeholder { color: #666360; font-weight: 400; }
.pa-send-btn {
    width: 36px; height: 36px; background: rgba(200,169,110,0.12); border: 1px solid rgba(200,169,110,0.4);
    border-radius: 9px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.15s ease; flex-shrink: 0; padding: 0;
}
.pa-send-btn svg { width: 14px; height: 14px; color: #c8a96e; }
.pa-send-btn:hover { background: rgba(200,169,110,0.22); border-color: #c8a96e; }
.pa-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- Footer ---- */
.pa-footer { font-size: 11px; font-weight: 500; color: #888480; letter-spacing: 0.04em; text-align: center; padding: 8px 16px 10px; border-top: 1px solid #1a1a1a; flex-shrink: 0; background: #0d0d0d; }
.pa-footer a { color: #b0ada8; text-decoration: none; transition: color 0.15s ease; }
.pa-footer a:hover { color: #c8a96e; }

/* ---- Mobile ---- */
@media (max-width: 480px) {
    .pa-floating-wrap { width: calc(100vw - 16px); height: 72vh; bottom: 78px; right: 8px; left: 8px; }
    .pa-launcher { right: 16px; bottom: 16px; }
}
