.ft1-bot-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
}

.ft1-bot-widget__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: #1a5fb4;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ft1-bot-widget__panel {
    position: absolute;
    right: 0;
    bottom: 68px;
    width: 340px;
    max-width: calc(100vw - 40px);
    height: 420px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Temas costumam sobrescrever [hidden]; força o painel a sumir ao fechar. */
.ft1-bot-widget__panel[hidden] {
    display: none !important;
}

.ft1-bot-widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #1a5fb4;
    color: #fff;
}

.ft1-bot-widget__close {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    position: relative;
    z-index: 2;
    padding: 4px 8px;
    margin: -4px -8px -4px 0;
}

.ft1-bot-widget__messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: #f6f7f7;
}

.ft1-bot-widget__msg {
    margin-bottom: 10px;
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.ft1-bot-widget__msg--in {
    margin-right: auto;
    background: #fff;
    border: 1px solid #dcdcde;
}

.ft1-bot-widget__msg--out {
    margin-left: auto;
    background: #e8f0fe;
    border: 1px solid #c5d9f7;
}

.ft1-bot-widget__form {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #dcdcde;
}

.ft1-bot-widget__input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
}

.ft1-bot-widget__send {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    background: #1a5fb4;
    color: #fff;
    cursor: pointer;
}

.ft1-bot-widget__send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ft1-bot-widget__link-btn {
    display: inline-block;
    margin: 4px 0 10px auto;
    padding: 8px 14px;
    background: #1a5fb4;
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    max-width: 85%;
    margin-left: auto;
    text-align: center;
}

.ft1-bot-widget__bubble-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-bottom: 4px;
}

.ft1-bot-widget__bubble-wrap .ft1-bot-widget__msg {
    margin-bottom: 4px;
}

.ft1-bot-widget__feedback {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    max-width: 85%;
    margin: 0 0 10px auto;
}

.ft1-bot-widget__fb-btn {
    border: 1px solid #c5d9f7;
    background: #fff;
    border-radius: 6px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

.ft1-bot-widget__fb-btn:hover {
    background: #e8f0fe;
}

.ft1-bot-widget__fb-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ft1-bot-widget__feedback-done {
    font-size: 12px;
    color: #50575e;
}

.ft1-bot-widget__correct {
    width: 100%;
    margin-top: 6px;
}

.ft1-bot-widget__correct-input {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    font: inherit;
    resize: vertical;
}

.ft1-bot-widget__correct-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.ft1-bot-widget__correct-save,
.ft1-bot-widget__correct-cancel {
    border: none;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
}

.ft1-bot-widget__correct-save {
    background: #1a5fb4;
    color: #fff;
}

.ft1-bot-widget__correct-cancel {
    background: #f0f0f1;
    color: #1d2327;
}
