/* Modal Overlay */
#chatbot-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  z-index: 1049;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
#chatbot-modal.chatbot-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Card - 800px Width */
.chatbot-card {
  width: 1200px;
  height: 600px;
  max-height: 90vh;
  background: #f3f4f6;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#chatbot-modal.chatbot-visible .chatbot-card {
  transform: scale(1);
}

/* Mobile Fullscreen */
@media (max-width: 768px) {
    .chatbot-card {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}

/* Header */
#chatbot-header {
    background: #f3f4f6;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.chatbot-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.chatbot-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.header-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chatbot-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.chatbot-title-group h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.01em;
}
#chatbot-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.2s;
    padding: 4px;
    border-radius: 50%;
}
#chatbot-close:hover { 
    color: #475569; 
    background: rgba(0,0,0,0.05);
}

/* Polyglot Dropdown */
.chatbot-lang-select {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2364748b%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 8px top 50%;
    background-size: 8px auto;
    padding-right: 24px;
}
.chatbot-lang-select:hover {
    border-color: #cbd5e1;
    color: #334155;
}

/* Dropdown */
.chatbot-dropdown-container {
    position: relative;
}
.chatbot-help-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}
.chatbot-help-btn:hover {
    background: #f8fafc;
    color: #334155;
}
.chatbot-help-btn .arrow-down-1 {
    font-size: 8px;
    transition: transform 0.2s;
}
.chatbot-help-btn .arrow-down-1.rotate {
    transform: rotate(180deg);
}
.chatbot-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    width: 200px;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    padding: 4px;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 100;
}
.chatbot-dropdown-menu.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: none;
    text-decoration: none;
    color: #475569;
    font-size: 13px;
    text-align: left;
    border-radius: 8px;
    transition: background 0.1s;
    cursor: pointer;
    box-sizing: border-box;
}
.dropdown-item:hover {
    background: #f8fafc;
    color: #1e293b;
}
.dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 4px 8px;
}
.icon-box {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
.email-icon { background: #eff6ff; color: #3b82f6; }
.phone-icon { background: #f0fdf4; color: #22c55e; }
.agent-icon { background: #faf5ff; color: #a855f7; }

/* Body */
#chatbot-body {
    flex: 1;
    overflow-y: auto;
    position: relative;
    padding: 0 16px;
}

/* Landing State */
#chatbot-landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #334155;
    animation: fadeIn 0.5s ease;
}
.landing-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    border-radius: 20px;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
#chatbot-landing h2 {
    font-size: 20px;
    font-weight: 600;
    min-height: 24px;
}

.typing-cursor::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: #3b82f6;
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 1s infinite;
}

/* Messages */
#chatbot-messages {
    padding-top: 16px;
    padding-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    width: 100%;
    display: flex;
}
.message.user { justify-content: flex-end; }
.message.model { align-items: flex-start; }

