/* Self-contained live support widget styles.
   Every page loads this file so the chat button and panel behave identically,
   independent of which theme stylesheet that page uses. */
#rs-support-btn {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .7rem 1rem;
    border-radius: 30px;
    border: 2px solid #f5e6a8;
    background: linear-gradient(145deg, #d4af37, #b8941f);
    color: #2d1810;
    font-family: 'Cinzel', Georgia, serif;
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .07em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .55), inset 0 1px 0 #fffbe6;
    transition: transform .22s var(--ease-out, ease), box-shadow .25s;
}
#rs-support-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .5), 0 0 24px rgba(212, 175, 55, .55);
}
#rs-support-btn.has-alert { animation: rsAttention 1.8s ease-in-out infinite; }
#rs-support-btn .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ff6b6b;
    box-shadow: 0 0 8px #ff6b6b;
    display: none;
}
#rs-support-btn.has-alert .dot { display: inline-block; }

#rs-support-panel {
    position: fixed;
    right: 18px;
    bottom: 76px;
    width: min(370px, calc(100vw - 24px));
    max-height: min(540px, calc(100vh - 110px));
    z-index: 901;
    display: none;
    flex-direction: column;
    border: 1px solid rgba(255, 232, 161, .72);
    background: linear-gradient(180deg, rgba(255, 226, 140, .08), transparent 40%),
                linear-gradient(145deg, #2f1c11, #0f0905);
    box-shadow: inset 0 0 0 3px rgba(8, 5, 3, .55), 0 14px 50px rgba(0, 0, 0, .82),
                0 0 34px rgba(255, 214, 110, .16);
}
#rs-support-panel.open { display: flex; }

.rs-support-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .7rem .9rem;
    border-bottom: 1px solid #8b7355;
    background: rgba(212, 175, 55, .14);
    color: #e3bb54;
    font-family: 'MedievalSharp', 'Cinzel', cursive;
    font-size: 1rem;
}
.rs-support-head .tools { display: flex; gap: .35rem; }
.rs-support-head button {
    width: 30px;
    height: 30px;
    border: 1px solid #8b7355;
    background: transparent;
    color: #d4af37;
    font-size: .9rem;
    line-height: 1;
    cursor: pointer;
}
.rs-support-head button:hover { border-color: #d4af37; }

.rs-support-body {
    flex: 1;
    min-height: 180px;
    max-height: 340px;
    padding: .8rem;
    overflow-y: auto;
    background: rgba(20, 15, 10, .6);
}
.rs-msg {
    margin-bottom: .7rem;
    padding: .55rem .65rem;
    border-left: 3px solid #51cf66;
    background: rgba(139, 115, 85, .22);
    color: #f0e68c;
    font-size: .82rem;
    line-height: 1.45;
    word-break: break-word;
}
.rs-msg.support { border-left-color: #ff6b6b; background: rgba(255, 107, 107, .09); }
.rs-msg .who { margin-bottom: .2rem; color: #d4af37; font-size: .75rem; font-weight: 700; }
.rs-msg .when { margin-top: .2rem; color: #b8941f; font-size: .66rem; }
.rs-msg .replybtn {
    margin-top: .4rem;
    padding: .2rem .55rem;
    border: 1px solid #8b7355;
    background: rgba(212, 175, 55, .16);
    color: #d4af37;
    font-family: 'Cinzel', Georgia, serif;
    font-size: .7rem;
    cursor: pointer;
}

.rs-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: .6rem .7rem 0;
    border-top: 1px solid #8b7355;
}
.rs-quick-replies[hidden] { display: none; }
.rs-quick-reply {
    padding: .28rem .5rem;
    border: 1px solid #8b7355;
    background: rgba(212, 175, 55, .12);
    color: #d4af37;
    font-family: 'Cinzel', Georgia, serif;
    font-size: .68rem;
    cursor: pointer;
}
.rs-quick-reply:hover { border-color: #d4af37; background: rgba(212, 175, 55, .28); }

.rs-support-form {
    display: flex;
    gap: .4rem;
    padding: .7rem;
    border-top: 1px solid #8b7355;
}
.rs-support-form input { flex: 1; padding: .55rem; font-size: .82rem; }
.rs-support-form button {
    padding: .45rem .8rem;
    border: 2px solid #d4af37;
    background: linear-gradient(145deg, #d4af37, #b8941f);
    color: #2d1810;
    font-family: 'Cinzel', Georgia, serif;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
}
.rs-support-note {
    padding: .55rem .8rem;
    border-top: 1px solid rgba(139, 115, 85, .4);
    color: #b8941f;
    font-size: .72rem;
    line-height: 1.4;
}

.rs-sound-fab {
    position: fixed;
    left: 16px;
    bottom: 18px;
    z-index: 899;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #d4af37;
    background: rgba(20, 15, 10, .85);
    color: #d4af37;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .5);
    transition: transform .2s var(--ease-out, ease), box-shadow .25s;
}
.rs-sound-fab:hover { transform: scale(1.06); box-shadow: 0 0 16px rgba(212, 175, 55, .55); }

@keyframes rsAttention {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 107, 107, .35); }
    50% { box-shadow: 0 0 24px rgba(255, 107, 107, .75); }
}
@media (max-width: 640px) {
    #rs-support-panel { right: 12px; bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) {
    #rs-support-btn, #rs-support-btn.has-alert, .rs-sound-fab { animation: none !important; }
}
