/* OCPW AI Chat Widget */
.ocpw-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.ocpw-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #001F3F;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 31, 63, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.ocpw-chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(0, 31, 63, 0.5);
}

.ocpw-chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff6a00;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chat Window */
.ocpw-chat-window {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 370px;
    max-height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 31, 63, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e5e5e5;
}

@media (max-width: 480px) {
    .ocpw-chat-window {
        width: calc(100vw - 32px);
        right: -8px;
        bottom: 70px;
        max-height: 70vh;
    }
}

/* Header */
.ocpw-chat-header {
    background: #001F3F;
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ocpw-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ocpw-chat-avatar {
    font-size: 1.5rem;
}

.ocpw-chat-header-info strong {
    display: block;
    font-size: 0.95rem;
}

.ocpw-chat-status {
    font-size: 0.75rem;
    color: #7be39a;
}

.ocpw-chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.ocpw-chat-close:hover {
    color: #ff6a00;
}

/* Messages */
.ocpw-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 320px;
    min-height: 200px;
}

.ocpw-chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ocpw-chat-msg p {
    margin: 0;
}

.ocpw-chat-bot {
    background: #f0f4f8;
    color: #001F3F;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.ocpw-chat-user {
    background: #001F3F;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ocpw-chat-typing {
    background: #f0f4f8;
    color: #666;
    align-self: flex-start;
    font-style: italic;
    border-bottom-left-radius: 4px;
}

/* Input */
.ocpw-chat-input-wrap {
    display: flex;
    padding: 12px 16px;
    border-top: 1px solid #e5e5e5;
    gap: 8px;
}

.ocpw-chat-input-wrap input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.ocpw-chat-input-wrap input:focus {
    border-color: #ff6a00;
}

#ocpw-chat-send {
    background: #ff6a00;
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

#ocpw-chat-send:hover {
    background: #001F3F;
}

/* Footer */
.ocpw-chat-footer {
    text-align: center;
    padding: 8px;
    background: #f8f9fa;
    border-top: 1px solid #e5e5e5;
    font-size: 0.8rem;
}

.ocpw-chat-footer a {
    color: #001F3F;
    text-decoration: none;
    font-weight: 600;
}

.ocpw-chat-footer a:hover {
    color: #ff6a00;
}
