/* Donate Icon - Top left yellow button */
.donate-icon {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    background: rgb(234, 179, 8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
    color: white;
    font-size: 19px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.3);
}

.donate-icon:hover {
    background: rgb(202, 138, 4);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(234, 179, 8, 0.4);
}

.donate-icon i {
    color: #ffffff;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

/* Donate Icon Responsive */
@media (max-width: 768px) {
    .donate-icon {
        top: 15px;
        left: 15px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .donate-icon i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .donate-icon {
        top: 12px;
        left: 12px;
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .donate-icon {
        top: 10px;
        left: 10px;
        width: 35px;
        height: 35px;
        font-size: 13px;
    }
    
    .donate-icon i {
        font-size: 0.8rem;
    }
}

/* Survey Icon - Top left purple button */
.survey-icon {
    position: fixed;
    top: 140px;
    left: 20px;
    width: 48px;
    height: 48px;
    background: rgb(147, 51, 234);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
    color: white;
    font-size: 19px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.3);
}

.survey-icon:hover {
    background: rgb(126, 34, 206);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(147, 51, 234, 0.4);
}

.survey-icon i {
    color: #ffffff;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

/* Survey Icon Responsive */
@media (max-width: 768px) {
    .survey-icon {
        top: 119px;
        left: 15px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .survey-icon i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .survey-icon {
        top: 112px;
        left: 12px;
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .survey-icon {
        top: 104px;
        left: 10px;
        width: 35px;
        height: 35px;
        font-size: 13px;
    }
    
    .survey-icon i {
        font-size: 0.8rem;
    }
}

/* Chat Icon - Inspired by main site's fixed icon styling */
.chat-icon {
    position: fixed;
    top: 80px;
    left: 20px;
    width: 48px;
    height: 48px;
    background: rgb(22, 163, 74);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;

    color: white;
    font-size: 19px;
}

.chat-icon:hover {
    background: rgb(22, 163, 74);
    border-color: rgba(255, 255, 255, 0.5);

    transform: scale(1.05);
}

.chat-icon i {
    color: #ffffff;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

/* Chat Window - Using main site's card styling */
.chat-window {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 380px;
    height: 520px;
    background: rgba(30, 60, 114, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 15px;
    display: none;
    flex-direction: column;
    z-index: 10000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    font-family: 'Fira Code', monospace;
}



/* Chat Header - Using main site's header styling */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 25px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px 15px 0 0;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    font-family: 'Fira Code', monospace;
}

.chat-close {
    background: none;
    border: none;
    color: #b8c5d6;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Chat Messages - Using main site's content area styling */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.02);
}

/* Custom Very Thin Scrollbar - Chrome/Webkit */
.chat-messages::-webkit-scrollbar {
    width: 4px; /* Very thin - only 4px wide */
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent; /* Invisible track */
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2); /* Subtle white with low opacity */
    border-radius: 2px; /* Rounded corners */
    transition: all 0.2s ease;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4); /* Brighter on hover */
}

.chat-messages::-webkit-scrollbar-thumb:active {
    background: rgba(255, 255, 255, 0.5); /* Even brighter when dragging */
}

/* Firefox scrollbar - Very thin */
.chat-messages {
    scrollbar-width: thin; /* Firefox thin scrollbar */
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent; /* Subtle white thumb, transparent track */
}

/* Chat Message - Using main site's card styling */
.chat-message {
    margin-bottom: 18px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    border-left: 3px solid #667eea;
    transition: all 0.2s ease;
}



.message-header {
    margin-bottom: 8px;
}

.message-time {
    font-size: 12px;
    color: #b8c5d6;
    font-weight: 500;
    font-family: 'Fira Code', monospace;
    margin-bottom: 3px;
}

.message-content {
    color: #ffffff;
    line-height: 1.5;
    word-wrap: break-word;
    font-size: 14px;
    font-family: 'Fira Code', monospace;
}

/* Chat Input Area - Using main site's form styling */
.chat-input-area {
    display: flex;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 15px 15px;
    gap: 12px;
}

#chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

#chat-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#chat-input:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

#chat-send {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    font-family: 'Fira Code', monospace;
    font-weight: 500;
}

#chat-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

#chat-send:active {
    transform: translateY(0);
}

#chat-send i {
    font-size: 14px;
}

/* Emoji picker styling */
.emoji-picker {
    position: absolute;
    background: rgba(30, 60, 114, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 20px 15px 15px;
    display: none;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    z-index: 1001;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 320px;
    height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Custom Very Thin Scrollbar for Emoji Picker - Chrome/Webkit */
.emoji-picker::-webkit-scrollbar {
    width: 4px; /* Very thin - only 4px wide */
}

.emoji-picker::-webkit-scrollbar-track {
    background: transparent; /* Invisible track */
}

.emoji-picker::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2); /* Subtle white with low opacity */
    border-radius: 2px; /* Rounded corners */
    transition: all 0.2s ease;
}

.emoji-picker::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4); /* Brighter on hover */
}

.emoji-picker::-webkit-scrollbar-thumb:active {
    background: rgba(255, 255, 255, 0.5); /* Even brighter when dragging */
}

/* Firefox scrollbar for Emoji Picker - Very thin */
.emoji-picker {
    scrollbar-width: thin; /* Firefox thin scrollbar */
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent; /* Subtle white thumb, transparent track */
}

/* Smart positioning classes */
.emoji-picker.position-top {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
}

