.open-chat-btn {
    position: fixed;
    bottom: 65px;
    right: -5px;
    width: 100px;
    height: 90px;
    border-radius: 50%;
    background: none;
    /* background: linear-gradient(135deg, var(--link-color) 0%, #3a56d4 100%);
    box-shadow: 0 4px 20px rgba(67, 97, 238, 0.4); 
    width: 60px;
    height: 60px; */
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
}

.open-chat-btn img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    max-width: initial;
}

.open-chat-btn:hover {
    transform: scale(1.1);
    /* box-shadow: 0 6px 25px rgba(67, 97, 238, 0.5); */
}

.chat-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
    align-items: center;
}

.chat-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.chat-modal {
    width: 90%;
    max-width: 800px;
    height: 80vh;
    max-height: 650px;
    background: linear-gradient(180deg, #ffffff 0%, #d3dcf5 50%, #d3e1f8 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.4s ease;
    margin: 0 auto;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 35px 0;
    background: transparent;
    width: 100%;
}

.header-content h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
    line-height: 1.3;
}

.header-content p {
    font-size: 15px;
    color: #6c757d;
    line-height: 1.5;
    margin: 8px 0;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.2s ease;
    flex-shrink: 0;
    margin: 5px 5px 0 0;
    text-align: right;
}

.close-btn:hover {
    color: #333;
}

.chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 35px;
    overflow-y: auto;
}

.input-container {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 15px rgba(67, 97, 238, 0.1);
    padding: 15px 20px;
    margin-bottom: 20px;
}

.chat-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    background: transparent;
    resize: none;
    font-family: inherit;
    line-height: 1.5;
}

.chat-input::placeholder {
    color: #adb5bd;
}

.input-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    height: 48px;
    border-radius: 48px;
    border: 1px solid rgba(27, 20, 85, 0.25);
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: rgba(27, 20, 85, 0.35);
    transition: all 0.2s;
    flex-shrink: 0;
}

.send-btn:hover {
    border-color: rgba(27, 20, 85, 0.5);
    color: rgba(27, 20, 85, 0.6);
}

.send-btn.active {
    background: var(--link-color);
    color: #fff;
    border-color: var(--link-color);
    box-shadow: 0 4px 12px rgba(53, 64, 146, 0.3);
}

.send-btn.active:hover {
    background: #2a3475;
    border-color: #2a3475;
}

.quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    justify-content: center;
}

.quick-btn {
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e0e5ec;
    border-radius: 20px;
    font-size: 13px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quick-btn:hover {
    background: var(--link-color);
    color: white;
    border-color: var(--link-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.disclaimer {
    font-size: 12px;
    color: #374553;
    line-height: 1.6;
    padding: 8px 15px;
    border-radius: 10px;
    text-align: center;
}

.response-section {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 15px rgba(67, 97, 238, 0.1);
    overflow: hidden;
}

.response-toggle {
    width: 100%;
    padding: 18px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--link-color);
    transition: background 0.2s ease;
}

.response-toggle:hover {
    background: rgba(67, 97, 238, 0.05);
}

.response-content {
    padding: 0 20px 18px;
    display: none;
}

.response-content p {
    font-size: 14px;
    line-height: 1.7;
    color: #495057;
}

.chat-footer {
    padding: 20px 35px;
    background: transparent;
    border-top: none;
}

.specialists-btn {
    width: 100%;
    padding: 16px 24px;
    background: #ffffff;
    border: 1px solid #e0e5ec;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.specialists-btn:hover {
    background: #f8f9ff;
    border-color: var(--link-color);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.2);
    transform: translateY(-2px);
}

.chat-messages {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    display: flex;
    justify-content: flex-end;
    animation: messageSlideIn 0.3s ease;
}

.message-user {
    background: var(--link-color);
    color: #fff;
    padding: 12px 18px;
    border-radius: 18px 18px 4px 18px;
    max-width: 75%;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.3);
    align-self: end;
}

.message-bot {
    display: flex;
    justify-content: flex-start;
    animation: messageSlideIn 0.3s ease;
}

.message-bot-content {
    background: #ffffff;
    color: #333;
    padding: 12px 18px;
    border-radius: 18px 18px 18px 4px;
    max-width: 75%;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-bot-content p {
    margin-bottom: 8px;
}

.message-bot-content p:last-child {
    margin-bottom: 0;
}

.message-bot-content strong {
    color: var(--link-color);
}

.message-bot-content ul,
.message-bot-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.message-bot-content li {
    margin-bottom: 4px;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 20px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #adb5bd;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-section {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #a5d6a7;
    animation: messageSlideIn 0.4s ease;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.result-header svg {
    color: #2e7d32;
    flex-shrink: 0;
}

.result-title {
    font-size: 16px;
    font-weight: 700;
    color: #2e7d32;
}

.result-subtitle {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    padding: 20px 0 10px;
}

.result-subtitle-text {
    font-size: 14px;
    font-weight: normal;
    color: #333;
}

.result-body {
    margin-bottom: 16px;
}

.result-body p {
    font-size: 14px;
    line-height: 1.7;
    color: #333;
}

.result-department {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #1b1455;
    display: flex;
    flex-wrap: wrap;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.restart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.restart-btn {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    border: 1px solid #ddd;
}

.restart-btn:hover {
    background: #fff;
    border-color: var(--link-color);
}

.branch-item {
    padding: 10px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #ddd;
    width: 32%;
    text-align: center;
    margin: 5px 4px;
}

.branch-item:hover {
    background: var(--background-blue);
    border: 1px solid var(--link-color);
}

.branch-item-icon {
    width: 40px;
    height: 40px;
    background: var(--link-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.branch-item-info {
    flex: 1;
}

.branch-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.branch-item-description {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

.chat-static {
    background: linear-gradient(180deg, #f0f4ff 0%, #e8f0fe 50%, #ffffff 100%);
    border-radius: 20px;
}

@media (max-width: 768px) {
    .chat-modal {
        width: 95%;
        height: 100%;
    }
    .chat-header {
        margin-top: 10px;
        padding: 0 12px;
    }
    .header-content h1 {
        font-size: 18px;
    }
    .header-content p {
        font-size: 13px;
    }
    .chat-body {
        padding: 0 20px;
    }
    .chat-messages {
        margin-bottom: 10px;
    }
    .quick-buttons {
        gap: 6px;
    }
    .quick-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    .chat-footer {
        padding: 15px 20px;
    }
    .branch-item {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .open-chat-btn {
        bottom: 160px;
        right: 30px;
        width: 55px;
        height: 55px;
    }
    .chat-modal {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }
    .header-content h1 {
        font-size: 16px;
    }
    .quick-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}