/* Rocketchat - Stylesheet */

:root {
    --rc-primary: #212121;
    --rc-bg-light: #ffffff;
    --rc-bot-bubble: #212121;
    --rc-user-bubble: #ffffff;
    --rc-text-dark: #212121;
    --rc-text-white: #ffffff;
    --rc-text-gray: #71717a;
    --rc-border-color: rgba(0, 0, 0, 0.1);
}

#rocketchat-widget-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999999;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Floating Toggle Button */
.rocketchat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--rc-primary);
    color: var(--rc-text-white);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rocketchat-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.rocketchat-toggle:active {
    transform: scale(0.95);
}

/* Chat Window - MxChat Appearance */
.rocketchat-window {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 375px;
    height: min(600px, calc(100vh - 100px));
    background: var(--rc-bg-light);
    border: 1px solid var(--rc-border-color);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: rcFadeInUp 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    transform-origin: bottom right;
}

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

/* Header - Dark theme like MxChat top bar */
.rocketchat-header {
    background: var(--rc-primary);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--rc-text-white);
}

.rocketchat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rocketchat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: var(--rc-text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

.rocketchat-title {
    margin: 0;
    color: var(--rc-text-white);
    font-size: 15px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.rocketchat-status {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 1px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
}

.rocketchat-close,
.rocketchat-reset {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rocketchat-close {
    font-size: 20px;
}

.rocketchat-reset {
    font-size: 14px;
    margin-right: 2px;
}

.rocketchat-close:hover,
.rocketchat-reset:hover {
    color: var(--rc-text-white);
}

.rocketchat-reset:hover {
    transform: rotate(-90deg);
}

/* Chat Messages Content */
.rocketchat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #ffffff;
}

.rc-message {
    max-width: 85%;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    animation: bubbleSlideIn 0.25s ease forwards;
}

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

.rc-bot {
    align-self: flex-start;
    background: var(--rc-bot-bubble);
    color: var(--rc-text-white);
    border-radius: 0 18px 18px 18px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.rc-user {
    align-self: flex-end;
    background: var(--rc-user-bubble);
    color: var(--rc-text-dark);
    border-radius: 18px 0 18px 18px;
    border: 1px solid var(--rc-border-color);
}

/* Choice Buttons - Stylized like popular questions */
.rc-buttons-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    width: 100%;
}

.rc-choice-btn {
    width: 100%;
    padding: 10px 16px;
    background: #f5f5f5;
    border: 1px solid #bbb;
    border-radius: 8px;
    color: var(--rc-text-dark);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rc-choice-btn:hover {
    background-color: #eaeaea;
    border-color: #999;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* User Input Area */
.rocketchat-input-area {
    padding: 12px 15px;
    border-top: 1px solid var(--rc-border-color);
    display: flex;
    gap: 8px;
    background: #ffffff;
    align-items: center;
}

.rocketchat-input-area input {
    flex: 1;
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 8px 12px;
    color: var(--rc-text-dark);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.rocketchat-input-area input:focus:not(:disabled) {
    border-color: var(--rc-primary);
}

.rocketchat-send {
    background: var(--rc-primary);
    border: none;
    color: var(--rc-text-white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s;
}

.rocketchat-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.rocketchat-send:hover:not(:disabled) {
    opacity: 0.9;
}

/* Scrollbar Style */
.rocketchat-messages::-webkit-scrollbar {
    width: 5px;
}
.rocketchat-messages::-webkit-scrollbar-track {
    background: transparent;
}
.rocketchat-messages::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 10px;
}

/* Teaser Greeting Popup Bubble */
#rocketchat-teaser {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 220px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid var(--rc-border-color);
    border-radius: 12px;
    color: var(--rc-text-dark);
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: teaserSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6px;
    z-index: 99999;
}

@keyframes teaserSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.teaser-text {
    flex: 1;
    font-weight: 500;
}

.teaser-close {
    background: transparent;
    border: none;
    color: var(--rc-text-gray);
    font-size: 15px;
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
}

.teaser-close:hover {
    color: var(--rc-text-dark);
}

/* GDPR Consent Layout */
.rc-gdpr-container {
    background: #f9f9f9;
    border: 1px dashed #ccc;
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    animation: bubbleSlideIn 0.25s ease forwards;
}

.rc-gdpr-container input[type="checkbox"] {
    margin-top: 3px;
    cursor: pointer;
    width: 13px;
    height: 13px;
}

.rc-gdpr-label {
    font-size: 12px;
    color: var(--rc-text-gray);
    line-height: 1.4;
    cursor: pointer;
    user-select: none;
}

.rc-gdpr-label:hover {
    color: var(--rc-text-dark);
}

