/* Phoenix AI Chat Widget */

:root {
    --pcw-primary: #6C63FF;
    --pcw-primary-rgb: 108,99,255;
    --pcw-secondary: #FF6584;
    --pcw-secondary-rgb: 255,101,132;
    --pcw-bg: #FFFFFF;
    --pcw-bg-chat: #F7F8FC;
    --pcw-text: #1F2937;
    --pcw-text-light: #6B7280;
    --pcw-text-muted: #9CA3AF;
    --pcw-border: #E5E7EB;
    --pcw-user-msg: #6C63FF;
    --pcw-user-msg-text: #FFFFFF;
    --pcw-bot-msg: #FFFFFF;
    --pcw-bot-msg-text: #1F2937;
    --pcw-shadow: 0 10px 40px rgba(0,0,0,0.12);
    --pcw-radius: 12px;
    --pcw-width: 380px;
    --pcw-height: 500px;
    --pcw-font: inherit;
    --pcw-btn-size: 60px;
}

/* Dark Mode */
.phoenix-dark {
    --pcw-bg: #1A1B2E;
    --pcw-bg-chat: #12131F;
    --pcw-text: #E5E7EB;
    --pcw-text-light: #9CA3AF;
    --pcw-text-muted: #6B7280;
    --pcw-border: #2D2E42;
    --pcw-bot-msg: #252640;
    --pcw-bot-msg-text: #E5E7EB;
    --pcw-shadow: 0 10px 40px rgba(0,0,0,0.35);
}

/* Width Variants */
.phoenix-width-small { --pcw-width: 320px; }
.phoenix-width-medium { --pcw-width: 380px; }
.phoenix-width-large { --pcw-width: 440px; }

/* Height Variants */
.phoenix-height-short { --pcw-height: 400px; }
.phoenix-height-medium { --pcw-height: 500px; }
.phoenix-height-tall { --pcw-height: 600px; }

/* Border Radius Variants */
.phoenix-radius-sharp { --pcw-radius: 4px; }
.phoenix-radius-rounded { --pcw-radius: 16px; }
.phoenix-radius-pill { --pcw-radius: 24px; }

/* ==================== */
/*   FLOATING BUTTON    */
/* ==================== */
.pcw-float-btn {
    position: fixed;
    bottom: 24px;
    z-index: 999998;
    width: var(--pcw-btn-size);
    height: var(--pcw-btn-size);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.pcw-float-btn:hover {
    transform: scale(1.1);
}

.pcw-float-btn:active {
    transform: scale(0.95);
}

/* Position */
.pcw-position-bottom-right .pcw-float-btn { right: 24px; }
.pcw-position-bottom-left .pcw-float-btn { left: 24px; }
.pcw-position-bottom-right .pcw-chat-window { right: 24px; }
.pcw-position-bottom-left .pcw-chat-window { left: 24px; }

/* Button Icon */
.pcw-float-btn svg {
    width: 28px;
    height: 28px;
    fill: white;
    transition: transform 0.3s ease;
}

.pcw-float-btn.open .pcw-main-icon svg {
    transform: rotate(90deg) scale(0);
    opacity: 0;
}

.pcw-float-btn .pcw-close-icon {
    position: absolute;
    transform: rotate(-90deg) scale(0);
    opacity: 0;
    transition: all 0.3s ease;
}

.pcw-float-btn.open .pcw-close-icon {
    transform: rotate(0) scale(1);
    opacity: 1;
}

/* ======================== */
/*   BUTTON STYLE: Glass    */
/* ======================== */
.pcw-style-glassmorphism .pcw-float-btn {
    background: rgba(var(--pcw-primary-rgb), 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: 0 8px 32px rgba(var(--pcw-primary-rgb), 0.25);
}

.pcw-style-glassmorphism .pcw-float-btn:hover {
    background: rgba(var(--pcw-primary-rgb), 0.6);
    box-shadow: 0 8px 40px rgba(var(--pcw-primary-rgb), 0.35);
}

/* ========================== */
/*   BUTTON STYLE: Gradient   */
/* ========================== */
.pcw-style-gradient-glow .pcw-float-btn {
    background: linear-gradient(135deg, var(--pcw-primary) 0%, var(--pcw-secondary) 100%);
    box-shadow: 0 4px 24px rgba(var(--pcw-primary-rgb), 0.4),
                0 8px 32px rgba(var(--pcw-secondary-rgb), 0.2);
}

.pcw-style-gradient-glow .pcw-float-btn:hover {
    box-shadow: 0 6px 32px rgba(var(--pcw-primary-rgb), 0.5),
                0 12px 40px rgba(var(--pcw-secondary-rgb), 0.3);
}

/* ======================== */
/*   BUTTON STYLE: Neon     */
/* ======================== */
.pcw-style-neon-pulse .pcw-float-btn {
    background: #0F0F23;
    border: 2px solid var(--pcw-primary);
    box-shadow: 0 0 20px rgba(var(--pcw-primary-rgb), 0.5),
                0 0 40px rgba(var(--pcw-primary-rgb), 0.2),
                inset 0 0 20px rgba(var(--pcw-primary-rgb), 0.1);
}

.pcw-style-neon-pulse .pcw-float-btn:hover {
    box-shadow: 0 0 30px rgba(var(--pcw-primary-rgb), 0.7),
                0 0 60px rgba(var(--pcw-primary-rgb), 0.3),
                inset 0 0 30px rgba(var(--pcw-primary-rgb), 0.15);
}

/* ============================ */
/*   BUTTON STYLE: Minimal      */
/* ============================ */
.pcw-style-minimal .pcw-float-btn {
    background: var(--pcw-primary);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.pcw-style-minimal .pcw-float-btn:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}

/* ============================ */
/*   BUTTON STYLE: 3D Float     */
/* ============================ */
.pcw-style-float-3d .pcw-float-btn {
    background: linear-gradient(145deg, var(--pcw-primary), rgba(var(--pcw-primary-rgb), 0.8));
    box-shadow: 6px 6px 20px rgba(var(--pcw-primary-rgb), 0.35),
                -3px -3px 15px rgba(255,255,255,0.15);
    transform: perspective(400px) rotateX(5deg) rotateY(-5deg);
}

.pcw-style-float-3d .pcw-float-btn:hover {
    transform: perspective(400px) rotateX(0deg) rotateY(0deg) scale(1.1);
    box-shadow: 8px 8px 30px rgba(var(--pcw-primary-rgb), 0.45),
                -4px -4px 20px rgba(255,255,255,0.2);
}

/* ============================ */
/*   BUTTON STYLE: Blob         */
/* ============================ */
.pcw-style-blob .pcw-float-btn {
    background: linear-gradient(135deg, var(--pcw-primary), rgba(var(--pcw-primary-rgb), 0.7));
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: pcwBlobMorph 8s ease-in-out infinite;
    box-shadow: 0 8px 24px rgba(var(--pcw-primary-rgb), 0.3);
}

@keyframes pcwBlobMorph {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50% { border-radius: 50% 60% 30% 50% / 40% 50% 60% 50%; }
    75% { border-radius: 40% 50% 60% 40% / 60% 40% 50% 60%; }
}

.pcw-style-blob .pcw-float-btn:hover {
    animation-play-state: paused;
    border-radius: 50%;
}

/* ======================== */
/*   BUTTON ANIMATIONS      */
/* ======================== */
.pcw-anim-pulse .pcw-float-btn:not(.open) {
    animation: pcwPulse 2s ease-in-out infinite;
}

@keyframes pcwPulse {
    0%, 100% { box-shadow: 0 4px 24px rgba(var(--pcw-primary-rgb), 0.3); }
    50% { box-shadow: 0 4px 36px rgba(var(--pcw-primary-rgb), 0.55); }
}

.pcw-anim-bounce .pcw-float-btn:not(.open) {
    animation: pcwBounce 2s ease infinite;
}

@keyframes pcwBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-12px); }
    60% { transform: translateY(-6px); }
}

