/* ============================================================
   Ramada by Wyndham Bilecik - AI Concierge Chatbot Styles
   Luxury Glassmorphism & Responsive Design
   ============================================================ */

/* 1. Floating Toggle Button */
.ramada-chat-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b8001c 0%, #7d0012 100%);
    color: #ffffff;
    border: 2px solid rgba(197, 168, 128, 0.6);
    box-shadow: 0 10px 30px rgba(184, 0, 28, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99998;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
    outline: none;
}

.ramada-chat-toggle:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 14px 38px rgba(184, 0, 28, 0.55);
}

.ramada-chat-toggle .chat-icon-main {
    font-size: 26px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.ramada-chat-toggle .chat-icon-close {
    font-size: 24px;
    display: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.ramada-chat-toggle.active .chat-icon-main {
    display: none;
}

.ramada-chat-toggle.active .chat-icon-close {
    display: block;
    transform: rotate(90deg);
}

/* Subtle Pulse Ring */
.ramada-chat-toggle::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid rgba(197, 168, 128, 0.5);
    animation: chatPulse 2.8s infinite;
    pointer-events: none;
}

@keyframes chatPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.22);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Tooltip Badge */
.ramada-chat-tooltip {
    position: fixed;
    bottom: 34px;
    right: 98px;
    background: #14171d;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 8px 14px;
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(197, 168, 128, 0.3);
    white-space: nowrap;
    z-index: 99997;
    pointer-events: none;
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.ramada-chat-tooltip.hide {
    opacity: 0;
    transform: translateX(10px);
}

/* 2. Main Chat Window */
.ramada-chat-window {
    position: fixed;
    bottom: 98px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 570px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99999;
    opacity: 0;
    transform: translateY(25px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ramada-chat-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Chat Header */
.ramada-chat-header {
    background: linear-gradient(135deg, #b8001c 0%, #7d0012 100%);
    color: #ffffff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid rgba(197, 168, 128, 0.4);
    flex-shrink: 0;
}

.ramada-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ramada-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b8001c;
    font-size: 18px;
    border: 2px solid #c5a880;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.ramada-chat-title h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #ffffff;
}

.ramada-chat-status {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.ramada-chat-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #28a745;
    box-shadow: 0 0 6px #28a745;
}

.ramada-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ramada-chat-btn-icon {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ramada-chat-btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Chat Body */
.ramada-chat-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #fdfdfd;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

.ramada-chat-body::-webkit-scrollbar {
    width: 5px;
}

.ramada-chat-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

/* Chat Bubbles */
.ramada-chat-message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: messageFadeIn 0.3s ease forwards;
}

@keyframes messageFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ramada-chat-message.bot {
    align-self: flex-start;
}

.ramada-chat-message.user {
    align-self: flex-end;
}

.ramada-chat-bubble {
    padding: 11px 15px;
    font-size: 0.88rem;
    line-height: 1.55;
    word-break: break-word;
}

.ramada-chat-message.bot .ramada-chat-bubble {
    background: #f1f3f7;
    color: #1e2229;
    border-radius: 16px 16px 16px 4px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.ramada-chat-message.bot .ramada-chat-bubble a {
    color: #b8001c;
    font-weight: 600;
    text-decoration: underline;
}

.ramada-chat-message.bot .ramada-chat-bubble strong {
    color: #14171d;
}

.ramada-chat-message.user .ramada-chat-bubble {
    background: linear-gradient(135deg, #b8001c 0%, #910015 100%);
    color: #ffffff;
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 4px 14px rgba(184, 0, 28, 0.25);
}

.ramada-chat-time {
    font-size: 0.68rem;
    color: #8c939f;
    margin-top: 4px;
    padding: 0 4px;
}

.ramada-chat-message.user .ramada-chat-time {
    text-align: right;
}

/* Quick Suggestion Pills */
.ramada-chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.ramada-suggestion-chip {
    background: #ffffff;
    border: 1px solid rgba(184, 0, 28, 0.25);
    color: #b8001c;
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ramada-suggestion-chip:hover {
    background: #b8001c;
    color: #ffffff;
    border-color: #b8001c;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(184, 0, 28, 0.2);
}

/* Typing Indicator */
.ramada-typing-indicator {
    display: none;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: #f1f3f7;
    border-radius: 16px 16px 16px 4px;
    width: fit-content;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.ramada-typing-indicator.show {
    display: flex;
}

.ramada-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8c939f;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.ramada-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ramada-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0.7);
        opacity: 0.5;
    }

    40% {
        transform: scale(1.15);
        opacity: 1;
        background: #b8001c;
    }
}

/* Chat Footer / Input */
.ramada-chat-footer {
    padding: 12px 14px;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ramada-chat-input {
    flex: 1;
    border: 1px solid #e0e4ea;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 0.88rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ramada-chat-input:focus {
    border-color: #b8001c;
    box-shadow: 0 0 0 3px rgba(184, 0, 28, 0.1);
}

.ramada-chat-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #b8001c;
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.ramada-chat-send:hover {
    background: #910015;
    transform: scale(1.05);
}

.ramada-chat-send:disabled {
    background: #d4d8e0;
    cursor: not-allowed;
    transform: none;
}

/* Powered by badge */
.ramada-chat-brand {
    font-size: 0.65rem;
    color: #a0a6b2;
    text-align: center;
    padding: 2px 0 6px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* 3. Mobile Responsiveness */
@media (max-width: 575.98px) {
    .ramada-chat-toggle {
        bottom: 18px;
        right: 18px;
        width: 56px;
        height: 56px;
    }

    .ramada-chat-tooltip {
        display: none;
    }

    .ramada-chat-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
    }

    .ramada-chat-header {
        padding: 14px 16px;
        padding-top: calc(14px + env(safe-area-inset-top, 0px));
    }

    .ramada-chat-footer {
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }
}