#wn-chat-root {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.wn-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
}

.wn-chat-toggle:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.28);
}

.wn-chat-toggle svg {
    width: 28px;
    height: 28px;
}

.wn-chat-window {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 365px;
    max-width: calc(100vw - 32px);
    height: 515px;
    max-height: calc(100vh - 110px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px) scale(0.97);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.wn-chat-window.wn-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.wn-chat-header {
    padding: 15px 18px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wn-chat-header-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.wn-chat-header-title {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
}

.wn-chat-header-subtitle {
    font-size: 12.5px;
    opacity: 0.92;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wn-chat-online-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
}

.wn-chat-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.85;
    padding: 0 4px;
}

.wn-chat-close:hover {
    opacity: 1;
}

.wn-anon-strip {
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    padding: 7px 14px;
    font-size: 11.5px;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.wn-contact-toggle-btn {
    background: transparent;
    border: none;
    color: #2563EB;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    white-space: nowrap;
}

.wn-contact-box {
    display: none;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 14px;
    gap: 6px;
    flex-direction: column;
}

.wn-contact-box.wn-contact-open {
    display: flex;
}

.wn-contact-box-note {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.35;
}

.wn-contact-row {
    display: flex;
    gap: 6px;
}

.wn-contact-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12.5px;
    outline: none;
    background: #fff;
}

.wn-contact-input:focus {
    border-color: #2563EB;
}

.wn-contact-save-btn {
    background: #2563EB;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.wn-contact-saved-msg {
    font-size: 11.5px;
    color: #16a34a;
    font-weight: 600;
}

.wn-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wn-msg-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 82%;
}

.wn-msg-wrapper-visitor {
    align-self: flex-end;
    align-items: flex-end;
}

.wn-msg-wrapper-consultant {
    align-self: flex-start;
    align-items: flex-start;
}

.wn-msg-author {
    font-size: 11.5px;
    color: #64748b;
    margin-bottom: 3px;
    padding-left: 4px;
    font-weight: 500;
}

.wn-msg {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.wn-msg-visitor {
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.wn-msg-consultant {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.wn-chat-form {
    display: flex;
    padding: 12px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    gap: 8px;
    position: relative;
}

.wn-hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.wn-chat-input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 9px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease;
}

.wn-chat-input:focus {
    border-color: #2563EB;
}

.wn-chat-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    transition: opacity 0.15s ease;
}

.wn-chat-send:hover {
    opacity: 0.9;
}

.wn-chat-send svg {
    width: 18px;
    height: 18px;
}