.pcw-anim-shake .pcw-float-btn:not(.open) {
    animation: pcwShake 3s ease-in-out infinite;
}

@keyframes pcwShake {
    0%, 100% { transform: rotate(0deg); }
    5% { transform: rotate(8deg); }
    10% { transform: rotate(-8deg); }
    15% { transform: rotate(5deg); }
    20% { transform: rotate(-5deg); }
    25%, 100% { transform: rotate(0deg); }
}

.pcw-anim-glow .pcw-float-btn:not(.open) {
    animation: pcwGlow 2.5s ease-in-out infinite;
}

@keyframes pcwGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.25); }
}

/* Notification Badge */
.pcw-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: #EF4444;
    border-radius: 50%;
    border: 2px solid white;
    display: none;
}

.pcw-badge.show {
    display: block;
    animation: pcwBadgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pcwBadgePop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* ==================== */
/*   CHAT WINDOW        */
/* ==================== */
.pcw-chat-window {
    position: fixed;
    bottom: 96px;
    z-index: 999999;
    width: var(--pcw-width);
    height: var(--pcw-height);
    max-height: calc(100vh - 120px);
    background: var(--pcw-bg);
    border-radius: var(--pcw-radius);
    box-shadow: var(--pcw-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: var(--pcw-font);
    direction: rtl;
}

.pcw-chat-window.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Header */
.pcw-header {
    background: linear-gradient(135deg, var(--pcw-primary) 0%, var(--pcw-secondary) 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.pcw-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: pcwHeaderShimmer 8s linear infinite;
}

@keyframes pcwHeaderShimmer {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.pcw-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 1;
}

.pcw-avatar svg {
    width: 22px;
    height: 22px;
    fill: white;
}

.pcw-header-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.pcw-bot-name {
    font-size: 15px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.pcw-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: rgba(255,255,255,0.8);
    margin-top: 2px;
}

.pcw-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34D399;
    animation: pcwPulseDot 2s infinite;
}

.pcw-status-dot.offline {
    background: #F87171;
    animation: none;
}

@keyframes pcwPulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.pcw-header-close {
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.pcw-header-close:hover {
    background: rgba(255,255,255,0.3);
}

.pcw-header-close svg {
    width: 16px;
    height: 16px;
    fill: white;
}

/* Messages Area */
.pcw-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--pcw-bg-chat);
    scroll-behavior: smooth;
}

.pcw-messages::-webkit-scrollbar {
    width: 4px;
}

.pcw-messages::-webkit-scrollbar-track {
    background: transparent;
}

.pcw-messages::-webkit-scrollbar-thumb {
    background: var(--pcw-border);
    border-radius: 4px;
}

/* Message Bubbles */
.pcw-message {
    display: flex;
    gap: 8px;
    max-width: 88%;
    animation: pcwMsgIn 0.3s ease;
}

@keyframes pcwMsgIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pcw-message-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.pcw-message-bot {
    align-self: flex-start;
}

.pcw-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pcw-primary), var(--pcw-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 4px;
}

.pcw-msg-avatar svg {
    width: 14px;
    height: 14px;
    fill: white;
}

