/* Chatbot Widget Styles - Premium Design */
#chatbot-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
}

#chatbot-widget #chatbot-toggle {
    pointer-events: auto;
}

#chatbot-widget #chatbot-container.show {
    pointer-events: auto;
}

#chatbot-messages,
.chatbot-message-content {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

#chatbot-container {
    display: none;
    width: 440px;
    height: 680px;
    background: var(--chatbot-bg-color, rgba(255, 255, 255, 0.98));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(234, 88, 12, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: none;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 12px;
    will-change: transform, opacity;
    transform: translateZ(0);
    opacity: 0;
    transform: translateY(30px) scale(0.92);
    transition: opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#chatbot-container.show {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

#chatbot-container.minimized {
    display: none;
}

#chatbot-header {
    background: linear-gradient(135deg, var(--chatbot-header-color, #ea580c) 0%, var(--chatbot-header-color-secondary, #fb923c) 50%, var(--chatbot-header-color, #ea580c) 100%);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    color: #ffffff;
    padding: 0;
    font-weight: 600;
    position: relative;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 4px 20px rgba(234, 88, 12, 0.3);
    overflow: hidden;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

#chatbot-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    pointer-events: none;
}

#chatbot-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.chatbot-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    position: relative;
    z-index: 1;
}

.chatbot-header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.chatbot-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    padding: 8px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.chatbot-logo:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.chatbot-logo-fallback {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 22px;
    flex-shrink: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chatbot-logo-fallback .logo-main {
    color: #ffffff;
}

.chatbot-logo-fallback .logo-accent {
    color: #ffffff;
    opacity: 0.95;
}

.chatbot-header-text {
    flex: 1;
    min-width: 0;
}

.chatbot-header-text p {
    margin: 0;
    opacity: 0.98;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.2px;
}

.chatbot-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.chatbot-header-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.chatbot-header-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.chatbot-header-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.15) rotate(5deg);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.chatbot-header-btn:active {
    transform: scale(0.9);
}

#chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 28px 24px;
    background: linear-gradient(to bottom, #fefefe 0%, #fafafa 100%);
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    position: relative;
}

#chatbot-messages::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), transparent);
    pointer-events: none;
    z-index: 1;
}

.chatbot-message {
    margin-bottom: 18px;
    display: flex;
    animation: messageSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    animation-fill-mode: forwards;
}

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

.chatbot-message.user {
    justify-content: flex-end;
    animation-delay: 0.05s;
}

.chatbot-message.bot {
    justify-content: flex-start;
    animation-delay: 0.05s;
}

