/**
 * Frontend Chat Widget Styles
 *
 * @package Dock_Live_Chat
 * @since   1.0.0
 */

.dock-live-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.dock-live-chat-bubble {
    width: 60px;
    height: 60px;
    background: #0073aa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    color: #fff;
}

.dock-live-chat-bubble:hover {
    background: #005a87;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.dock-live-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 100px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dock-live-chat-header {
    background: #0073aa;
    color: #fff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dock-live-chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.dock-live-chat-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.dock-live-chat-close:hover {
    opacity: 1;
}

.dock-live-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
}

.dock-live-chat-welcome {
    text-align: center;
    color: #666;
    padding: 20px 0;
}

.dock-live-chat-message {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.dock-live-chat-message.visitor {
    align-items: flex-end;
}

.dock-live-chat-message.admin {
    align-items: flex-start;
}

.dock-live-chat-message-content {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    word-wrap: break-word;
}

.dock-live-chat-message.visitor .dock-live-chat-message-content {
    background: #0073aa;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.dock-live-chat-message.admin .dock-live-chat-message-content {
    background: #e0e0e0;
    color: #333;
    border-bottom-left-radius: 4px;
}

.dock-live-chat-message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    padding: 0 4px;
}

.dock-live-chat-input-area {
    padding: 16px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}

.dock-live-chat-user-info {
    margin-bottom: 8px;
}

.dock-live-chat-name,
.dock-live-chat-email {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.dock-live-chat-name:last-child,
.dock-live-chat-email:last-child {
    margin-bottom: 0;
}

.dock-live-chat-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.dock-live-chat-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    font-family: inherit;
}

.dock-live-chat-send {
    width: 44px;
    height: 44px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.dock-live-chat-send:hover {
    background: #005a87;
}

.dock-live-chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .dock-live-chat-window {
        width: calc(100vw - 20px);
        right: -10px;
        bottom: 80px;
    }
}

