/**
 * Full-screen「我的問題」conversation page.
 * Hides site chrome so the chat app fills the viewport.
 */

html.pilot-conversation-html,
html.pilot-conversation-html body.pilot-conversation-screen,
body.pilot-conversation-screen {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff;
    overflow: hidden;
}

body.pilot-conversation-screen #header,
body.pilot-conversation-screen header#header,
body.pilot-conversation-screen header.ct-header,
body.pilot-conversation-screen [data-header],
body.pilot-conversation-screen #footer,
body.pilot-conversation-screen footer.ct-footer,
body.pilot-conversation-screen .ct-footer,
body.pilot-conversation-screen .custom-global-footer,
body.pilot-conversation-screen .ct-drawer,
body.pilot-conversation-screen #account-modal,
body.pilot-conversation-screen .ct-panel#account-modal,
body.pilot-conversation-screen .hero-section,
body.pilot-conversation-screen .entry-header,
body.pilot-conversation-screen .ct-title,
body.pilot-conversation-screen .page-title,
body.pilot-conversation-screen .ct-breadcrumbs {
    display: none !important;
}

body.pilot-conversation-screen #main-container,
body.pilot-conversation-screen main#main,
body.pilot-conversation-screen #main,
body.pilot-conversation-screen #content,
body.pilot-conversation-screen .site-main,
body.pilot-conversation-screen article,
body.pilot-conversation-screen .entry-content,
body.pilot-conversation-screen .ct-container,
body.pilot-conversation-screen .ct-container-full,
body.pilot-conversation-screen [class*="ct-container"] {
    max-width: none !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
    perspective: none !important;
    contain: none !important;
}

.pst-conversation-page {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100dvh;
    max-width: none;
    margin: 0;
    background: #fff;
    box-sizing: border-box;
}

body.admin-bar .pst-conversation-page {
    top: var(--wp-admin--admin-bar--height, 32px);
    height: calc(100dvh - var(--wp-admin--admin-bar--height, 32px));
}

.pst-conversation-topbar {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 8px 16px;
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
}

.pst-conversation-back {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 999px;
    background: #fff;
    color: #1d2327;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.pst-conversation-back:hover,
.pst-conversation-back:focus {
    border-color: #D94A1F;
    color: #D94A1F;
    background: #fff7f4;
}

.pst-conversation-title {
    margin: 0;
    justify-self: center;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    line-height: 1.2;
}

.pst-conversation-page .pst-conversation-container,
.pst-conversation-page .pst-conversation-container > .pst-chat-app-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
}

body.pilot-conversation-screen .pst-chat-app-wrapper {
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    position: relative !important;
    top: auto !important;
    animation: none !important;
}

@media (max-width: 768px) {
    .pst-conversation-topbar {
        padding: 8px 12px;
        min-height: 52px;
    }

    .pst-conversation-title {
        font-size: 16px;
    }

    .pst-conversation-back {
        padding: 7px 12px;
        font-size: 13px;
    }

    body.pilot-conversation-screen .pst-chat-app-wrapper {
        flex-direction: column !important;
        height: 100% !important;
        max-height: none !important;
    }

    body.pilot-conversation-screen .pst-chat-list {
        width: 100% !important;
        flex: 0 0 38%;
        max-height: none !important;
    }

    body.pilot-conversation-screen .pst-chat-content {
        flex: 1 1 auto;
        min-height: 0 !important;
    }
}
