/**
 * WPSEO Ai - Premium Frontend Widgets Styling
 */

:root {
    --wpseo-accent: #f97316;
    --wpseo-indigo: #6366f1;
    --wpseo-slate-900: #0f172a;
    --wpseo-slate-50: #f8fafc;
    --wpseo-slate-400: #94a3b8;
    --wpseo-shadow: 0 15px 35px -5px rgba(0,0,0,0.1), 0 5px 15px -3px rgba(0,0,0,0.05);
}

.wpseo-floating-widget {
    position: fixed;
    z-index: 999999;
}

.wpseo-floating-widget.bottom-right { bottom: 30px; right: 30px; }
.wpseo-floating-widget.bottom-left { bottom: 30px; left: 30px; }
.wpseo-floating-widget.top-right { top: 30px; right: 30px; }
.wpseo-floating-widget.top-left { top: 30px; left: 30px; }

/* AI Assistant Trigger */
#wpseo-ai-assistant-trigger {
    width: 60px;
    height: 60px;
    background: var(--wpseo-accent);
    box-shadow: var(--wpseo-shadow);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: white;
}

#wpseo-ai-assistant-trigger:hover {
    transform: scale(1.1) rotate(5deg);
}

#wpseo-ai-assistant-trigger svg {
    width: 32px;
    height: 32px;
}

/* Chat Panel */
#wpseo-chat-panel {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 60px);
    height: 500px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    animation: wpseoFadeInUp 0.4s ease-out;
}

@keyframes wpseoFadeInUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.wpseo-chat-header {
    background: var(--wpseo-slate-900);
    padding: 20px;
    color: white;
}

.wpseo-chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

.wpseo-chat-header p {
    margin: 4px 0 0;
    font-size: 11px;
    opacity: 0.6;
}

.wpseo-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f8fafc;
}

.wpseo-msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.wpseo-msg.ai {
    align-self: flex-start;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    color: var(--wpseo-slate-900);
    border-bottom-left-radius: 4px;
}

.wpseo-msg.user {
    align-self: flex-end;
    background: var(--wpseo-accent);
    color: white;
    border-bottom-right-radius: 4px;
}

.wpseo-chat-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

.wpseo-chat-input-area input {
    flex: 1;
    border: none;
    background: #f1f5f9;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
}

.wpseo-chat-input-area button {
    background: var(--wpseo-slate-900);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pulse Widget */
#wpseo-seo-pulse {
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: var(--wpseo-shadow);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.pulse-circle {
    position: relative;
    width: 60px;
    height: 60px;
}

.pulse-circle svg {
    transform: rotate(-90deg);
}

.pulse-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 800;
    font-size: 18px;
    color: var(--wpseo-accent);
}

.pulse-label {
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--wpseo-slate-400);
    margin-top: 10px;
}