.pcw-message-user .pcw-msg-avatar {
    background: var(--pcw-text-muted);
}

.pcw-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.7;
    word-wrap: break-word;
    position: relative;
}

[dir="rtl"] .pcw-msg-content,
[dir="rtl"] .pcw-bubble {
    direction: rtl;
    text-align: right;
}

[dir="ltr"] .pcw-msg-content,
[dir="ltr"] .pcw-bubble {
    direction: ltr;
    text-align: left;
}

.pcw-message-user .pcw-bubble {
    background: var(--pcw-user-msg);
    color: var(--pcw-user-msg-text);
    border-bottom-left: 4px;
}

.pcw-message-bot .pcw-bubble {
    background: var(--pcw-bot-msg);
    color: var(--pcw-bot-msg-text);
    border-bottom-right: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.pcw-bubble a {
    color: var(--pcw-primary);
    text-decoration: underline;
    font-weight: 500;
}

.pcw-message-user .pcw-bubble a {
    color: white;
}

.pcw-bubble p {
    margin: 0 0 6px;
}

.pcw-bubble p:last-child {
    margin-bottom: 0;
}

.pcw-bubble code {
    background: rgba(0,0,0,0.08);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 12px;
}

.pcw-bubble ul, .pcw-bubble ol {
    margin: 4px 0;
    padding-right: 18px;
}

.pcw-msg-content {
    min-width: 0;
}

.pcw-bot-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.pcw-msg-time {
    display: none;
}

/* Feedback buttons */
.pcw-feedback {
    display: flex;
    flex-direction: row;
    gap: 4px;
    margin-top: 2px;
    flex: 0 0 auto;
    align-self: flex-start;
}

.pcw-feedback button {
    width: 22px;
    height: 22px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--pcw-border);
    border-radius: 999px;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    transition: all 0.2s;
    opacity: 0.5;
}

.pcw-feedback button i {
    font-size: 11px;
    line-height: 1;
    pointer-events: none;
}

.pcw-feedback button:hover {
    opacity: 1;
    border-color: var(--pcw-primary);
}

.pcw-feedback button.active {
    opacity: 1;
    background: rgba(var(--pcw-primary-rgb), 0.1);
    border-color: var(--pcw-primary);
}

/* Typing Indicator */
.pcw-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    max-width: 88%;
}

.pcw-typing-dots {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--pcw-bot-msg);
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.pcw-typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pcw-text-muted);
    animation: pcwTypingDot 1.4s ease-in-out infinite;
}

.pcw-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.pcw-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pcwTypingDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Suggestion Chips */
.pcw-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 12px;
    background: var(--pcw-bg-chat);
    justify-content: flex-start;
}

.pcw-chip {
    padding: 6px 14px;
    background: var(--pcw-bg);
    border: 1.5px solid var(--pcw-border);
    border-radius: 20px;
    font-size: 12px;
    font-family: var(--pcw-font);
    color: var(--pcw-text);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-align: start;
}

[dir="rtl"] .pcw-suggestions {
    direction: rtl;
    justify-content: flex-start;
}

[dir="ltr"] .pcw-suggestions {
    direction: ltr;
    justify-content: flex-start;
}

.pcw-chip:hover {
    border-color: var(--pcw-primary);
    color: var(--pcw-primary);
    background: rgba(var(--pcw-primary-rgb), 0.05);
    transform: translateY(-1px);
}

/* Contact Cards */
.pcw-contact-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.pcw-contact-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(var(--pcw-primary-rgb), 0.08);
    border: 1px solid rgba(var(--pcw-primary-rgb), 0.15);
    border-radius: 10px;
    text-decoration: none;
    font-size: 12.5px;
    color: var(--pcw-text);
    transition: all 0.2s;
    font-family: var(--pcw-font);
}

.pcw-contact-card:hover {
    background: rgba(var(--pcw-primary-rgb), 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--pcw-primary-rgb), 0.15);
}

.pcw-contact-card svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Input Area */
.pcw-input-area {
    padding: 12px 16px;
    border-top: 1px solid var(--pcw-border);
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: var(--pcw-bg);
    flex-shrink: 0;
}

.pcw-input-wrap {
    flex: 1;
    position: relative;
}

.pcw-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--pcw-border);
    border-radius: 12px;
    font-family: var(--pcw-font);
    font-size: 13.5px;
    color: var(--pcw-text);
    background: var(--pcw-bg-chat);
    resize: none;
    max-height: 100px;
    min-height: 42px;
    line-height: 1.5;
    direction: rtl;
    outline: none;
    transition: border-color 0.2s;
}

.pcw-input:focus {
    border-color: var(--pcw-primary);
}

.pcw-input::placeholder {
    color: var(--pcw-text-muted);
}

.pcw-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--pcw-primary), var(--pcw-secondary));
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    flex-shrink: 0;
}

.pcw-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(var(--pcw-primary-rgb), 0.35);
}

.pcw-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pcw-send-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
    transform: rotate(180deg);
}

/* Powered by */
.pcw-powered {
    text-align: center;
    padding: 6px;
    font-size: 10px;
    color: var(--pcw-text-muted);
    background: var(--pcw-bg);
    border-top: 1px solid var(--pcw-border);
}

/* ==================== */
/*   MOBILE FULLSCREEN  */
/* ==================== */
@media (max-width: 480px) {
    .pcw-chat-window {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        z-index: 999999;
    }

    .pcw-chat-window.visible {
        transform: none;
    }

    .pcw-float-btn {
        bottom: 16px;
    }

    .pcw-position-bottom-right .pcw-float-btn { right: 16px; }
    .pcw-position-bottom-left .pcw-float-btn { left: 16px; }
}

