/**
 * ChatKit WordPress Plugin Styles
 */

/* Main ChatKit Widget */
.wpe-chatkit-widget {
    /* ChatKit default styling will be used */
}

/* FAB Mode - Widget Positioning */
.wpe-chatkit-widget.wpe-chatkit-hidden,
.wpe-chatkit-widget.wpe-chatkit-visible {
    position: fixed;
    bottom: 90px; /* Position above FAB button */
    right: 20px;
    z-index: 9998;
    max-width: 400px;
    width: calc(100vw - 40px);
    max-height: 600px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

/* Hidden state */
.wpe-chatkit-widget.wpe-chatkit-hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    visibility: hidden;
    pointer-events: none;
}

/* Visible state */
.wpe-chatkit-widget.wpe-chatkit-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
    pointer-events: auto;
}

/* Floating Action Button (FAB) */
.wpe-chatkit-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10a37f 0%, #0d8a6a 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(16, 163, 127, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: all 0.3s ease;
    outline: none;
}

.wpe-chatkit-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(16, 163, 127, 0.5);
    background: linear-gradient(135deg, #0f9975 0%, #0c7d5f 100%);
}

.wpe-chatkit-fab:active {
    transform: scale(0.95);
}

.wpe-chatkit-fab:focus {
    box-shadow: 0 4px 12px rgba(16, 163, 127, 0.4),
                0 0 0 3px rgba(16, 163, 127, 0.2);
}

.wpe-chatkit-fab svg {
    width: 24px;
    height: 24px;
    pointer-events: none;
}

/* Shortcode container - Embedded usage */
.wpe-chatkit-shortcode-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    /* Use CSS variables for easy customization */
    min-height: var(--chatkit-min-height, 300px);
}

.wpe-chatkit-shortcode-container openai-chatkit {
    /* Adaptive sizing - fills container by default */
    width: var(--chatkit-width, 100%);
    max-width: var(--chatkit-max-width, 100%);
    height: var(--chatkit-height, 600px);
    min-height: 300px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .wpe-chatkit-widget.wpe-chatkit-hidden,
    .wpe-chatkit-widget.wpe-chatkit-visible {
        bottom: 80px;
        right: 10px;
        left: 10px;
        width: calc(100vw - 20px);
        max-width: none;
        max-height: calc(100vh - 100px);
    }

    .wpe-chatkit-fab {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }

    .wpe-chatkit-fab svg {
        width: 20px;
        height: 20px;
    }
}

/* Print styles - hide ChatKit when printing */
@media print {
    .wpe-chatkit-widget,
    .wpe-chatkit-shortcode-container,
    .wpe-chatkit-fab {
        display: none !important;
    }
}
