.chat-widget {
    position: fixed;
    bottom: 70px;
    right: 20px;
    z-index: 1000;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    background: #e60023;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    position: relative;
}

.chat-toggle span {
    font-size: 24px;
    color: white;
}

.unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.new-message-count {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.chat-box {
    width: 300px;
    height: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    position: fixed;
    bottom: 140px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: #e60023;
    color: white;
    padding: 15px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-menu-dropdown {
    position: absolute;
    top: 50px;
    right: 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1002;
    min-width: 150px;
}

.menu-item {
    display: block;
    width: 100%;
    padding: 10px 15px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.menu-item:hover {
    background: #f5f5f5;
}

.chat-header-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.chat-header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

#chatClose {
    font-size: 20px;
}

.chat-start-btn {
    width: 100%;
    padding: 10px;
    background: #e60023;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.chat-start-btn:hover {
    background: #cc001f;
}

.menu-item:first-child {
    border-radius: 8px 8px 0 0;
}

.menu-item:last-child {
    border-radius: 0 0 8px 8px;
}

.chat-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    max-height: 280px;
}

.message {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
}

.message.own {
    background: #e60023;
    color: white;
    margin-left: auto;
}

.message.other {
    background: #f1f1f1;
    color: #333;
}

.message-info {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
}

.chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
}

.chat-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

.chat-input button {
    background: #e60023;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    margin-left: 8px;
    cursor: pointer;
}

.guest-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.guest-form h4 {
    font-size: 16px;
    font-weight: 600;
}

.guest-form input {
    font-size: 14px;
}

.chat-notification {
    position: fixed;
    bottom: 140px;
    right: 20px;
    background: #e60023;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1001;
    animation: slideIn 0.3s ease;
    max-width: 250px;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 480px) {
    .chat-widget {
        right: 10px;
        bottom: 85px;
    }

    .chat-box {
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 85px;
        width: auto;
        height: auto;
    }

    .chat-messages {
        max-height: none;
        flex: 1;
    }

    .chat-toggle {
        width: 50px;
        height: 50px;
    }

    .chat-toggle span {
        font-size: 20px;
    }

    .chat-notification {
        right: 10px;
        bottom: 155px;
        max-width: calc(100vw - 20px);
    }
}
