* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body {
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    height: 100vh;
    height: 100dvh;
}
#cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}
.cookie-modal {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    width: 90%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    position: relative;
}
.cookie-modal h3 {
    margin-bottom: 12px;
    font-size: 20px;
    color: #333;
}
.cookie-modal p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}
.policy-wrapper {
    position: static;
    display: inline;
}
.policy-link {
    color: #555555;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s;
}
.policy-link:hover {
    color: #333333;
}
.policy-tooltip {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 320px;
    background-color: #333;
    color: #fff;
    text-align: left;
    padding: 15px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.4;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    z-index: 10001;
    pointer-events: none;
    transition: opacity 0.2s, visibility 0.2s;
}
.policy-tooltip strong {
    color: #fff;
    display: block;
    margin-bottom: 4px;
}
.policy-tooltip.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}
#accept-cookies {
    background: #0088cc;
    color: #fff;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}
#accept-cookies:hover {
    background: #0077b3;
}
#chat-container {
    width: 100%;
    max-width: 500px;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
#chat-header {
    background: #fff;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}
.bot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
}
.bot-info {
    display: flex;
    flex-direction: column;
}
.bot-name {
    font-weight: 600;
    font-size: 16px;
}
.bot-status {
    font-size: 13px;
    color: #0088cc;
}
#messages-area {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #e0f0ff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 16px;
    line-height: 1.4;
    word-wrap: break-word;
}
.message.bot {
    background: #fff;
    color: #000;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.message.user {
    background: #0088cc;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
#input-area {
    display: flex;
    padding: 10px;
    background: #fff;
    align-items: flex-end;
    border-top: 1px solid #e0e0e0;
}
#email_trap {
    display: none;
}
#message-input {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    padding: 10px 0 10px 10px;
    font-size: 16px;
    max-height: 100px;
    min-height: 40px;
    background: transparent;
}
#send-btn {
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
#send-btn svg {
    fill: #a0a0a0;
    transition: fill 0.2s;
}
#send-btn.active svg {
    fill: #0088cc;
}
.typing-indicator {
    background: #fff;
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    display: flex;
    gap: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: #a0a0a0;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}
.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}