

/* Chat Widget Container */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

/* Speech Bubble */
.chat-bubble {
    background: #ffffff;
    border-radius: 20px;
    padding: 12px 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 200px;
    animation: slideInRight 0.4s ease-out;
    position: relative;
}

/* Speech bubble tail pointing to the button */
.chat-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 25px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #ffffff;
}

.chat-bubble-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.chat-bubble-text {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
}

/* Chat Button */
.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
    transition: all 0.3s ease;
    animation: slideInRight 0.5s ease-out 0.2s both;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.chat-button:active {
    transform: scale(0.95);
}

.chat-icon {
    width: 28px;
    height: 28px;
    color: white;
}

/* Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulse animation for attention */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.chat-button.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Content */
.modal-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: #f3f4f6;  /* Светло-серый фон */
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1f2937;
    z-index: 1000;
    padding: 0;
}

.modal-close:hover {
    background: #e5e7eb;
    transform: rotate(90deg);
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-close svg path {
    stroke: #1f2937;  /* Чёрный крестик */
    stroke-width: 2;
}

/* Modal Header */
.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

/* Modal Body */
.modal-body {
    text-align: center;
    margin-bottom: 32px;
}

.modal-text {
    font-size: 16px;
    color: #1a1a1a;
    line-height: 1.6;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.modal-subtext {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
    margin: 0;
    font-weight: 500;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: center;
}

.modal-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.modal-button:active {
    transform: translateY(0);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .chat-widget {
        bottom: 20px;
        right: 20px;
    }

    .chat-button {
        width: 56px;
        height: 56px;
    }

    .chat-icon {
        width: 24px;
        height: 24px;
    }

    .chat-bubble {
        max-width: 160px;
        padding: 10px 14px;
    }

    .chat-bubble-text {
        font-size: 13px;
    }

    .modal-content {
        padding: 32px 24px;
        max-width: 95%;
    }

    .modal-title {
        font-size: 24px;
    }

    .modal-icon {
        width: 70px;
        height: 70px;
    }

    .modal-text {
        font-size: 15px;
    }

    .modal-button {
        width: 100%;
        justify-content: center;
        padding: 12px 24px;
    }
}

.modal-text,
.modal-subtext,
.modal-title {
    color: #111827 !important;
}