/* ==================== */
/*   WELCOME ANIMATION  */
/* ==================== */
.pcw-welcome-anim .pcw-bubble {
    overflow: hidden;
}

.pcw-welcome-anim .pcw-bubble .pcw-text-char {
    display: inline-block;
    opacity: 0;
    animation: pcwTypeChar 0.03s forwards;
}

@keyframes pcwTypeChar {
    to { opacity: 1; }
}

/* Error Message */
.pcw-error-msg {
    text-align: center;
    padding: 12px;
    margin: 8px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 10px;
    color: #DC2626;
    font-size: 13px;
}

.phoenix-dark .pcw-error-msg {
    background: #2D1B1B;
    border-color: #5C2020;
}

/* Markdown content */
.pcw-bubble strong { font-weight: 700; }
.pcw-bubble em { font-style: italic; }
.pcw-bubble h1, .pcw-bubble h2, .pcw-bubble h3 {
    font-size: 14px;
    font-weight: 700;
    margin: 8px 0 4px;
}

.pcw-bubble pre {
    background: rgba(0,0,0,0.06);
    padding: 8px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 12px;
    direction: ltr;
    text-align: left;
}

/* Connection Error Banner */
.pcw-connection-error {
    padding: 10px 16px;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    color: #92400E;
    font-size: 12px;
    text-align: center;
    display: none;
    flex-shrink: 0;
}

.pcw-connection-error.show {
    display: block;
}

/* ======================= */
/*   ENHANCED ANIMATIONS   */
/* ======================= */

/* Chat Window Open Entrance */
.pcw-chat-window.visible .pcw-header {
    animation: pcwHeaderIn 0.5s ease;
}

@keyframes pcwHeaderIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pcw-chat-window.visible .pcw-messages {
    animation: pcwBodyIn 0.5s ease 0.1s both;
}

@keyframes pcwBodyIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pcw-chat-window.visible .pcw-input-area {
    animation: pcwInputIn 0.4s ease 0.2s both;
}

@keyframes pcwInputIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Message Slide In */
.pcw-message-bot {
    animation: pcwSlideRight 0.35s cubic-bezier(0.22, 0.61, 0.36, 1) !important;
}

.pcw-message-user {
    animation: pcwSlideLeft 0.35s cubic-bezier(0.22, 0.61, 0.36, 1) !important;
}

