/* Ask ROSE chat widget (rosepanel.io landing page only).
   Placement law (Rule #35): the TuneGether plugin owns the bottom-right
   corner, including its expanded panel, at z-index 999999. This widget
   lives bottom-LEFT and far below that z-index, so it can never sit on
   top of the plugin or block any of its controls, in any state. */

#ask-rose-launcher,
#ask-rose-panel,
#ask-rose-panel * {
    box-sizing: border-box;
    font-family: inherit;
}

#ask-rose-launcher {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 9000;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 20px;
    border: none;
    border-radius: 999px;
    background: #A4343A;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(52, 58, 64, 0.35);
}

#ask-rose-launcher:hover {
    background: #8B2635;
}

#ask-rose-launcher svg {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
}

#ask-rose-panel {
    position: fixed;
    left: 20px;
    bottom: 88px;
    z-index: 9001;
    width: min(380px, calc(100vw - 40px));
    height: min(580px, calc(100dvh - 116px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid rgba(52, 58, 64, 0.14);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(52, 58, 64, 0.32);
}

#ask-rose-panel[hidden],
#ask-rose-launcher[hidden] {
    display: none !important;
}

.ar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    background: #343A40;
    color: #F8F9FA;
}

.ar-head-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
}

.ar-head-sub {
    margin-top: 2px;
    font-size: 12.5px;
    line-height: 1.4;
    color: rgba(248, 249, 250, 0.75);
}

.ar-close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(248, 249, 250, 0.12);
    color: #F8F9FA;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.ar-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 20px;
    background: #F8F9FA;
}

.ar-msg {
    max-width: 88%;
    margin: 0 0 10px;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 15px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.ar-msg-bot {
    background: #FFFFFF;
    border: 1px solid rgba(52, 58, 64, 0.12);
    color: #343A40;
    border-bottom-left-radius: 4px;
}

.ar-msg-user {
    margin-left: auto;
    background: #A4343A;
    color: #FFFFFF;
    border-bottom-right-radius: 4px;
}

.ar-msg a {
    color: #A4343A;
    font-weight: 600;
}

.ar-msg-user a {
    color: #FFFFFF;
}

.ar-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 20px 2px;
    background: #F8F9FA;
}

.ar-chip {
    padding: 7px 12px;
    border: 1px solid #A4343A;
    border-radius: 999px;
    background: #FFFFFF;
    color: #A4343A;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.ar-chip:hover {
    background: #A4343A;
    color: #FFFFFF;
}

.ar-gate,
.ar-inputrow {
    padding: 12px 20px 16px;
    background: #FFFFFF;
    border-top: 1px solid rgba(52, 58, 64, 0.1);
}

.ar-gate label {
    display: block;
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: #343A40;
}

.ar-gate input {
    width: 100%;
    margin: 0 0 10px;
    padding: 11px 12px;
    border: 1px solid rgba(52, 58, 64, 0.3);
    border-radius: 10px;
    font-size: 16px;
    color: #343A40;
    background: #FFFFFF;
}

.ar-gate-note {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.45;
    color: #5A6268;
}

.ar-gate-error {
    margin: 0 0 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: #A4343A;
}

.ar-primary {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    background: #A4343A;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.ar-primary:hover {
    background: #8B2635;
}

.ar-inputrow {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ar-inputrow input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid rgba(52, 58, 64, 0.3);
    border-radius: 10px;
    font-size: 16px;
    color: #343A40;
    background: #FFFFFF;
}

.ar-send {
    flex: 0 0 auto;
    padding: 11px 16px;
    border: none;
    border-radius: 10px;
    background: #A4343A;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.ar-send:hover {
    background: #8B2635;
}

@media (max-width: 560px) {
    #ask-rose-launcher {
        left: 16px;
        bottom: 16px;
    }

    #ask-rose-panel {
        left: 16px;
        right: 16px;
        bottom: 84px;
        width: auto;
        height: min(600px, calc(100dvh - 104px));
    }
}
