/**
 * Chat Widget Styles
 */

/* Popup Button */
.boochat-connect-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999998;
    cursor: pointer;
    animation: boochat-connect-bounce 2s infinite;
}

.boochat-connect-popup-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 15px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 50px;
}

.boochat-connect-popup-content:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.boochat-connect-popup-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.boochat-connect-popup-icon {
    font-size: 24px;
}

.boochat-connect-popup-text {
    font-weight: 600;
    font-size: 15px;
}

.boochat-connect-popup-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-left: 10px;
    padding: 0;
    flex-shrink: 0;
    position: relative;
}

.boochat-connect-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.boochat-connect-popup-close:active {
    transform: scale(0.95);
}

.boochat-connect-popup-close::before {
    content: '×';
    display: block;
    font-weight: bold;
    line-height: 1;
}

.boochat-connect-popup.hidden {
    display: none;
}

@keyframes boochat-connect-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Chat Window */
.boochat-connect-chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.boochat-connect-chat-window.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.boochat-connect-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.boochat-connect-chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
}

.boochat-connect-chat-icon {
    font-size: 20px;
}

.boochat-connect-chat-icon-image {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

.boochat-connect-chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.2s ease;
    padding: 0;
    flex-shrink: 0;
    position: relative;
}

.boochat-connect-chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.boochat-connect-chat-close:active {
    transform: scale(0.95);
}

.boochat-connect-chat-close::before {
    content: '×';
    display: block;
    font-weight: bold;
    line-height: 1;
}

.boochat-connect-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.boochat-connect-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.boochat-connect-chat-message {
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
}

.boochat-connect-chat-message-system {
    background: #e9ecef;
    color: #333;
    align-self: center;
    text-align: center;
    max-width: 90%;
}

.boochat-connect-chat-message-user {
    background: #495057;
    color: #e9ecef;
    align-self: flex-end;
    margin-left: auto;
}

.boochat-connect-chat-message-admin {
    background: #e9ecef;
    color: #333;
    border: 1px solid #dee2e6;
    align-self: flex-start;
}

.boochat-connect-chat-message {
    font-size: 14px;
    line-height: 1.5;
}

.boochat-connect-chat-message p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.boochat-connect-chat-message a {
    color: #667eea;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.boochat-connect-chat-message a:hover {
    color: #764ba2;
    text-decoration: none;
}

.boochat-connect-chat-message-admin a {
    color: #667eea;
}

.boochat-connect-chat-message-user a {
    color: #fff;
    text-decoration: underline;
}

.boochat-connect-chat-message-user a:hover {
    color: #e9ecef;
}

.boochat-connect-chat-footer {
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    background: #fff;
    border-radius: 0 0 12px 12px;
}

.boochat-connect-chat-form {
    display: flex;
    gap: 10px;
}

.boochat-connect-chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.boochat-connect-chat-input:focus {
    border-color: #667eea;
}

.boochat-connect-chat-send {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.boochat-connect-chat-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.boochat-connect-chat-send:active {
    transform: translateY(0);
}

.boochat-connect-chat-send:disabled,
.boochat-connect-chat-send.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.boochat-connect-chat-send:disabled:hover,
.boochat-connect-chat-send.disabled:hover {
    transform: none;
    box-shadow: none;
}

.boochat-connect-chat-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.boochat-connect-bullet {
    display: block;
    margin: 4px 0;
    padding-left: 4px;
}

/* Scrollbar */
.boochat-connect-chat-body::-webkit-scrollbar {
    width: 6px;
}

.boochat-connect-chat-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.boochat-connect-chat-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.boochat-connect-chat-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive */
@media (max-width: 480px) {
    .boochat-connect-chat-window {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
        height: calc(100vh - 120px);
        bottom: 100px;
    }
    
    .boochat-connect-popup {
        bottom: 15px;
        right: 15px;
    }
}
