:root {
    --b-grayc: rgb(206, 210, 213);
    --b-grayc-50: rgb(206, 210, 213, 0.5);
    --b-gray2: rgb(40, 40, 41);
    --b-gray3: rgb(58, 76, 86);
    --b-gray6: rgb(106, 120, 128);
    --b-gray8: rgb(128, 130, 133);
    --b-gray9: rgb(158, 166, 171);
    --b-grayf: rgb(242, 244, 244);
    --b-blue: rgb(0, 51, 73);
    --b-blue-dark: rgb(9, 31, 44);
    --b-blue-light: rgb(206, 214, 218);
    --b-orange: rgb(220, 68, 5);
    --b-orange-dark: rgb(150, 56, 33);
    --box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/*
//  Common
//  _____________________________________________ */

.copilot-chat-widget {
    position: fixed;
    z-index: 9999;
}

.copilot-chat-bottom-right {
    bottom: 20px;
    right: 20px;
}

.copilot-chat-bottom-left {
    bottom: 20px;
    left: 20px;
}

.copilot-chat-top-right {
    top: 20px;
    right: 20px;
}

.copilot-chat-top-left {
    top: 20px;
    left: 20px;
}

.copilot-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--b-orange);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.copilot-chat-toggle:hover,
.copilot-chat-toggle:active,
.copilot-chat-toggle:focus {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    background: var(--b-orange-dark);
    color: white;
    border: none;
    outline: none;
}

.copilot-chat-toggle svg {
    width: 28px;
    height: 28px;
}

.copilot-chat-container {
    position: absolute;
    width: 400px;
    height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.copilot-chat-bottom-right .copilot-chat-container,
.copilot-chat-top-right .copilot-chat-container {
    right: 0;
}

.copilot-chat-bottom-left .copilot-chat-container,
.copilot-chat-top-left .copilot-chat-container {
    left: 0;
}

.copilot-chat-bottom-right .copilot-chat-container,
.copilot-chat-bottom-left .copilot-chat-container {
    bottom: 80px;
}

.copilot-chat-top-right .copilot-chat-container,
.copilot-chat-top-left .copilot-chat-container {
    top: 80px;
}

.copilot-chat-header {
    background: white;
    color: #333;
    padding: 16px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.copilot-chat-close,
.copilot-chat-close:hover {
    background: transparent;
    border: none;
    color: #333;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.copilot-chat-iframe-wrapper {
    flex: 1;
    overflow: hidden;
}

.copilot-chat-iframe-inner {
    width: 100%;
    height: 100%;
    min-height: 0;
}

.copilot-chat-iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.copilot-chat-container.show {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*
// Mobile
// _____________________________________________ */

@media screen and (max-width: 768px) {
    .copilot-chat-container {
        width: calc(100vw - 40px);
        height: 80vh;
        max-width: 400px;
    }

    .copilot-chat-toggle {
        width: 50px;
        height: 50px;
    }

    .copilot-chat-toggle svg {
        width: 24px;
        height: 24px;
    }
}
