/* ==========================================
   💬 FLOATING HUD GLOBAL CHAT SYSTEM
   ========================================== */
.global-chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 340px;
    height: 400px;
    background: rgba(15, 12, 30, 0.95);
    border: 2px solid #4a259c;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(123, 63, 222, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Slick Collapse State Handle */
.global-chat-container.collapsed {
    height: 45px;
}

.chat-header {
    background: linear-gradient(135deg, #2b1055, #5121a8);
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    border-bottom: 1px solid #7b3fde;
}

.chat-title {
    color: #fff;
    font-weight: bold;
    font-size: 0.95rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.chat-toggle-icon {
    color: #00ffcc;
    font-size: 0.8rem;
}

.chat-body-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100% - 45px);
    background: rgba(10, 8, 22, 0.7);
}

.chat-messages-log {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Custom modern scrollbar styling */
.chat-messages-log::-webkit-scrollbar {
    width: 6px;
}
.chat-messages-log::-webkit-scrollbar-thumb {
    background: #4a259c;
    border-radius: 4px;
}

.chat-message-bubble {
    font-size: 0.85rem;
    line-height: 1.3;
    word-break: break-word;
    color: #e0dcf0;
}

.chat-timestamp {
    color: #6c5fa1;
    font-size: 0.75rem;
    margin-right: 4px;
}

.chat-sender {
    color: #00ffcc;
    margin-right: 6px;
}

/* ==========================================
   🎯 OVERRIDDEN COMFORT TYPING DECK
   ========================================== */
.chat-input-form {
    display: flex !important;
    padding: 12px !important;
    background: #0d0a1b !important; 
    border-top: 1px solid #321b69 !important;
    gap: 8px !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Target explicitly via parent container to crush other cascading files */
.global-chat-container .chat-input-form input[type="text"] {
    display: block !important;
    width: 70% !important; 
    max-width: 70% !important;
    flex: unset !important; 
    background: #16112e !important;
    border: 1px solid #4a259c !important;
    border-radius: 8px !important; 
    padding: 10px 14px !important;
    color: #ffffff !important;
    font-size: 0.9rem !important;
    height: auto !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
    margin: 0 !important;
}

/* Focus Glow */
.global-chat-container .chat-input-form input[type="text"]:focus {
    outline: none !important;
    border-color: #00ffcc !important;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.4) !important;
    background: #1b143a !important;
}

.global-chat-container .chat-input-form button {
    width: calc(30% - 8px) !important;
    background: #5121a8 !important;
    border: none !important;
    padding: 10px 0 !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-weight: bold !important;
    cursor: pointer !important;
    font-size: 0.9rem !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
    height: auto !important;
    margin: 0 !important;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3) !important;
}

/* Hyper-Reactive Hover Action */
.global-chat-container .chat-input-form button:hover {
    background: #00ffcc !important;
    color: #0d0a1b !important;
    box-shadow: 0 0 12px rgba(0, 255, 204, 0.5) !important;
    transform: translateY(-1px) !important;
}

.global-chat-container .chat-input-form button:active {
    transform: translateY(1px) !important;
}

/* ==========================================
   📱 MOBILE RESPONSIVENESS OVERRIDE
   ========================================== */
@media (max-width: 480px) {
    .global-chat-container {
        right: 10px;
        bottom: 10px;
        width: calc(100% - 20px); 
        height: 350px;
    }
    
    .global-chat-container.collapsed {
        height: 45px;
        width: 160px; 
    }
    
    .global-chat-container .chat-input-form input[type="text"] {
        font-size: 16px !important; /* Prevents iOS auto-zoom */
    }
}
/* Clickable Gift Bubble Design */
.gift-claim-card {
    background: linear-gradient(135deg, #1c0e3a, #321b69);
    border: 2px dashed #00ffcc;
    border-radius: 8px;
    padding: 10px;
    margin-top: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.2);
}

.gift-claim-card:hover {
    border-style: solid;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.5);
    background: linear-gradient(135deg, #231249, #3d217d);
}

.claim-action-btn {
    text-align: center;
    font-weight: bold;
    font-size: 0.8rem;
    color: #00ffcc;
    margin-top: 6px;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(0, 255, 204, 0.4);
}
/* ==========================================
   ✨ CHAT ICON SYSTEM INTEGRATION
   ========================================== */

/* Standardize icon sizing in the Chat Panel */
.global-chat-container i[data-lucide] {
    display: inline-block;
    vertical-align: middle;
    width: 1.1em;
    height: 1.1em;
    stroke-width: 2.5;
}

/* Header Icon Alignment */
.chat-title i[data-lucide] {
    margin-right: 8px;
    color: #00ffcc;
}

.chat-toggle-icon i[data-lucide] {
    width: 16px;
    height: 16px;
}

/* Send Button Icon */
.global-chat-container .chat-input-form button i[data-lucide] {
    width: 18px;
    height: 18px;
    margin-right: 0;
    /* Keeps the icon centered inside the button */
}

/* Ensure the chat button stays perfectly square/rectangular */
.global-chat-container .chat-input-form button {
    display: flex;
    align-items: center;
    justify-content: center;
}