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

.chat-toggle {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--mc-green) 0%, var(--mc-green-dark) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(34, 197, 94, 0.3);
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-toggle:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 24px rgba(34, 197, 94, 0.4);
}

.chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 999px;
    border: 3px solid white;
}

.chat-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 3px solid var(--mc-green);
    transform-origin: bottom right;
    transition: all 0.3s transform ease, opacity 0.3s;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
}

.chat-window.show {
    display: flex;
    opacity: 1;
    transform: scale(1) translateY(0);
}

.chat-header {
    background: var(--mc-green);
    background: linear-gradient(90deg, var(--mc-green), var(--mc-green-dark));
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 750;
    border-bottom: 2px solid rgba(0,0,0,0.1);
}

.chat-header button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-header button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
}

.chat-footer {
    padding: 16px;
    border-top: 1px solid #f1f5f9;
    background: white;
}

.chat-footer form {
    display: flex;
    gap: 10px;
}

.chat-footer input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.chat-footer input:focus {
    border-color: var(--mc-green);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.chat-footer button {
    background: var(--mc-green);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 3px 0 var(--mc-green-dark);
}

.chat-footer button:hover {
    background: var(--mc-green-dark);
    transform: translateY(-2px);
}

.chat-footer button:active {
    transform: translateY(1px);
    box-shadow: 0 0 0;
}

.c-msg {
    max-width: 85%;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.c-msg .sender-name {
    font-size: 10px;
    font-weight: 800;
    margin-bottom: 6px;
    display: block;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 4px;
}

.c-msg.user .sender-name {
    border-bottom-color: rgba(255,255,255,0.2);
}

.msg-content {
    word-break: break-word;
}

.c-msg.admin {
    align-self: flex-start;
    background: white;
    border: 1px solid #f1f5f9;
    border-bottom-left-radius: 4px;
    color: var(--text-main);
}

.c-msg.user {
    align-self: flex-end;
    background: var(--mc-green);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 3px 0 var(--mc-green-dark);
}
