/* TrulyGood Chatbot */

.tgcb-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: inherit;
}

/* Floating toggle button */
.tgcb-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #23A74A;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.tgcb-toggle:hover {
    background: #1E9140;
}

/* Panel */
.tgcb-panel {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 360px;
    height: 480px;
    background: #FFFFFF;
    border: 1px solid #E0E0DC;
    border-radius: 12px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transition: opacity 200ms ease;
}

.tgcb-panel.tgcb-panel--open {
    display: flex;
}

.tgcb-panel.tgcb-panel--visible {
    opacity: 1;
}

/* Header */
.tgcb-header {
    background: #23A74A;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    flex-shrink: 0;
}

.tgcb-header-title {
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
}

.tgcb-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Messages area */
.tgcb-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #F8F8F6;
}

.tgcb-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-line;
}

.tgcb-msg--bot {
    background: #FFFFFF;
    border: 1px solid #E0E0DC;
    color: #2B2B28;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.tgcb-msg--user {
    background: #23A74A;
    color: #FFFFFF;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Option buttons */
.tgcb-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-self: flex-start;
    width: 85%;
}

.tgcb-options--done {
    opacity: 0.5;
    pointer-events: none;
}

.tgcb-option {
    background: #FFFFFF;
    border: 1px solid #23A74A;
    color: #23A74A;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    line-height: 1.4;
}

.tgcb-option:hover {
    background: #23A74A;
    color: #FFFFFF;
}

/* Offline message form */
.tgcb-form {
    background: #FFFFFF;
    border: 1px solid #E0E0DC;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    padding: 14px;
    align-self: flex-start;
    width: 85%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tgcb-form input,
.tgcb-form textarea {
    width: 100%;
    border: 1px solid #C8C8C2;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
    font-family: inherit;
    color: #2B2B28;
    background: #FFFFFF;
    box-sizing: border-box;
}

.tgcb-form textarea {
    min-height: 70px;
    resize: vertical;
}

.tgcb-form input:focus,
.tgcb-form textarea:focus {
    outline: none;
    border-color: #23A74A;
}

.tgcb-form-error {
    color: #B3261E;
    font-size: 13px;
    display: none;
}

.tgcb-submit {
    background: #23A74A;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.tgcb-submit:hover {
    background: #1E9140;
}

.tgcb-submit:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Mobile: full screen */
@media (max-width: 480px) {
    .tgcb-panel {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
        border-radius: 0;
    }
}
