/* Proxi Assistant - UI Styles */
:root {
    --proxi-bg: #0b0b12;
    --proxi-border: rgba(255, 215, 0, 0.3);
    --proxi-yellow: #FFD700;
    --proxi-text: #fff;
    --proxi-btn-bg: rgba(255, 255, 255, 0.08);
}

#proxi-bubble {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 54px;
    height: 54px;
    border: 2px solid var(--proxi-yellow);
    border-radius: 50%;
    background: rgba(5, 5, 13, 0.95);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 5px rgba(255, 215, 0, 0.08);
    display: grid;
    place-items: center;
    padding: 0;
    cursor: pointer;
    z-index: 10006;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(14px) scale(0.72);
    transition: opacity 0.22s ease, transform 0.24s cubic-bezier(.2,.8,.2,1), visibility 0s linear 0.22s;
}

#proxi-bubble.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
}

#proxi-bubble:hover {
    transform: translateY(-1px) scale(1.04);
}

#proxi-bubble img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: block;
    object-fit: cover;
}

/* Speech Panel */
#proxi-panel {
    position: fixed;
    bottom: 22px;
    right: 88px;
    width: 320px;
    max-width: 90vw;
    max-height: calc(100vh - 40px);
    background: var(--proxi-bg);
    border: 1px solid var(--proxi-border);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    overflow: visible;
    z-index: 10005;
    font-family: inherit;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(10px, 18px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity 0.22s ease, transform 0.22s cubic-bezier(.2,.8,.2,1), visibility 0s linear 0.22s;
}

#proxi-panel::before,
#proxi-panel::after {
    content: "";
    position: absolute;
    right: -12px;
    bottom: 20px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    pointer-events: none;
}

#proxi-panel::before {
    right: -14px;
    border-left: 14px solid var(--proxi-border);
}

#proxi-panel::after {
    border-left: 14px solid var(--proxi-bg);
}

#proxi-panel.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(0, 0) scale(1);
    transition-delay: 0s;
}

.proxi-header {
    background: rgba(255, 215, 0, 0.1);
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 15px 15px 0 0;
}

.proxi-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.proxi-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.proxi-title {
    font-weight: 700;
    color: var(--proxi-yellow);
    font-size: 1rem;
}

.proxi-subtitle {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.72rem;
    margin-top: 2px;
}

.proxi-close {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 1.2rem;
    border-radius: 4px;
}

.proxi-close:hover {
    color: #fff;
}

.proxi-content {
    background: var(--proxi-bg);
    border-radius: 0 0 15px 15px;
    padding: 15px;
    max-height: min(430px, calc(100vh - 126px));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.proxi-content::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.proxi-message {
    font-size: 0.95rem;
    color: #ddd;
    margin-bottom: 15px;
    line-height: 1.5;
}

.proxi-message strong {
    color: #fff;
}

.proxi-message-error {
    border-left: 3px solid #ff6b7a;
    padding-left: 10px;
}

.proxi-message-success {
    border-left: 3px solid #6DFF8B;
    padding-left: 10px;
}

.proxi-topic-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: #fff;
}

.proxi-back {
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    color: #fff;
    padding: 7px 9px;
    cursor: pointer;
    font-size: 0.8rem;
}

.proxi-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.proxi-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 0 14px;
}

.proxi-action-btn {
    min-height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    font-weight: 800;
    font-size: 0.82rem;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.proxi-action-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 215, 0, 0.48);
    background: rgba(255, 215, 0, 0.11);
}

.proxi-action-btn.primary {
    background: var(--proxi-yellow);
    color: #080810;
    border-color: var(--proxi-yellow);
}

.proxi-btn {
    background: var(--proxi-btn-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--proxi-text);
    padding: 10px 12px;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.proxi-btn:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: var(--proxi-yellow);
}

@media (max-width: 560px) {
    #proxi-bubble {
        right: 16px;
        bottom: 16px;
    }

    #proxi-panel {
        right: 12px;
        bottom: 84px;
        width: calc(100vw - 24px);
        max-width: none;
        transform-origin: bottom right;
    }

    #proxi-panel::before,
    #proxi-panel::after {
        right: 26px;
        bottom: -12px;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-top: 14px solid var(--proxi-border);
        border-bottom: 0;
    }

    #proxi-panel::after {
        bottom: -10px;
        border-top-color: var(--proxi-bg);
    }

    .proxi-action-row {
        grid-template-columns: 1fr;
    }
}