.emoji-picker.position-bottom {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
}

.emoji-picker.position-left {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 10px;
}

.emoji-picker.position-right {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 10px;
}

.emoji-picker.show {
    display: grid;
}

.emoji-item {
    font-size: 18px;
    cursor: pointer;
    padding: 2px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    width: 30px;
    height: 30px;
    box-sizing: border-box;
}

.emoji-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.emoji-button {
    background: none;
    border: none;
    color: #b8c5d6;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    font-family: 'Fira Code', monospace;
}

.emoji-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.chat-input-area {
    position: relative;
}

/* Messages appear instantly without animation */
.chat-message {
    opacity: 1;
}

/* Responsive Design - Following main site's responsive patterns */
@media (max-width: 768px) {
    .chat-window {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
        height: 60vh;
        bottom: 80px;
    }
    
    .chat-icon {
        top: 67px;
        left: 15px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .chat-header {
        padding: 15px 20px;
    }
    
    .chat-header h3 {
        font-size: 1.1rem;
    }
    
    .chat-messages {
        padding: 15px;
    }
    
    .chat-input-area {
        padding: 15px;
        gap: 10px;
    }
    
    #chat-input {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    #chat-send {
        padding: 10px 12px;
        min-width: 44px;
    }
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 30px);
        right: 15px;
        left: 15px;
        height: 65vh;
        bottom: 70px;
    }
    
    .chat-icon {
        top: 62px;
        left: 12px;
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
    
    .chat-header {
        padding: 12px 15px;
    }
    
    .chat-header h3 {
        font-size: 1rem;
    }
    
    .chat-messages {
        padding: 12px;
    }
    
    .chat-input-area {
        padding: 12px;
        gap: 8px;
    }
    
    #chat-input {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    #chat-send {
        padding: 8px 10px;
        min-width: 40px;
    }
    
    .chat-message {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .message-content {
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .chat-window {
        width: calc(100vw - 20px);
        right: 10px;
        left: 10px;
        height: 70vh;
        bottom: 60px;
    }
    
    .chat-icon {
        top: 57px;
        left: 10px;
        width: 35px;
        height: 35px;
        font-size: 13px;
    }
    
    .chat-header {
        padding: 10px 12px;
    }
    
    .chat-header h3 {
        font-size: 0.9rem;
    }
    
    .chat-messages {
        padding: 10px;
    }
    
    .chat-input-area {
        padding: 10px;
        gap: 6px;
    }
    
    #chat-input {
        padding: 6px 8px;
        font-size: 13px;
    }
    
    #chat-send {
        padding: 6px 8px;
        min-width: 36px;
    }
    
    .chat-message {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .message-content {
        font-size: 12px;
    }
}

/* Landscape orientation improvements */
@media (max-width: 768px) and (orientation: landscape) {
    .chat-window {
        height: 50vh;
        bottom: 60px;
    }
    
    .chat-icon {
        top: 57px;
        left: 10px;
    }
}

/* High DPI display improvements */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .chat-icon,
    .chat-window {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Ensure accessibility and usability */
.chat-icon:focus,
#chat-input:focus,
#chat-send:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .chat-window {
        background: rgba(20, 40, 80, 0.95);
    }
}

/* Print styles */
@media print {
    .chat-icon,
    .chat-window {
        display: none !important;
    }
}

/* Error Messages */
.error-message {
    background: rgba(255, 59, 48, 0.1) !important;
    border-left: 4px solid rgba(255, 59, 48, 0.8) !important;
}

.error-message .message-content.error {
    color: rgba(255, 59, 48, 0.9) !important;
    font-weight: 500;
}

/* Status display styling */
.status {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 20px;
    margin: 20px;
    font-family: 'Fira Code', monospace;
    color: #ffffff;
}

.status h3 {
    margin: 0 0 10px 0;
    color: #ffffff;
}

.status p {
    margin: 5px 0;
    color: #b8c5d6;
}

/* Additional responsive design improvements */
@media (max-width: 360px) {
    .chat-window {
        width: calc(100vw - 20px);
        right: 10px;
        left: 10px;
        height: 70vh;
        bottom: 60px;
    }
    
    .chat-icon {
        top: 57px;
        left: 10px;
        width: 35px;
        height: 35px;
        font-size: 13px;
    }
    
    .chat-header {
        padding: 10px 12px;
    }
    
    .chat-header h3 {
        font-size: 0.9rem;
    }
    
    .chat-messages {
        padding: 10px;
    }
    
    .chat-input-area {
        padding: 10px;
        gap: 6px;
    }
    
    #chat-input {
        padding: 6px 8px;
        font-size: 13px;
    }
    
    #chat-send {
        padding: 6px 8px;
        min-width: 36px;
    }
    
    .chat-message {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .message-content {
        font-size: 12px;
    }
}

/* Landscape orientation improvements */
@media (max-width: 768px) and (orientation: landscape) {
    .chat-window {
        height: 50vh;
        bottom: 60px;
    }
    
    .chat-icon {
        top: 57px;
        left: 10px;
    }
}

/* High DPI display improvements */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .chat-icon,
    .chat-window {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Ensure accessibility and usability */
.chat-icon:focus,
#chat-input:focus,
#chat-send:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .chat-window {
        background: rgba(20, 40, 80, 0.95);
    }
}

/* Print styles */
@media print {
    .chat-icon,
    .chat-window {
        display: none !important;
    }
}
