/* ─── Ask AI Widget ─────────────────────────────────────────────── */

/* Animations */
@keyframes askAiPanelIn {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes askAiSparkle {
    0%, 100% { transform: rotate(0deg); }
    25%      { transform: rotate(10deg); }
    75%      { transform: rotate(-10deg); }
}

/* Container */
.ask-ai-widget {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (min-width: 768px) {
    .ask-ai-widget {
        left: 2rem;
    }
}

/* Gradient shared by button & panel */
.ask-ai-widget__gradient {
    background-image: linear-gradient(92.06deg, rgb(94, 106, 184) 42.78%, rgb(43, 122, 191) 100%);
}

/* ─── Panel ──────────────────────────────────────────────────────── */
.ask-ai-widget__panel {
    margin-bottom: 0.75rem;
    min-width: 230px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.07);
    transform-origin: bottom left;
    animation: askAiPanelIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.ask-ai-widget__panel-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ask-ai-widget__panel-title {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #d4d4d8;
}

.ask-ai-widget__badge {
    border-radius: 4px;
    background: rgba(124, 111, 247, 0.2);
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9d93f5;
    display: none; /* shown via JS when tier === custom */
}

.ask-ai-widget__badge--visible {
    display: inline-block;
}

/* ─── AI Option Link ─────────────────────────────────────────────── */
.ask-ai-widget__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #fafafa;
    text-decoration: none;
    transition: color 0.15s, transform 0.1s;
}

.ask-ai-widget__option:hover {
    transform: translateX(2px);
    color: #d4d4d8;
}

.ask-ai-widget__option-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ask-ai-widget__option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
}

.ask-ai-widget__option-icon svg {
    width: 1rem;
    height: 1rem;
}

.ask-ai-widget__option-icon--gpt svg {
    width: 1.25rem;
    height: 1.25rem;
}

.ask-ai-widget__option-external {
    width: 1rem;
    height: 1rem;
    color: #d4d4d8;
    flex-shrink: 0;
}

/* ─── Trigger Button ─────────────────────────────────────────────── */
.ask-ai-widget__btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #fafafa;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.30);
    transform: scale(1);
    transform-origin: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    will-change: transform;
}

.ask-ai-widget__btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.ask-ai-widget__btn:active {
    transform: scale(0.97);
}

.ask-ai-widget__btn-sparkle {
    width: 1rem;
    height: 1rem;
    animation: askAiSparkle 4s linear infinite;
    line-height: 1;
}

.ask-ai-widget__btn-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ask-ai-widget__btn-cta {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
}

.ask-ai-widget__btn-hint {
    font-size: 10px;
    color: #e5e5e5;
    line-height: 1.2;
}

.ask-ai-widget__btn-chevron {
    width: 1rem;
    height: 1rem;
    margin-top: 2px;
    transition: transform 0.2s;
}

.ask-ai-widget__btn-chevron--open {
    transform: rotate(180deg);
}