.chatbot-message-content {
    max-width: 80%;
    padding: 16px 20px;
    border-radius: 24px;
    word-wrap: break-word;
    line-height: 1.6;
    font-size: 15px;
    animation: messagePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

@keyframes messagePop {
    0% {
        transform: scale(0.85);
        opacity: 0;
    }
    60% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.chatbot-message.user .chatbot-message-content {
    background: linear-gradient(135deg, var(--chatbot-user-message-color, #ea580c) 0%, var(--chatbot-user-message-color-secondary, #fb923c) 100%);
    color: #ffffff;
    border-bottom-right-radius: 8px;
    font-weight: 500;
    box-shadow: 
        0 8px 20px rgba(234, 88, 12, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(234, 88, 12, 0.4);
}

.chatbot-message.bot .chatbot-message-content {
    background: #ffffff;
    color: #1f2937;
    border-bottom-left-radius: 8px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(234, 88, 12, 0.15);
}

#chatbot-input-container {
    display: flex;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(234, 88, 12, 0.15);
    gap: 12px;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

#chatbot-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e8e8e8;
    border-radius: 28px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: #f8f8f8;
    font-family: inherit;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

#chatbot-input:focus {
    border-color: #ea580c;
    background: #ffffff;
    box-shadow: 
        0 0 0 6px rgba(234, 88, 12, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.02);
    transform: translateY(-2px);
}

#chatbot-input::placeholder {
    color: #a0a0a0;
    font-weight: 400;
}

#chatbot-send {
    padding: 16px 28px;
    background: linear-gradient(135deg, var(--chatbot-universal-color, #ea580c) 0%, var(--chatbot-user-message-color-secondary, #fb923c) 100%);
    color: #ffffff;
    border: none;
    border-radius: 28px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 6px 20px rgba(234, 88, 12, 0.35),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

#chatbot-send:hover {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    color: #ffffff;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 10px 28px rgba(234, 88, 12, 0.45),
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#chatbot-send:active {
    transform: translateY(-1px) scale(0.98);
}

#chatbot-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Premium Toggle Button - Pill Style */
#chatbot-toggle {
    width: auto;
    min-width: 160px;
    height: 56px;
    padding: 0 20px;
    border-radius: 50px;
    background: #FFFFFF;
    border: 3px solid var(--chatbot-toggle-color, #ea580c);
    cursor: pointer;
    box-shadow: 
        0 8px 24px rgba(234, 88, 12, 0.6),
        0 4px 12px rgba(0, 0, 0, 0.2),
        0 0 0 0 rgba(234, 88, 12, 0.5);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    overflow: visible;
    animation: pulseGlow 2.5s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

.chatbot-toggle-emoji {
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 4px rgba(234, 88, 12, 0.8)) 
            drop-shadow(0 0 8px rgba(234, 88, 12, 0.5))
            drop-shadow(0 0 12px rgba(234, 88, 12, 0.3));
    animation: emojiGlow 2s ease-in-out infinite;
}

@keyframes emojiGlow {
    0%, 100% {
        filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.8)) 
                drop-shadow(0 0 8px rgba(255, 215, 0, 0.5))
                drop-shadow(0 0 12px rgba(255, 215, 0, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 6px rgba(234, 88, 12, 1)) 
                drop-shadow(0 0 12px rgba(234, 88, 12, 0.7))
                drop-shadow(0 0 18px rgba(234, 88, 12, 0.5));
    }
}

.chatbot-toggle-text {
    font-size: 15px;
    color: var(--chatbot-toggle-color, #ea580c);
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(234, 88, 12, 0.5);
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 
            0 8px 24px rgba(234, 88, 12, 0.55),
            0 4px 12px rgba(0, 0, 0, 0.2),
            0 0 0 0 rgba(234, 88, 12, 0.5);
        border-color: #ea580c;
    }
    50% {
        box-shadow: 
            0 10px 28px rgba(234, 88, 12, 0.7),
            0 5px 14px rgba(0, 0, 0, 0.25),
            0 0 0 8px rgba(234, 88, 12, 0.2);
        border-color: #fb923c;
    }
}

#chatbot-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50px;
    background: rgba(234, 88, 12, 0.15);
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 2.5s ease-out infinite;
}

@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

#chatbot-toggle:hover {
    transform: translateY(-4px) scale(1.05);
    background: #FFFFFF;
    border-color: #fb923c;
    box-shadow: 
        0 12px 32px rgba(234, 88, 12, 0.7),
        0 6px 16px rgba(0, 0, 0, 0.2),
        0 0 0 4px rgba(234, 88, 12, 0.4);
    animation: none;
}

#chatbot-toggle:hover .chatbot-toggle-text {
    color: #f97316;
    text-shadow: 0 1px 3px rgba(234, 88, 12, 0.6);
}

#chatbot-toggle:active {
    transform: scale(0.95);
}

#chatbot-toggle.hidden {
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#chatbot-toggle.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

#chatbot-toggle:not(.hidden) {
    animation: pulseGlow 2.5s ease-in-out infinite, float 3.5s ease-in-out infinite;
}

#typing-indicator {
    margin-bottom: 18px;
    display: flex;
    justify-content: flex-start;
    animation: fadeIn 0.4s ease;
    transition: opacity 0.2s ease;
}

#typing-indicator .chatbot-message-content {
    background: #ffffff;
    border: 1px solid rgba(234, 88, 12, 0.2);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 24px;
    border-bottom-left-radius: 8px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.05);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#typing-indicator span {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #ea580c 0%, #fb923c 100%);
    border-radius: 50%;
    animation: typingBounce 1.6s infinite;
    box-shadow: 0 2px 4px rgba(234, 88, 12, 0.3);
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-14px) scale(1.3);
        opacity: 1;
    }
}