@keyframes pcwSlideRight {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pcwSlideLeft {
    from { opacity: 0; transform: translateX(-16px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Chip Hover Ripple */
.pcw-chip {
    position: relative;
    overflow: hidden;
}

.pcw-chip::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(var(--pcw-primary-rgb), 0.1);
    border-radius: 50%;
    transition: width 0.4s, height 0.4s, top 0.4s, left 0.4s;
}

.pcw-chip:hover::after {
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
}

/* Send Button Pulse on Enabled */
.pcw-send-btn:not(:disabled) {
    animation: pcwSendReady 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pcwSendReady {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

/* Floating Button Entrance */
.pcw-float-btn {
    animation: pcwBtnEntrance 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes pcwBtnEntrance {
    from { opacity: 0; transform: scale(0) translateY(40px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Notification Badge Pulse */
.pcw-badge.show {
    animation: pcwBadgePulse 1.5s infinite;
}

@keyframes pcwBadgePulse {
    0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
    70% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* ================================ */
/*   FLOAT BUTTON SURFACE           */
/* ================================ */
.pcw-float-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: #FFFFFF;
    overflow: visible;
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease,
        background-color 0.22s ease,
        filter 0.22s ease;
}

.pcw-float-btn::after {
    content: '';
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22C55E;
    pointer-events: none;
    box-shadow:
        0 0 0 0 rgba(34, 197, 94, 0.55),
        0 0 14px rgba(34, 197, 94, 0.55);
    animation: pcwFloatingOnline 1.7s ease-in-out infinite;
}

.pcw-float-btn.is-offline::after {
    background: #F87171;
    box-shadow: none;
    animation: none;
}

@keyframes pcwFloatingOnline {
    0%, 100% {
        opacity: 1;
        box-shadow:
            0 0 0 0 rgba(34, 197, 94, 0.55),
            0 0 14px rgba(34, 197, 94, 0.55);
    }
    50% {
        opacity: 0.42;
        box-shadow:
            0 0 0 7px rgba(34, 197, 94, 0),
            0 0 18px rgba(34, 197, 94, 0.34);
    }
}

.pcw-float-btn:hover {
    transform: translateY(-2px);
}

.pcw-float-btn:active {
    transform: translateY(0) scale(0.97);
}

.pcw-float-btn.open {
    filter: brightness(0.96);
}

.pcw-main-icon,
.pcw-close-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.pcw-float-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    stroke: currentColor;
}

.pcw-anim-pulse .pcw-float-btn:not(.open) {
    animation: pcwBtnEntrance 0.45s ease-out both, pcwPulse 2s 0.45s ease-in-out infinite;
}

.pcw-anim-bounce .pcw-float-btn:not(.open) {
    animation: pcwBtnEntrance 0.45s ease-out both, pcwBounce 2s 0.45s ease 0.45s infinite;
}

.pcw-anim-shake .pcw-float-btn:not(.open) {
    animation: pcwBtnEntrance 0.45s ease-out both, pcwShake 3s ease-in-out 0.45s infinite;
}

.pcw-anim-glow .pcw-float-btn:not(.open) {
    animation: pcwBtnEntrance 0.45s ease-out both, pcwGlow 2.5s ease-in-out 0.45s infinite;
}

.pcw-style-blob .pcw-float-btn:not(.open) {
    animation: pcwBtnEntrance 0.45s ease-out both, pcwBlobMorph 8s ease-in-out 0.45s infinite;
}

.pcw-badge {
    top: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    border: 2px solid #FFFFFF;
    box-shadow: none;
}

.pcw-badge.show {
    animation: none;
}

/* Dark Mode Specific Enhancements */
.phoenix-dark .pcw-header {
    background: linear-gradient(135deg, rgba(var(--pcw-primary-rgb), 0.8), rgba(var(--pcw-secondary-rgb), 0.6));
}

.phoenix-dark .pcw-chip {
    background: var(--pcw-border);
    border-color: rgba(255,255,255,0.08);
    color: var(--pcw-text);
}

.phoenix-dark .pcw-chip:hover {
    background: rgba(var(--pcw-primary-rgb), 0.2);
    border-color: var(--pcw-primary);
}

.phoenix-dark .pcw-input {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: var(--pcw-text);
}

.phoenix-dark .pcw-input:focus {
    border-color: var(--pcw-primary);
    box-shadow: 0 0 0 2px rgba(var(--pcw-primary-rgb), 0.2);
}

.phoenix-dark .pcw-contact-card {
    background: rgba(var(--pcw-primary-rgb), 0.12);
    border-color: rgba(var(--pcw-primary-rgb), 0.2);
    color: var(--pcw-text);
}

.phoenix-dark .pcw-message-bot .pcw-bubble {
    background: var(--pcw-bot-msg);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.phoenix-dark .pcw-powered {
    background: var(--pcw-bg);
    border-color: var(--pcw-border);
    color: var(--pcw-text-muted);
}

.phoenix-dark .pcw-connection-error {
    background: linear-gradient(135deg, #451a03, #78350f);
    color: #FDE68A;
}

/* Header Pattern Overlay */
.pcw-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

/* Smooth Input Transition */
.pcw-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, height 0.15s ease;
}

.pcw-input:focus {
    box-shadow: 0 0 0 3px rgba(var(--pcw-primary-rgb), 0.12);
}

/* Feedback Hover Enhancement */
.pcw-feedback button {
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pcw-feedback button:hover {
    transform: scale(1.06);
}

/* Contact Card Hover Gradient */
.pcw-contact-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(var(--pcw-primary-rgb), 0) 0%, rgba(var(--pcw-primary-rgb), 0.08) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.pcw-contact-card {
    position: relative;
    overflow: hidden;
}

.pcw-contact-card:hover::before {
    opacity: 1;
}

/* Scroll Shadow Indicators */
.pcw-messages {
    background:
        linear-gradient(var(--pcw-bg-chat) 30%, transparent) top,
        linear-gradient(transparent, var(--pcw-bg-chat) 70%) bottom;
    background-size: 100% 20px;
    background-repeat: no-repeat;
    background-attachment: local;
}

/* ======================== */
/*   RTL/LTR ADAPTATIONS   */
/* ======================== */
[dir="ltr"] .pcw-message-user { flex-direction: row-reverse; }
[dir="ltr"] .pcw-input { direction: ltr; text-align: left; }
[dir="ltr"] .pcw-bubble ul, [dir="ltr"] .pcw-bubble ol {
    padding-right: 0;
    padding-left: 18px;
}
[dir="ltr"] .pcw-send-btn svg { transform: rotate(0deg); }

[dir="rtl"] .pcw-message-user { flex-direction: row-reverse; }
[dir="rtl"] .pcw-send-btn svg { transform: rotate(180deg); }

/* Status Text for different languages */
[dir="ltr"] .pcw-status { direction: ltr; }
[dir="rtl"] .pcw-status { direction: rtl; }

/* ===================================== */
/*   CHAT WINDOW: Minimal White Widget   */
/* ===================================== */
.pcw-chat-window {
    background: #FFFFFF;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 24px;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.12),
        0 4px 18px rgba(15, 23, 42, 0.06);
}

.pcw-chat-window .pcw-header {
    background: #FFFFFF;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    gap: 10px;
}

.pcw-chat-window .pcw-header::before,
.pcw-chat-window .pcw-header::after {
    content: none;
}

.pcw-chat-window .pcw-avatar {
    width: 36px;
    height: 36px;
    background: #F8FAFC;
    border: 1px solid rgba(15, 23, 42, 0.08);
    backdrop-filter: none;
}

.pcw-chat-window .pcw-avatar svg {
    width: 18px;
    height: 18px;
    fill: #0F172A;
}

.pcw-chat-window .pcw-bot-name {
    color: #0F172A;
    font-size: 14px;
    font-weight: 600;
}

.pcw-chat-window .pcw-status {
    color: #64748B;
    font-size: 11px;
    margin-top: 3px;
}

.pcw-chat-window .pcw-status-dot {
    width: 6px;
    height: 6px;
    background: #22C55E;
    animation: none;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

.pcw-chat-window .pcw-status-dot.offline {
    background: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.pcw-chat-window .pcw-header-close {
    width: 30px;
    height: 30px;
    background: #FFFFFF;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: none;
}

.pcw-chat-window .pcw-header-close:hover {
    background: #F8FAFC;
    border-color: rgba(15, 23, 42, 0.12);
}

.pcw-chat-window .pcw-header-close svg {
    fill: #0F172A;
}

.pcw-chat-window .pcw-messages {
    background: #FAFBFC;
    background-image: none;
    padding: 16px;
    gap: 12px;
}

.pcw-chat-window .pcw-msg-avatar {
    width: 26px;
    height: 26px;
    margin-top: 2px;
    background: #FFFFFF;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.pcw-chat-window .pcw-msg-avatar svg {
    width: 13px;
    height: 13px;
    fill: #0F172A;
}

.pcw-chat-window .pcw-message-user .pcw-msg-avatar {
    background: #0F172A;
    border-color: #0F172A;
}

.pcw-chat-window .pcw-message-user .pcw-msg-avatar svg {
    fill: #FFFFFF;
}

.pcw-chat-window .pcw-bubble {
    padding: 11px 14px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: none;
}

.pcw-chat-window .pcw-message-user .pcw-bubble {
    background: #0F172A;
    color: #FFFFFF;
    border-color: #0F172A;
}

.pcw-chat-window .pcw-message-bot .pcw-bubble {
    background: #FFFFFF;
    color: #0F172A;
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.pcw-chat-window .pcw-feedback button {
    background: #FFFFFF;
    border-color: rgba(15, 23, 42, 0.1);
    opacity: 0.72;
}

.pcw-chat-window .pcw-feedback button:hover,
.pcw-chat-window .pcw-feedback button.active {
    opacity: 1;
    background: #F8FAFC;
    border-color: rgba(15, 23, 42, 0.16);
}

.pcw-chat-window .pcw-typing-dots {
    background: #FFFFFF;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: none;
}

.pcw-chat-window .pcw-suggestions {
    background: #FFFFFF;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
    padding: 12px 16px 0;
}

.pcw-chat-window .pcw-chip {
    padding: 7px 13px;
    background: #FFFFFF;
    border: 1px solid rgba(15, 23, 42, 0.1);
    color: #334155;
    box-shadow: none;
}

.pcw-chat-window .pcw-chip::after {
    content: none;
}

.pcw-chat-window .pcw-chip:hover {
    background: #F8FAFC;
    border-color: rgba(15, 23, 42, 0.16);
    color: #0F172A;
    transform: translateY(-1px);
}

.pcw-chat-window .pcw-input-area {
    background: #FFFFFF;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    padding: 14px 16px;
    gap: 10px;
}

.pcw-chat-window .pcw-input-wrap {
    background: #F8FAFC;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.pcw-chat-window .pcw-input-wrap:focus-within {
    background: #FFFFFF;
    border-color: rgba(15, 23, 42, 0.16);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.04);
}

.pcw-chat-window .pcw-input {
    background: transparent;
    border: none;
    box-shadow: none;
    min-height: 44px;
    padding: 11px 14px;
    color: #0F172A;
}

.pcw-chat-window .pcw-input:focus {
    box-shadow: none;
}

.pcw-chat-window .pcw-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #FFFFFF;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: none;
    color: #0F172A;
}

.pcw-chat-window .pcw-send-btn:hover {
    background: #F8FAFC;
    border-color: rgba(15, 23, 42, 0.16);
    box-shadow: none;
    transform: translateY(-1px);
}

.pcw-chat-window .pcw-send-btn:disabled {
    background: #F8FAFC;
    border-color: rgba(15, 23, 42, 0.06);
    opacity: 0.55;
}

.pcw-chat-window .pcw-send-btn svg {
    fill: #0F172A;
    stroke: #0F172A;
}

.pcw-chat-window .pcw-powered {
    background: #FFFFFF;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    color: #94A3B8;
    padding: 8px;
}

.pcw-chat-window .pcw-connection-error {
    margin: 12px 16px 0;
    background: #FFF7ED;
    color: #9A3412;
    border: 1px solid #FED7AA;
    border-radius: 14px;
}

/* ======================== */
/*   HERO SHORTCODE UI      */
/* ======================== */

.pcw-hero-root {
    position: relative;
    display: block;
    font-family: var(--pcw-font);
    color: #FFFFFF;
    --pcw-liquid-fill: rgba(255, 255, 255, 0.08);
    --pcw-liquid-fill-strong: rgba(255, 255, 255, 0.12);
    --pcw-liquid-stroke: rgba(255, 255, 255, 0.34);
    --pcw-liquid-stroke-strong: rgba(255, 255, 255, 0.58);
    --pcw-liquid-highlight: rgba(255, 255, 255, 0.78);
    --pcw-liquid-shadow: rgba(7, 14, 28, 0.42);
    --pcw-liquid-shadow-soft: rgba(7, 14, 28, 0.2);
}

.pcw-hero-root,
.pcw-hero-root * {
    box-sizing: border-box;
}

.pcw-hero-shell {
    position: relative;
    min-height: var(--phoenix-hero-min-height, 420px);
    padding: clamp(18px, 4vw, 30px) 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcw-liquid-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.pcw-hero-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 940px);
    gap: 16px;
}

.pcw-hero-copy {
    width: min(100%, 820px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #FFFFFF;
}

[dir="rtl"] .pcw-hero-copy {
    text-align: right;
}

[dir="ltr"] .pcw-hero-copy {
    text-align: left;
}

.pcw-hero-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
}

.pcw-hero-title {
    margin: 0;
    font-size: clamp(28px, 5vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: #FFFFFF;
}

.pcw-hero-subtitle {
    margin: 0;
    font-size: clamp(14px, 2vw, 18px);
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.78);
    max-width: 60ch;
}

.pcw-hero-note {
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.68);
}

.pcw-hero-composer {
    width: min(100%, 820px);
}

.pcw-liquid-card,
.pcw-liquid-pill {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.pcw-liquid-card::before,
.pcw-liquid-card::after,
.pcw-liquid-pill::before,
.pcw-liquid-pill::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}

.pcw-liquid-card::before,
.pcw-liquid-pill::before {
    z-index: 1;
}

.pcw-liquid-card::after,
.pcw-liquid-pill::after {
    z-index: 0;
    overflow: hidden;
    isolation: isolate;
    -webkit-backdrop-filter: blur(0px);
    backdrop-filter: blur(0px);
}

.pcw-liquid-card::after {
    -webkit-filter: url(#pcw-liquid-panel-filter);
    filter: url(#pcw-liquid-panel-filter);
}

.pcw-liquid-pill::after {
    -webkit-filter: url(#pcw-liquid-chip-filter);
    filter: url(#pcw-liquid-chip-filter);
}

.pcw-liquid-card > *,
.pcw-liquid-pill > * {
    position: relative;
    z-index: 2;
}

.pcw-hero-composer-frame {
    padding: 18px 18px 14px;
    border-radius: 34px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 28px 54px -34px var(--pcw-liquid-shadow),
        0 10px 20px -18px var(--pcw-liquid-shadow-soft);
}

.pcw-hero-composer-frame::before {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035) 40%, rgba(255, 255, 255, 0.025)),
        radial-gradient(120% 110% at 14% 0%, rgba(255, 255, 255, 0.22), transparent 40%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
    box-shadow:
        inset 2px 2px 0px -2px var(--pcw-liquid-highlight),
        inset 0 0 3px 1px rgba(255, 255, 255, 0.52),
        inset -12px -18px 24px rgba(255, 255, 255, 0.015);
}

.pcw-hero-inline-thread {
    display: none;
}

.pcw-hero-root.pcw-hero-has-messages .pcw-hero-inline-thread {
    display: block;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.pcw-hero-input-wrap {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    gap: 10px;
    padding: 14px 18px 12px;
    border-radius: 24px;
    background: rgba(9, 16, 28, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    backdrop-filter: blur(18px) saturate(135%);
    box-shadow: 0 12px 22px -18px rgba(7, 14, 28, 0.34);
    transition: box-shadow 0.24s ease, border-color 0.24s ease, background-color 0.24s ease;
}

.pcw-intro-ring {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    opacity: 0;
}

.pcw-intro-ring svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.pcw-intro-ring rect {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    stroke-dashoffset: var(--pcw-dash-start, -8);
}

.pcw-intro-ring .pcw-intro-ring-glow {
    opacity: 0.18;
    filter: blur(1.6px) drop-shadow(0 0 10px rgba(255, 255, 255, 0.14));
}

.pcw-intro-ring .pcw-intro-ring-soft {
    opacity: 0.5;
    filter: blur(0.35px);
}

.pcw-intro-ring .pcw-intro-ring-core {
    opacity: 1;
}

.pcw-intro-ring.is-active {
    animation: pcwHeroIntroRingFade var(--pcw-intro-duration, 1200ms) linear forwards;
}

.pcw-intro-ring.is-active rect {
    animation: pcwHeroIntroRingDash var(--pcw-intro-duration, 1200ms) linear forwards;
}

@keyframes pcwHeroIntroRingFade {
    0% {
        opacity: 0;
    }
    6% {
        opacity: 1;
    }
    64% {
        opacity: 1;
    }
    78% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

@keyframes pcwHeroIntroRingDash {
    0% {
        stroke-dashoffset: var(--pcw-dash-start, -8);
    }
    100% {
        stroke-dashoffset: var(--pcw-dash-end, -208);
    }
}

.pcw-hero-input {
    min-height: 58px;
    max-height: 140px;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    color: #FFFFFF;
    caret-color: #FFFFFF;
    font-size: clamp(16px, 2.1vw, 22px);
    font-weight: 400;
    line-height: 1.75;
    box-shadow: none;
    text-align: right !important;
    direction: rtl !important;
    unicode-bidi: plaintext;
    resize: none;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.18);
}

.pcw-hero-input,
.pcw-hero-input:hover,
.pcw-hero-input:focus,
.pcw-hero-input:focus-visible,
.pcw-hero-input:active {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    color-scheme: dark;
}

.pcw-hero-input:-webkit-autofill,
.pcw-hero-input:-webkit-autofill:hover,
.pcw-hero-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #FFFFFF !important;
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    transition: background-color 9999s ease-out 0s;
}

.pcw-hero-input::placeholder {
    color: rgba(255, 255, 255, 0.82);
}

.pcw-hero-compose-row {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    margin-top: 0;
}

.pcw-hero-prompt-list {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

[dir="rtl"] .pcw-hero-prompt-list {
    direction: rtl;
    justify-content: flex-start;
}

[dir="ltr"] .pcw-hero-prompt-list {
    direction: ltr;
    justify-content: flex-end;
}

.pcw-hero-prompt,
.pcw-hero-send {
    background: transparent;
    border: none;
    position: relative;
    color: #FFFFFF;
    transition: transform 0.24s ease, box-shadow 0.24s ease, opacity 0.24s ease;
}

.pcw-hero-prompt::before,
.pcw-hero-send::before {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06)),
        radial-gradient(120% 110% at 14% 0%, rgba(255, 255, 255, 0.34), transparent 42%),
        rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 2px 2px 0px -2px var(--pcw-liquid-highlight),
        inset 0 0 3px 1px rgba(255, 255, 255, 0.72),
        inset -10px -14px 20px rgba(255, 255, 255, 0.025);
}

.pcw-hero-prompt {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    min-height: 50px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(9, 16, 28, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.07);
    -webkit-backdrop-filter: blur(14px) saturate(122%);
    backdrop-filter: blur(14px) saturate(122%);
    font: inherit;
    font-size: 13px;
    line-height: 1.55;
    text-align: right;
    direction: rtl;
    cursor: pointer;
    box-shadow:
        0 12px 20px -18px rgba(7, 14, 28, 0.28);
}

.pcw-hero-prompt::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.pcw-hero-prompt > span:not(.pcw-intro-ring) {
    position: relative;
    z-index: 1;
}

.pcw-hero-prompt:hover {
    transform: translateY(-1px);
    background: rgba(9, 16, 28, 0.18);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow:
        0 14px 22px -18px rgba(7, 14, 28, 0.34);
}

.pcw-hero-send {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    flex: 0 0 auto;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.22);
    -webkit-backdrop-filter: blur(12px) saturate(118%);
    backdrop-filter: blur(12px) saturate(118%);
    box-shadow:
        0 16px 28px -20px rgba(7, 14, 28, 0.34),
        0 8px 14px -12px rgba(7, 14, 28, 0.22);
}

.pcw-hero-send::before {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)),
        rgba(255, 255, 255, 0.02);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.56),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.pcw-hero-send::after {
    opacity: 0.14;
}

.pcw-hero-send svg,
[dir="rtl"] .pcw-hero-send svg,
[dir="ltr"] .pcw-hero-send svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: rgba(9, 16, 28, 0.88);
    transform: rotate(0deg);
}

.pcw-hero-send:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 18px 30px -20px rgba(7, 14, 28, 0.4),
        0 10px 16px -12px rgba(7, 14, 28, 0.24);
}

.pcw-hero-send:disabled {
    opacity: 0.56;
    cursor: default;
}

.pcw-hero-send:disabled:hover {
    transform: none;
}

.pcw-hero-root .pcw-connection-error {
    width: 100%;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 20px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #FEF3C7;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

.pcw-hero-root .pcw-messages {
    max-height: 180px;
    padding: 0 4px 0 0;
    background: transparent;
    gap: 12px;
}

.pcw-hero-root .pcw-messages:empty {
    display: none;
}

.pcw-hero-root .pcw-messages::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
}

.pcw-hero-root .pcw-message {
    max-width: 92%;
}

.pcw-hero-root .pcw-msg-avatar {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        0 10px 16px -12px rgba(7, 14, 28, 0.48);
    backdrop-filter: blur(10px);
}

.pcw-hero-root .pcw-msg-avatar svg {
    width: 14px;
    height: 14px;
}

.pcw-hero-root .pcw-message-user .pcw-bubble {
    background: rgba(255, 255, 255, 0.92);
    color: #07101C;
    border: 1px solid rgba(255, 255, 255, 0.96);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    box-shadow:
        0 20px 32px -22px rgba(7, 14, 28, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.pcw-hero-root .pcw-message-bot .pcw-bubble {
    background: rgba(255, 255, 255, 0.09);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    box-shadow:
        0 20px 34px -24px rgba(7, 14, 28, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(16px);
}

@supports not (filter: url("#pcw-liquid-panel-filter")) {
    .pcw-liquid-card::after,
    .pcw-liquid-pill::after {
        display: none;
    }

    .pcw-hero-composer-frame,
    .pcw-hero-prompt,
    .pcw-hero-send {
        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
    }
}

.pcw-hero-root .pcw-bubble a {
    color: #FFFFFF;
}

.pcw-hero-root .pcw-message-user .pcw-bubble a {
    color: #07101C;
}

.pcw-hero-root .pcw-bubble code,
.pcw-hero-root .pcw-bubble pre {
    background: rgba(255,255,255,0.12);
    color: #FFFFFF;
}

.pcw-hero-root .pcw-message-user .pcw-bubble code,
.pcw-hero-root .pcw-message-user .pcw-bubble pre {
    background: rgba(7, 16, 28, 0.08);
    color: #07101C;
}

.pcw-hero-root .pcw-msg-time {
    display: none;
}

.pcw-hero-root .pcw-bot-body {
    gap: 6px;
}

.pcw-hero-root .pcw-feedback {
    gap: 4px;
}

.pcw-hero-root .pcw-feedback button {
    width: 24px;
    height: 24px;
    border-color: rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.pcw-hero-root .pcw-feedback button.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
}

.pcw-hero-root .pcw-typing-dots {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

@media (max-width: 1100px) {
    .pcw-hero-shell {
        min-height: calc(var(--phoenix-hero-min-height, 420px) - 24px);
    }
}

@media (max-width: 782px) {
    .pcw-hero-shell {
        padding: 32px 16px;
    }

    .pcw-hero-copy {
        gap: 8px;
    }

    .pcw-hero-composer-frame {
        border-radius: 30px;
        padding: 16px 16px 14px;
    }
}

@media (max-width: 640px) {
    .pcw-hero-input {
        min-height: 62px;
        font-size: 16px;
    }

    .pcw-hero-prompt-list {
        gap: 10px;
    }

    .pcw-hero-prompt {
        width: 100%;
    }

    .pcw-hero-compose-row {
        flex-direction: column;
        align-items: stretch;
    }

    .pcw-hero-compose-hint {
        text-align: center;
    }

    .pcw-hero-send {
        width: 100%;
        border-radius: 999px;
    }
}
