/* ============================================
   Sunshine Chatbot Styles
   Location: /chatbot/chatbot.css
   ============================================ */

.sunshine-chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999999;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Toggle Button */
.sunshine-chatbot-toggle {
    position: relative;
    width: 65px;
    height: 65px;
    cursor: pointer;
    animation: sunshineFloat 3s ease-in-out infinite;
}

@keyframes sunshineFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.sunshine-chatbot-icon {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FFD700 0%, #FFC107 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    border: 3px solid white;
    animation: sunshinePulse 2s infinite;
    overflow: hidden;
}

@keyframes sunshinePulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 215, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

.sunshine-chatbot-toggle:hover .sunshine-chatbot-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
    animation: none;
}

.sunshine-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid white;
}

.sunshine-tooltip {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    color: #333;
}

.sunshine-chatbot-toggle:hover .sunshine-tooltip {
    opacity: 1;
}

/* Chat Window */
.sunshine-chatbot-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.3);
    animation: sunshineSlideUp 0.3s ease;
}

.sunshine-chatbot-window.active {
    display: flex;
}

@keyframes sunshineSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.sunshine-chatbot-header {
    background: linear-gradient(135deg, #FFD700 0%, #FFC107 100%);
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.sunshine-chatbot-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: sunshineShine 20s linear infinite;
}

@keyframes sunshineShine {
    from { transform: translateX(-100%) translateY(-100%); }
    to { transform: translateX(100%) translateY(100%); }
}

.sunshine-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.sunshine-avatar-circle {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.sunshine-header-info h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
}

.sunshine-status {
    margin: 0;
    font-size: 0.7rem;
    color: #1a1a1a;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sunshine-status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    animation: sunshineStatusPulse 1.5s infinite;
}

@keyframes sunshineStatusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.sunshine-header-actions {
    display: flex;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.sunshine-header-actions button {
    background: rgba(0, 0, 0, 0.15);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #1a1a1a;
    font-size: 16px;
}

.sunshine-header-actions button:hover {
    background: rgba(0, 0, 0, 0.25);
    transform: rotate(90deg);
}

/* Messages Area */
.sunshine-chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sunshine-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.sunshine-chatbot-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.sunshine-chatbot-messages::-webkit-scrollbar-thumb {
    background: #FFD700;
    border-radius: 10px;
}

.sunshine-message {
    display: flex;
    gap: 10px;
    animation: sunshineMessageFadeIn 0.3s ease;
}

@keyframes sunshineMessageFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sunshine-message-bot {
    justify-content: flex-start;
}

.sunshine-message-user {
    justify-content: flex-end;
}

.sunshine-message-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #FFD700 0%, #FFC107 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.sunshine-message-content {
    max-width: 70%;
}

.sunshine-message-user .sunshine-message-content {
    text-align: right;
}

.sunshine-message-text {
    background: white;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #333;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    word-wrap: break-word;
    white-space: pre-wrap;
}

.sunshine-message-bot .sunshine-message-text {
    border-bottom-left-radius: 5px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.sunshine-message-user .sunshine-message-text {
    background: linear-gradient(135deg, #FFD700 0%, #FFC107 100%);
    color: #1a1a1a;
    border-bottom-right-radius: 5px;
}

.sunshine-message-time {
    font-size: 0.65rem;
    color: #999;
    margin-top: 4px;
}

/* Typing Indicator */
.sunshine-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    background: white;
    border-radius: 18px;
    width: fit-content;
    border-bottom-left-radius: 5px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.sunshine-typing-indicator span {
    width: 6px;
    height: 6px;
    background: #FFD700;
    border-radius: 50%;
    animation: sunshineTyping 1.4s infinite ease-in-out;
}

.sunshine-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.sunshine-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes sunshineTyping {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Input Area */
.sunshine-chatbot-input-area {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: white;
}

.sunshine-quick-replies {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    overflow-x: auto;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sunshine-quick-replies::-webkit-scrollbar {
    height: 4px;
}

.sunshine-quick-replies::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.sunshine-quick-replies::-webkit-scrollbar-thumb {
    background: #FFD700;
    border-radius: 10px;
}

.sunshine-quick-reply {
    background: #f8f9fa;
    border: 1px solid #FFD700;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    color: #333;
    font-weight: 500;
}

.sunshine-quick-reply:hover {
    background: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.sunshine-input-wrapper {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    align-items: flex-end;
}

.sunshine-input-wrapper textarea {
    flex: 1;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 0.85rem;
    resize: none;
    font-family: inherit;
    outline: none;
    transition: all 0.3s;
    max-height: 80px;
    min-height: 36px;
}

.sunshine-input-wrapper textarea:focus {
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.sunshine-send-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #FFD700 0%, #FFC107 100%);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #1a1a1a;
    font-size: 1rem;
}

.sunshine-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.sunshine-input-footer {
    display: flex;
    justify-content: flex-end;
    padding: 5px 12px 10px;
    font-size: 0.65rem;
    color: #999;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .sunshine-chatbot-container {
        bottom: 20px;
        right: 20px;
    }
    
    .sunshine-chatbot-window {
        width: calc(100vw - 40px);
        height: 65vh;
        right: 0;
        bottom: 80px;
        max-width: 400px;
    }
    
    .sunshine-chatbot-toggle {
        width: 55px;
        height: 55px;
    }
    
    .sunshine-message-content {
        max-width: 80%;
    }
    
    .sunshine-quick-reply {
        font-size: 0.7rem;
        padding: 4px 10px;
    }
}