#typing-indicator span:nth-child(2) {
    animation-delay: 0.25s;
}

#typing-indicator span:nth-child(3) {
    animation-delay: 0.5s;
}

#chatbot-messages::-webkit-scrollbar {
    width: 10px;
}

#chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

#chatbot-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(234, 88, 12, 0.4) 0%, rgba(251, 146, 60, 0.4) 100%);
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

#chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(234, 88, 12, 0.6) 0%, rgba(251, 146, 60, 0.6) 100%);
    background-clip: padding-box;
}

/* Mobile Responsive - Tablets */
@media (max-width: 768px) {
    #chatbot-widget {
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
        position: fixed;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        margin: 0;
        padding: 0;
        z-index: 9998;
        pointer-events: none;
    }
    
    #chatbot-widget #chatbot-toggle {
        pointer-events: auto;
    }
    
    #chatbot-widget #chatbot-container.show {
        pointer-events: auto;
    }
    
    #chatbot-container {
        width: 100vw;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        right: 0;
        left: 0;
        top: 0;
        bottom: 0;
        margin: 0;
        padding: 0;
        padding-bottom: env(safe-area-inset-bottom);
        border-radius: 0;
        box-shadow: none;
        position: fixed;
        overflow: hidden;
    }
    
    #chatbot-container.show {
        display: flex;
        flex-direction: column;
    }
    
    #chatbot-header {
        border-radius: 0;
        flex-shrink: 0;
        min-height: auto;
    }
    
    .chatbot-header-content {
        padding: 16px 18px;
        min-height: auto;
    }
    
    .chatbot-logo {
        width: 42px;
        height: 42px;
    }
    
    #chatbot-header p {
        font-size: 14px;
    }
    
    #chatbot-messages {
        padding: 20px 18px;
        flex: 1 1 auto;
        overflow-y: auto;
        overflow-x: hidden;
        min-height: 0;
        -webkit-overflow-scrolling: touch;
    }
    
    .chatbot-message-content {
        max-width: 85%;
        font-size: 15px;
        padding: 14px 18px;
    }
    
    #chatbot-input-container {
        padding: 16px 18px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
        gap: 10px;
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        min-height: auto;
    }
    
    #chatbot-input {
        font-size: 16px;
        padding: 14px 18px;
        min-height: 48px;
    }
    
    #chatbot-send {
        padding: 14px 24px;
        font-size: 14px;
        min-width: 75px;
        min-height: 48px;
    }
    
    #chatbot-toggle {
        min-width: 130px;
        height: 50px;
        padding: 0 16px;
        border-radius: 50px;
        bottom: calc(18px + env(safe-area-inset-bottom));
        right: calc(18px + env(safe-area-inset-right));
        position: fixed;
        z-index: 9998;
        border-width: 3px;
        box-shadow: 0 6px 20px rgba(234, 88, 12, 0.5);
    }
    
    .chatbot-toggle-emoji {
        font-size: 20px;
        filter: drop-shadow(0 0 3px rgba(234, 88, 12, 0.7)) 
                drop-shadow(0 0 6px rgba(234, 88, 12, 0.4));
    }
    
    .chatbot-toggle-text {
        font-size: 13px;
        font-weight: 700;
    }
}