.msg-group {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    max-width: 85%;
}
.user .msg-group { flex-direction: row-reverse; }

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bot-avatar { background: white; }
.user-avatar { background: #cbd5e1; color: #64748b; }

.msg-stack { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px;}

.bubble {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    word-wrap: break-word;
}

.user .bubble {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    border-radius: 16px;
    border-bottom-right-radius: 2px;
}

.model .bubble {
    background: white;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    border-bottom-left-radius: 2px;
}

/* --- RICH EVENT CARDS --- */

.chatbot-cards-container {
    margin-top: 12px;
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    padding-left: 4px;
    width: 100%;
}
.chatbot-cards-container::-webkit-scrollbar { height: 6px; }
.chatbot-cards-container::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* Base Card */
.rpl-event-card {
    flex-shrink: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #f1f5f9;
}
.rpl-event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Program Card (Vertical) */
.rpl-card-program { width: 260px; display: flex; flex-direction: column; }
.rpl-program-img, a.rpl-program-img { height: 140px; background: #e2e8f0; position: relative; display: block; overflow: hidden; border-radius: 12px 12px 0 0; text-decoration: none; }
.rpl-program-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; transition: transform 0.3s ease; }
.rpl-program-img:hover img { transform: scale(1.05); }
.rpl-program-img-placeholder { width: 100%; height: 100%; background: linear-gradient(to bottom right, #dbeafe, #e0e7ff); position: absolute; top: 0; left: 0; }
.rpl-program-age { position: absolute; bottom: 8px; left: 8px; background: rgba(0,0,0,0.6); color: white; font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 600; backdrop-filter: blur(2px); z-index: 2; }
.rpl-program-body { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.rpl-program-title, a.rpl-program-title { font-weight: 700; font-size: 15px; color: #1e293b; margin-bottom: 8px; line-height: 1.3; margin-top: 0; text-decoration: none; display: block; }
a.rpl-program-title:hover { color: #4f46e5; text-decoration: underline; }
.rpl-meta-row { display: flex; align-items: flex-start; gap: 8px; font-size: 11px; color: #64748b; margin-bottom: 6px; }
.rpl-meta-icon { width: 14px; text-align: center; color: #3b82f6; }
.rpl-program-footer { padding: 8px 12px; font-size: 11px; font-weight: 700; color: white; display: flex; justify-content: space-between; align-items: center; border-radius: 0 0 12px 12px; }

/* ==========================================
   REGISTRATION STATUS COLORS - ALL 8 STATES
   ========================================== */

/* Drop In - Gray (no registration needed) */
.rpl-status-dropin,
.rpl-status-gray {
    background: #64748b;
    color: white;
}

/* Register - Blue (registration open, spots available) */
.rpl-status-register,
.rpl-status-blue {
    background: #2563eb;
    color: white;
}

/* Register After - Yellow/Amber (registration not yet open) */
.rpl-status-register-after,
.rpl-status-yellow {
    background: #f59e0b;
    color: white;
}

/* Coming Soon - Purple */
.rpl-status-coming-soon {
    background: #7c3aed;
    color: white;
}

/* Waitlist - Orange (full, accepting waitlist) */
.rpl-status-waitlist,
.rpl-status-orange {
    background: #ea580c;
    color: white;
}

/* Registration Closed - Dark Gray (past registration deadline) */
.rpl-status-closed {
    background: #374151;
    color: white;
}

/* Cancelled - Red */
.rpl-status-cancelled,
.rpl-status-red {
    background: #dc2626;
    color: white;
}

/* Rescheduled - Teal */
.rpl-status-rescheduled {
    background: #0d9488;
    color: white;
}

/* Full / Sold Out - Dark Red */
.rpl-status-full {
    background: #991b1b;
    color: white;
}

/* Generic Green (for any positive state) */
.rpl-status-green {
    background: #16a34a;
    color: white;
}

/* Film Card (Horizontal) */
.rpl-card-film { width: 380px; display: flex; flex-direction: row; }
.rpl-film-poster { width: 120px; background: #0f172a; position: relative; flex-shrink: 0; overflow: hidden; border-radius: 12px 0 0 12px; }
.rpl-film-poster a { display: block; width: 100%; height: 100%; }
.rpl-film-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.rpl-film-poster a:hover img { transform: scale(1.05); }
.rpl-film-rating { position: absolute; top: 8px; left: 8px; background: #f1f5f9; color: #0f172a; font-weight: 800; font-size: 10px; padding: 2px 6px; border-radius: 2px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); z-index: 2; }
.rpl-film-body { flex: 1; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; background: white; border-radius: 0 12px 12px 0; }
.rpl-film-title, a.rpl-film-title { font-family: 'Georgia', serif; font-size: 16px; font-weight: 700; color: #0f172a; margin: 0 0 6px 0; line-height: 1.2; text-decoration: none; display: block; }
a.rpl-film-title:hover { color: #4f46e5; text-decoration: underline; }
.rpl-film-meta { font-size: 11px; color: #475569; margin-bottom: 8px; font-weight: 500; }
.rpl-film-desc { font-size: 11px; color: #64748b; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }
.rpl-btn-ticket { align-self: flex-end; font-size: 10px; font-weight: 700; color: #0d9488; background: #f0fdfa; padding: 4px 10px; border-radius: 20px; border: 1px solid #ccfbf1; cursor: pointer; text-decoration: none; display: inline-block; transition: all 0.2s ease; }
.rpl-btn-ticket:hover { background: #ccfbf1; color: #0f766e; }

/* Exhibit Card (Wide Immersive) */
.rpl-card-exhibit { width: 400px; height: 200px; position: relative; border-radius: 12px; background: #0f172a; overflow: hidden; }
.rpl-exhibit-bg, a.rpl-exhibit-img-link img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.8; transition: transform 0.5s; }
a.rpl-exhibit-img-link { position: absolute; inset: 0; z-index: 1; display: block; }
a.rpl-exhibit-img-link:hover img, .rpl-card-exhibit:hover .rpl-exhibit-bg { transform: scale(1.05); }
.rpl-exhibit-overlay { position: absolute; inset: 0; background: linear-gradient(to top, #0f172a 10%, transparent 90%); z-index: 2; pointer-events: none; }
.rpl-exhibit-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px; color: white; z-index: 3; }
.rpl-exhibit-tags { display: flex; gap: 6px; margin-bottom: 6px; }
.rpl-tag { background: rgba(255,255,255,0.2); backdrop-filter: blur(4px); font-size: 9px; text-transform: uppercase; padding: 2px 6px; border-radius: 2px; font-weight: 600; }
.rpl-exhibit-title, a.rpl-exhibit-title { font-family: 'Georgia', serif; font-size: 18px; margin: 0 0 4px 0; text-shadow: 0 2px 4px rgba(0,0,0,0.5); font-weight: 700; color: white; text-decoration: none; display: block; }
a.rpl-exhibit-title:hover { text-decoration: underline; }
.rpl-exhibit-meta { font-size: 11px; color: #cbd5e1; display: flex; gap: 12px; align-items: center; }

/* Feedback Styling */
.feedback-container { padding-left: 2px; }
.feedback-actions { display: flex; gap: 12px; opacity: 0.4; transition: opacity 0.2s; margin-top: 4px; }
.feedback-actions:hover { opacity: 1; }
.fb-btn {
    background: none; border: none; cursor: pointer; color: #64748b; font-size: 14px; padding: 2px;
}
.fb-btn:hover { transform: scale(1.1); }
.fb-btn:first-child:hover { color: #16a34a; }
.fb-btn:last-child:hover { color: #ef4444; }

.feedback-thanks { font-size: 10px; color: #16a34a; font-weight: 600; margin-top: 4px; }

/* Sleek Single-Line Pill (Chat Input Lookalike) */
.feedback-pill {
    margin-top: 6px;
    width: 280px;
    display: flex;
    align-items: center;
    gap: 0;
    background: white;
    padding: 4px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    animation: slideRight 0.2s;
    overflow: hidden;
}
.feedback-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 12px;
    padding-left: 8px;
    color: #475569;
    height: 24px;
}
.feedback-input::placeholder { color: #94a3b8; }

.fb-pill-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-right: 4px;
}

.feedback-submit-icon {
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s;
}
.feedback-submit-icon:hover { transform: scale(1.05); }

.feedback-cancel-icon {
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    background: none; 
    border: none; 
    font-size: 14px; 
    color: #94a3b8; 
    cursor: pointer;
}
.feedback-cancel-icon:hover { color: #475569; }

/* Loader */
.loader-bubble { padding: 12px 16px; background: white; border: 1px solid #f1f5f9; }
.dot {
  width: 6px; height: 6px; background: #94a3b8; border-radius: 50%; display: inline-block; margin: 0 2px;
  animation: pulse 1.4s infinite ease-in-out both;
}
.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes pulse { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }
@keyframes slideRight { from { opacity: 0; transform: translateX(-5px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Input Area */
#chatbot-input-area {
    background: #f3f4f6;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}
.input-wrapper {
    position: relative;
    width: 100%;
}
#chatbot-input {
    width: 100%;
    padding: 14px 16px;
    padding-right: 48px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    outline: none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: border 0.2s;
    box-sizing: border-box;
}
#chatbot-input:focus {
    border-color: #c084fc;
    box-shadow: 0 0 0 2px rgba(192, 132, 252, 0.2);
}
#chatbot-send {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}
#chatbot-send:active { transform: translateY(-50%) scale(0.95); }

/* ==========================================
   CHIPS AREA - WITH SCROLL INDICATOR
   ========================================== */
.chatbot-chips-area {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    position: relative;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar for chips - visible and styled */
.chatbot-chips-area::-webkit-scrollbar {
    height: 4px;
}
.chatbot-chips-area::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 2px;
}
.chatbot-chips-area::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 2px;
}
.chatbot-chips-area::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Firefox scrollbar */
.chatbot-chips-area {
    scrollbar-width: thin;
    scrollbar-color: #3b82f6 #e2e8f0;
}

/* Scroll fade indicator */
.chips-scroll-indicator {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 6px;
    width: 40px;
    background: linear-gradient(to right, transparent, #f3f4f6);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}
.chips-scroll-indicator.visible {
    opacity: 1;
}

.chip-btn {
    white-space: nowrap;
    background: white;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.chip-btn:hover {
    background: #eff6ff;
    color: #2563eb;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}
.chip-btn:active {
    transform: translateY(0);
}

/* Scroll hint animation for first time */
@keyframes scrollHint {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}
.chatbot-chips-area.show-hint {
    animation: scrollHint 1s ease-in-out 2;
}

/* ============================================
   LINK CARDS - Beautiful link display for KB responses
   ============================================ */

.rpl-link-cards {
    margin: 16px 0 8px 52px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 320px;
}

/* Primary Service Link Button */
.rpl-service-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}
.rpl-service-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    color: white;
    text-decoration: none;
}
.rpl-service-link .rpl-link-icon {
    font-size: 16px;
    flex-shrink: 0;
}
.rpl-service-link .rpl-link-text {
    flex: 1;
    line-height: 1.3;
}
.rpl-service-link .rpl-link-arrow {
    font-size: 16px;
    opacity: 0.8;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.rpl-service-link:hover .rpl-link-arrow {
    transform: translateX(3px);
}

/* App Store Badges Container */
.rpl-app-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.rpl-app-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rpl-app-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Individual App Badge */
.rpl-app-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.rpl-app-badge:hover {
    text-decoration: none;
}
.rpl-app-badge svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Apple App Store Badge */
.rpl-app-badge.apple {
    background: #000000;
    color: white;
}
.rpl-app-badge.apple:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    color: white;
}

/* Google Play Badge */
.rpl-app-badge.google {
    background: #01875f;
    color: white;
}
.rpl-app-badge.google:hover {
    background: #019966;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(1, 135, 95, 0.3);
    color: white;
}

/* Amazon Badge */
.rpl-app-badge.amazon {
    background: #ff9900;
    color: #232f3e;
}
.rpl-app-badge.amazon:hover {
    background: #ffad33;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 153, 0, 0.3);
    color: #232f3e;
}

/* Learn More Link */
.rpl-learn-more {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}
.rpl-learn-more:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.rpl-learn-more .rpl-link-icon {
    font-size: 12px;
    flex-shrink: 0;
}
.rpl-learn-more .rpl-link-text {
    flex: 1;
}
.rpl-learn-more .rpl-link-arrow {
    opacity: 0.5;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.rpl-learn-more:hover .rpl-link-arrow {
    transform: translateX(2px);
    opacity: 0.8;
}

/* Quick Links Section (Embedded Links) */
.rpl-quick-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.rpl-quick-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rpl-quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.rpl-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
}
.rpl-quick-link:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.rpl-quick-icon {
    font-size: 12px;
    flex-shrink: 0;
}
.rpl-quick-text {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Category-specific quick link styles */
.rpl-quick-link.email {
    border-color: #bfdbfe;
    background: #eff6ff;
}
.rpl-quick-link.email:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}
.rpl-quick-link.internal {
    border-color: #c7d2fe;
    background: #eef2ff;
}
.rpl-quick-link.internal:hover {
    background: #e0e7ff;
    border-color: #a5b4fc;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    /* CRITICAL FIX: Make message container stack vertically on mobile */
    /* This puts link cards BELOW the text bubble, not beside it */
    .message.model {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Fix message group width on mobile */
    .msg-group {
        max-width: 100%;
        gap: 8px;
    }
    
    /* Fix bubble text wrapping */
    .bubble {
        padding: 10px 14px;
        font-size: 13px;
        max-width: 100%;
        word-break: break-word;
    }
    
    /* Link cards - full width on mobile, no left margin */
    .rpl-link-cards {
        margin: 12px 0 8px 40px;
        max-width: calc(100% - 40px);
        padding: 0;
        width: calc(100% - 40px);
    }
    
    /* Service link buttons - more compact */
    .rpl-service-link {
        padding: 10px 12px;
        font-size: 12px;
        gap: 10px;
        border-radius: 8px;
    }
    .rpl-service-link .rpl-link-icon {
        font-size: 14px;
    }
    .rpl-service-link .rpl-link-arrow {
        font-size: 14px;
    }
    
    /* App badges - horizontal row on mobile */
    .rpl-app-badges {
        padding: 8px 10px;
    }
    .rpl-app-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .rpl-app-badge {
        flex: 1;
        justify-content: center;
        min-width: 0;
        padding: 5px 8px;
        font-size: 10px;
        gap: 4px;
    }
    .rpl-app-badge svg {
        width: 12px;
        height: 12px;
    }
    .rpl-app-label {
        font-size: 10px;
    }
    
    /* Learn more link - more compact */
    .rpl-learn-more {
        padding: 6px 10px;
        font-size: 11px;
        gap: 6px;
    }
    
    /* Quick links - stack vertically on mobile */
    .rpl-quick-links {
        padding: 8px 10px;
    }
    .rpl-quick-buttons {
        flex-direction: column;
        gap: 4px;
    }
    .rpl-quick-link {
        padding: 5px 8px;
        font-size: 10px;
        width: 100%;
        box-sizing: border-box;
    }
    .rpl-quick-text {
        max-width: none;
    }
    .rpl-quick-label {
        font-size: 10px;
    }
    
    /* Avatar smaller on mobile */
    .avatar {
        width: 28px;
        height: 28px;
    }
    
    /* Program cards - narrower on mobile */
    .chatbot-cards-container {
        gap: 10px;
        padding: 4px;
        margin-left: 36px;
    }
    .rpl-event-card {
        min-width: 220px;
        max-width: 260px;
    }
    .rpl-card-program {
        width: 220px;
    }
    .rpl-card-film {
        width: 280px;
    }
    .rpl-card-exhibit {
        width: 280px;
        height: 160px;
    }
    
    /* Suggestion chips - more compact */
    .chip-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
}

/* Extra small screens (very narrow phones) */
@media (max-width: 360px) {
    .msg-group {
        gap: 6px;
    }
    
    .bubble {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .avatar {
        width: 24px;
        height: 24px;
    }
    
    .rpl-link-cards {
        margin-left: 32px;
        max-width: calc(100% - 32px);
        width: calc(100% - 32px);
    }
    
    .rpl-service-link {
        padding: 8px 10px;
        font-size: 11px;
    }
    
    .rpl-event-card {
        min-width: 200px;
    }
    .rpl-card-program {
        width: 200px;
    }
    .rpl-card-film {
        width: 260px;
    }
    
    .chatbot-cards-container {
        margin-left: 30px;
    }
}

/* ================================================
   CLICKABLE PROGRAM CARDS - Focus & Hover Effects
   ================================================ */

/* Subtle card hover effect */
.rpl-event-card {
    transition: box-shadow 0.2s ease;
}
.rpl-event-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Focus styles for accessibility */
a.rpl-program-title:focus,
a.rpl-film-title:focus,
a.rpl-exhibit-title:focus,
a.rpl-program-img:focus,
.rpl-film-poster a:focus,
a.rpl-exhibit-img-link:focus,
.rpl-btn-ticket:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* ================================================
   MODAL Z-INDEX - Chatbot at 30
   ================================================ */

/* Chatbot container and modal */
#rpl-chatbot-container,
.rpl-chatbot-container {
    z-index: 30 !important;
}

.chatbot-modal,
#rpl-chatbot-modal,
.rpl-chatbot-modal {
    z-index: 30 !important;
}

/* Program popup modal - uses default Bootstrap z-index (1050+) which is higher than 30 */
/* No need to override - it will naturally appear above the chatbot */

/* ================================================
   FEEDBACK BUTTON & MODAL
   ================================================ */

/* Feedback Button in Header */
.chatbot-feedback-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

.chatbot-feedback-btn:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.4);
}

.chatbot-feedback-btn:active {
    transform: translateY(0);
}

.chatbot-feedback-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.feedback-btn-text {
    white-space: nowrap;
}

/* Feedback Modal Overlay */
.chatbot-feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.chatbot-feedback-modal.chatbot-visible {
    opacity: 1;
    pointer-events: auto;
}

.chatbot-feedback-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* Feedback Modal Content */
.chatbot-feedback-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chatbot-feedback-modal.chatbot-visible .chatbot-feedback-content {
    transform: scale(1) translateY(0);
}

/* Feedback Modal Header */
.chatbot-feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.chatbot-feedback-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.chatbot-feedback-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    color: white;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chatbot-feedback-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chatbot-feedback-close-btn svg {
    width: 20px;
    height: 20px;
}

/* Feedback Modal Body */
.chatbot-feedback-body {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 400px;
}

.chatbot-feedback-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: white;
    color: #64748b;
    font-size: 14px;
}

.feedback-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: feedback-spin 0.8s linear infinite;
}

@keyframes feedback-spin {
    to { transform: rotate(360deg); }
}

#chatbot-feedback-iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: none;
    display: none;
}

/* ================================================
   FEEDBACK BUTTON & MODAL - RESPONSIVE
   ================================================ */

/* Tablet */
@media (max-width: 768px) {
    .chatbot-feedback-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .chatbot-feedback-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .chatbot-feedback-content {
        width: 95%;
        max-height: 85vh;
        border-radius: 12px;
    }
    
    .chatbot-feedback-header {
        padding: 14px 16px;
    }
    
    .chatbot-feedback-header h3 {
        font-size: 16px;
    }
    
    .chatbot-feedback-body {
        min-height: 350px;
    }
    
    #chatbot-feedback-iframe {
        min-height: 350px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    /* Hide text on very small screens, show icon only */
    .chatbot-feedback-btn {
        padding: 8px;
        border-radius: 50%;
        gap: 0;
    }
    
    .feedback-btn-text {
        display: none;
    }
    
    .chatbot-feedback-btn svg {
        width: 16px;
        height: 16px;
    }
    
    /* Full screen modal on mobile */
    .chatbot-feedback-content {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }
    
    .chatbot-feedback-header {
        padding: 12px 16px;
    }
    
    .chatbot-feedback-header h3 {
        font-size: 15px;
    }
    
    .chatbot-feedback-body {
        min-height: calc(100vh - 60px);
    }
    
    #chatbot-feedback-iframe {
        min-height: calc(100vh - 60px);
    }
}

/* Header actions spacing adjustment for feedback button */
@media (max-width: 600px) {
    .chatbot-header-actions {
        gap: 6px;
    }
    
    .chatbot-lang-select {
        padding: 4px 6px;
        font-size: 11px;
    }
    
    .chatbot-help-btn {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    .chatbot-help-btn .arrow-down-1 {
        display: none;
    }
}