/**
 * Smart Website AI - Frontend Chat Widget Mobile Responsive Stylesheet
 * 
 * @package SmartWebsiteAI
 */

@media screen and (max-width: 480px) {
    .swai-pos-bottom-right,
    .swai-pos-bottom-left {
        bottom: var(--swai-mobile-offset-y, 10px);
        right: var(--swai-mobile-offset-x, 10px);
        left: auto;
    }

    .swai-pos-bottom-left {
        left: var(--swai-mobile-offset-x, 10px);
        right: auto;
    }

    .swai-chat-window {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        border: none !important;
        margin: 0 !important;
        z-index: 1000000;
        display: flex;
        flex-direction: column;
    }

    .swai-chat-header {
        padding-top: calc(14px + env(safe-area-inset-top, 0px));
    }

    .swai-message-input {
        font-size: 16px !important; /* Prevents auto-zoom on mobile Safari */
    }

    .swai-composer-form {
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .swai-handoff-prompt {
        flex-direction: column;
        align-items: flex-start;
    }

    .swai-handoff-btn {
        width: 100%;
        text-align: center;
        padding: 8px 12px;
    }

    .swai-btn-icon {
        min-width: 40px;
        min-height: 40px;
    }

    .swai-send-btn {
        width: 44px;
        height: 44px;
    }
}

@media screen and (min-width: 481px) and (max-width: 768px) {
    .swai-chat-window {
        width: min(calc(100vw - 30px), 420px);
        height: min(calc(100vh - 120px), 620px);
    }
}