/* Mobile Responsive - Small Phones */
@media (max-width: 480px) {
    #chatbot-widget {
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
        position: fixed;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        margin: 0;
        padding: 0;
        z-index: 9998;
        pointer-events: none;
    }
    
    #chatbot-widget #chatbot-toggle {
        pointer-events: auto;
    }
    
    #chatbot-widget #chatbot-container.show {
        pointer-events: auto;
    }
    
    #chatbot-container {
        width: 100vw;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        bottom: 0;
        top: 0;
        left: 0;
        right: 0;
        margin: 0;
        padding: 0;
        padding-bottom: env(safe-area-inset-bottom);
        border-radius: 0;
        box-shadow: none;
        position: fixed;
        overflow: hidden;
    }
    
    #chatbot-container.show {
        display: flex;
        flex-direction: column;
    }
    
    #chatbot-header {
        border-radius: 0;
        flex-shrink: 0;
        min-height: auto;
    }
    
    .chatbot-header-content {
        padding: 14px 16px;
        min-height: auto;
    }
    
    .chatbot-logo {
        width: 38px;
        height: 38px;
    }
    
    #chatbot-header p {
        font-size: 13px;
    }
    
    .chatbot-header-brand {
        gap: 10px;
    }
    
    #chatbot-messages {
        padding: 16px;
        flex: 1 1 auto;
        overflow-y: auto;
        overflow-x: hidden;
        min-height: 0;
        -webkit-overflow-scrolling: touch;
    }
    
    .chatbot-message {
        margin-bottom: 14px;
    }
    
    .chatbot-message-content {
        max-width: 88%;
        font-size: 14px;
        padding: 12px 16px;
        line-height: 1.5;
    }
    
    #chatbot-input-container {
        padding: 12px 16px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        gap: 8px;
        border-top: 1px solid rgba(234, 88, 12, 0.15);
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        min-height: auto;
    }
    
    #chatbot-input {
        font-size: 16px;
        padding: 14px 16px;
        border-radius: 24px;
        min-height: 48px;
    }
    
    #chatbot-send {
        padding: 14px 20px;
        font-size: 14px;
        border-radius: 24px;
        min-width: 65px;
        min-height: 48px;
    }
    
    #chatbot-toggle {
        min-width: 120px;
        height: 46px;
        padding: 0 14px;
        border-radius: 50px;
        bottom: calc(16px + env(safe-area-inset-bottom));
        right: calc(16px + env(safe-area-inset-right));
        box-shadow: 0 6px 20px rgba(234, 88, 12, 0.5);
        position: fixed;
        z-index: 9998;
        border-width: 2.5px;
    }
    
    .chatbot-toggle-emoji {
        font-size: 18px;
        filter: drop-shadow(0 0 3px rgba(234, 88, 12, 0.7)) 
                drop-shadow(0 0 6px rgba(234, 88, 12, 0.4));
    }
    
    .chatbot-toggle-text {
        font-size: 11px;
        font-weight: 700;
    }
    
    .chatbot-header-btn {
        width: 40px;
        height: 40px;
    }
    
    .chatbot-header-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) and (orientation: landscape) {
    #chatbot-container {
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    #chatbot-messages {
        padding: 16px 18px;
        flex: 1;
        overflow-y: auto;
        min-height: 0;
    }
    
    .chatbot-message-content {
        max-width: 82%;
        font-size: 14px;
        padding: 12px 16px;
    }
    
    #chatbot-input-container {
        flex-shrink: 0;
        padding: 14px 18px;
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .chatbot-logo {
        width: 36px;
        height: 36px;
    }
    
    #chatbot-header p {
        font-size: 12px;
    }
    
    .chatbot-header-brand {
        gap: 10px;
    }
    
    #chatbot-toggle {
        min-width: 110px;
        height: 44px;
        padding: 0 12px;
        font-size: 10px;
    }
    
    .chatbot-toggle-emoji {
        font-size: 16px;
        filter: drop-shadow(0 0 2px rgba(234, 88, 12, 0.6)) 
                drop-shadow(0 0 4px rgba(234, 88, 12, 0.3));
    }
    
    .chatbot-toggle-text {
        font-size: 10px;
    }
    
    .chatbot-message-content {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    #chatbot-input {
        font-size: 16px;
        padding: 14px 16px;
    }
    
    #chatbot-send {
        padding: 14px 20px;
        font-size: 13px;
        min-width: 65px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    #chatbot-toggle {
        min-width: 130px;
        height: 50px;
        padding: 0 16px;
    }
    
    #chatbot-send {
        min-height: 52px;
        padding: 16px 28px;
    }
    
    #chatbot-input {
        min-height: 52px;
    }
    
    #chatbot-toggle:hover {
        transform: translateY(-2px) scale(1.02);
        animation: pulseGlow 2.5s ease-in-out infinite, float 3.5s ease-in-out infinite;
    }
    
    #chatbot-send:hover {
        transform: none;
    }
}
