/* Chat Widget Styles - Kodee Design */

/* Ensure input text is visible - override any conflicting styles */
.chat-widget-window input[type="text"],
.chat-widget-window #chatInput {
    color: #333 !important;
    background-color: #fff !important;
    -webkit-text-fill-color: #333 !important;
    -webkit-opacity: 1 !important;
    opacity: 1 !important;
}
.chat-widget-button {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ED2057 0%, #C41A47 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(237, 32, 87, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    color: white;
    font-size: 24px;
}

.chat-widget-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(237, 32, 87, 0.6);
    background: linear-gradient(135deg, #C41A47 0%, #a00726 100%);
}

.chat-widget-button.active {
    background: linear-gradient(135deg, #C41A47 0%, #a00726 100%);
    transform: scale(0.95);
}

.chat-widget-button .chat-button-text {
    position: absolute;
    right: -200px;
    background: #ED2057;
    color: white;
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(237, 32, 87, 0.3);
}

.chat-widget-button:hover .chat-button-text {
    opacity: 1;
    transform: translateX(0);
}

.chat-widget-window {
    position: fixed;
    bottom: 100px;
    right: 6rem;
    width: 380px;
    height: 420px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: translateY(20px) scale(0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-widget-window.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.chat-header {
    background: white;
    color: #333;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 15px 15px 0 0;
    border-bottom: 1px solid #f0f0f0;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ED2057, #F24A7A);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    font-weight: bold;
    overflow: hidden;
}

.chat-header-text h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #333 !important;
}

.chat-status {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    display: inline-block;
}

.chat-close-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-feedback-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-feedback-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 0;
    max-height: 200px;
}

.chat-message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.chat-message.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    overflow: hidden;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, #ED2057, #F24A7A);
    color: white;
    font-weight: bold;
}

.user-message .message-avatar {
    background: #f0f0f0;
    color: #666;
    font-weight: bold;
}

.message-content {
    max-width: 80%;
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.user-message .message-content {
    background: #ED2057;
    color: white;
    border-radius: 18px 18px 5px 18px;
}

.bot-message .message-content {
    border-radius: 18px 18px 18px 5px;
}

.quick-questions {
    padding: 8px 20px 12px 20px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    flex-shrink: 0;
    position: relative;
    z-index: 5;
}

.quick-questions-title {
    font-size: 12px;
    color: #666;
    margin: 0 0 6px 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-questions-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quick-question-btn {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    line-height: 1.3;
}

.quick-question-btn:hover {
    background: #ED2057;
    color: white;
    border-color: #ED2057;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(237, 32, 87, 0.3);
}

.chat-input-container {
    border-top: 1px solid #f0f0f0;
    background: white;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    min-height: 100px;
    display: flex;
    flex-direction: column;
}

.chat-input-wrapper {
    display: flex;
    padding: 15px 20px;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
    min-height: 60px;
}

#chatInput {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    padding: 12px 18px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
    color: #333 !important;
    background-color: #fff !important;
}

#chatInput:focus {
    border-color: #ED2057;
    box-shadow: 0 0 0 3px rgba(237, 32, 87, 0.1);
    color: #333 !important;
    background-color: #fff !important;
}

#chatInput::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

#chatInput::-webkit-input-placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

#chatInput::-moz-placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

#chatInput:-ms-input-placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

#sendMessageBtn {
    width: 40px;
    height: 40px;
    background: #ED2057;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

#sendMessageBtn:hover {
    background: #C41A47;
    transform: scale(1.05);
}


/* Chat header button styles */
.chat-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: -1.5rem;
}

.chat-feedback-btn,
.chat-close-btn {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: #f0f0f0;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
}

.chat-feedback-btn:hover {
    background: #ED2057;
    color: white;
    transform: scale(1.1);
}

.chat-close-btn:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1);
}

.chat-feedback-btn:active,
.chat-close-btn:active {
    transform: scale(0.95);
}

/* Mobile responsive adjustments for chat widget positioning */
@media (max-width: 768px) {
    .chat-widget-window {
        bottom: 100px;
        right: 5px;
        width: calc(100vw - 20px);
        max-width: 350px;
        height: 400px;
    }
    
    .chat-widget-button {
        bottom: 100px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .chat-widget-window {
        bottom: 100px;
        right: 5px;
        width: calc(100vw - 10px);
        max-width: 320px;
        height: 380px;
    }
}


.more-questions-option {
    margin: 10px 0;
    text-align: center;
}

.more-questions-btn {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    color: #ED2057;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.more-questions-btn:hover {
    background: #ED2057;
    color: white;
    border-color: #ED2057;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(237, 32, 87, 0.3);
}

.more-questions-btn i {
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-widget-window {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
        height: 580px;
        bottom: 140px;
    }
    
    .chat-widget-button {
        bottom: 90px;
        right: 15px;
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
    
    .chat-widget-button .chat-button-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .chat-widget-window {
        width: calc(100vw - 20px);
        right: 10px;
        left: 10px;
        height: 520px;
        bottom: 120px;
    }
    
    .chat-widget-button {
        bottom: 80px;
        right: 10px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .chat-messages {
        padding: 15px;
        max-height: 320px;
        min-height: 100px;
    }
    
    .message-content {
        max-width: 85%;
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .quick-questions {
        padding: 12px 15px;
    }
    
    .chat-input-wrapper {
        padding: 12px 15px;
    }
    
}

/* Animation for new messages */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message {
    animation: slideInUp 0.3s ease;
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #ED2057;
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #C41A47;
}
