/**
 * Ghost Chat Widget Desktop Slide-in Styles
 * Version: 1.0.0
 * For desktop view only - mobile view remains unchanged
 */

/* Only apply these styles on desktop */
@media (min-width: 769px) {
    /* Root variables for easy customization */
    :root {
        --ghost-bg: #E1F0FE;
        --ghost-text: #2c3e50;
        --ghost-accent: #54595F;
        --ghost-border: #54595F;
        --ghost-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
        --ghost-border-radius: 12px 0 0 12px;
        --ghost-transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    }

    /* Chat Container - Slide from right */
    .ghost-chat-container {
        position: fixed;
        top: 0;
        right: -360px; /* Start offscreen */
        width: 360px;
        height: 100vh;
        max-height: 100vh;
        background-color: #ffffff;
        border-radius: var(--ghost-border-radius);
        box-shadow: var(--ghost-shadow);
        display: flex;
        flex-direction: column;
        z-index: 999997;
        overflow: hidden;
        transition: var(--ghost-transition);
        opacity: 1;
        transform: none;
        pointer-events: all;
    }

    /* Active chat state - slide in */
    .ghost-chat-container.is-open {
        right: 0;
        opacity: 1;
        transform: none;
    }

    /* Adjust chat header for side panel */
    .ghost-chat-header {
        background-color: var(--ghost-bg);
        border-top-right-radius: 0;
        border-top-left-radius: var(--ghost-border-radius);
        min-height: 56px;
    }

    /* Messages container takes full height */
    .ghost-chat-messages {
        height: calc(100vh - 120px); /* Adjust height to account for header and input */
    }

    /* Input area for slide panel */
    .ghost-chat-input {
        border-bottom-left-radius: var(--ghost-border-radius);
    }

    /* Toggle button that slides out */
    .ghost-chat-toggle {
        position: fixed;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        width: 40px;
        height: 60px;
        background-color: var(--ghost-bg);
        border-radius: 12px 0 0 12px;
        border: 2px solid var(--ghost-border);
        border-right: none;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: var(--ghost-transition);
        z-index: 999996;
        opacity: 0.9;
    }

    /* Toggle button when chat is open */
    .ghost-chat-toggle.is-open,
    .ghost-chat-container.is-open ~ #ghost-chat-toggle {
        right: 360px !important; /* Move with the chat panel */
        opacity: 1;
        border-color: var(--ghost-border);
        background-color: var(--ghost-bg);
        box-shadow: -4px 0 15px rgba(0, 0, 0, 0.2);
        z-index: 999999;
    }

    /* Ghost icon in toggle */
    .ghost-chat-toggle svg,
    .ghost-chat-toggle img {
        width: 24px;
        height: 24px;
        color: var(--ghost-accent);
        transition: transform 0.5s ease;
    }

    /* Ghost animation */
    @keyframes float-ghost {
        0%, 100% { transform: translateY(-3px); }
        50% { transform: translateY(3px); }
    }
    
    /* Apply float animation */
    .ghost-chat-toggle svg,
    .ghost-chat-toggle img {
        animation: float-ghost 3s ease-in-out infinite;
    }
    
    /* Ghost toggle background image */
    .ghost-chat-toggle.with-ghost-icon {
        background-image: url('../images/ghost-toggle-icon.svg');
        background-repeat: no-repeat;
        background-position: center;
        background-size: 24px;
    }
    
    /* Keep the regular trigger button but position it properly */
    .ghost-chat-trigger {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 999998;
    }
}
