/* �������� ����� ��� (���� �����) */
.floating-chat-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
    cursor: pointer;
}

.chat-btn-inner {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    position: relative;
    transition: all 0.3s ease;
}

.chat-btn-inner:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
}

.pulse-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid #667eea;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.ring-2 {
    animation-delay: 1s;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.chat-modal {
    position: fixed;
    bottom: 80px;
    left: 30px;
    width: 320px;
    height: 480px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
    z-index: 1001;
    display: none;
    overflow: hidden;
    animation: slideInUp 0.3s ease;
}

.chat-modal.active {
    display: block;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-status {
    font-size: 0.75rem;
    opacity: 0.9;
}

.user-status.online {
    color: #4ade80;
}

.chat-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f8f9ff;
    display: flex;
    flex-direction: column;
}

.time-stamp {
    text-align: center;
    color: #6b7280;
    font-size: 0.75rem;
    margin: 0.5rem 0;
}

.message {
    margin-bottom: 0.8rem;
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.message.received {
    align-items: flex-start;
}

.message.sent {
    align-items: flex-end;
    align-self: flex-end;
}

.message.sent .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message-bubble {
    background: white;
    padding: 0.6rem 0.8rem;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 0.85rem;
    line-height: 1.3;
}

.message-tail {
    position: absolute;
    bottom: 0;
    left: -6px;
    width: 12px;
    height: 16px;
    color: white;
}

.message.sent .message-tail {
    display: none;
}

.message-text {
    font-size: 0.8rem;
}

.message-time {
    font-size: 0.65rem;
    color: #6b7280;
    margin-top: 0.2rem;
    padding: 0 0.3rem;
}

.chat-answers {
    padding: 0.8rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.answers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.answer-option {
    position: relative;
}

.answer-option input {
    display: none;
}

.answer-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.4rem;
    background: #f8f9ff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    text-align: center;
    min-height: 50px;
    justify-content: center;
}

.answer-btn:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.answer-option input:checked + .answer-btn {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.answer-btn i {
    font-size: 0.9rem;
}

.chat-footer {
    padding: 0.8rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.input-container {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #f8f9ff;
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    border: 1.5px solid #e5e7eb;
    transition: all 0.3s ease;
}

.input-container:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chat-input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    padding: 0.3rem 0;
    font-size: 0.8rem;
    text-align: center;
    
}

.send-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.1);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.phone-error {
    color: #ef4444;
    font-size: 0.75rem;
    text-align: center;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

/***********inja***********
/* Ϙ�� ����� �� ��� */
.floating-chat-btn-with-text {
    position: fixed;
    bottom: 3px;
    right: 30px;
    z-index: 1000;
    cursor: pointer;
}

.chat-btn-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 8px 16px 8px 12px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.chat-btn-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.chat-btn-inner {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    position: relative;
    flex-shrink: 0;
}

.chat-btn-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    white-space: nowrap;
    padding-right: 8px;
}

.pulse-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid #667eea;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.ring-2 {
    animation-delay: 1s;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* ��������� ����� �� (���� ����� �� ���) */
.chat-modal {
    position: fixed;
    bottom: 65px;
    right: 30px;
    width: 320px;
    height: 480px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
    z-index: 1001;
    display: none;
    overflow: hidden;
    animation: slideInUp 0.3s ease;
}

.chat-modal.active {
    display: block;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ���� ��������� ����� �� ������ ����� ��� */
/* ... */

/* �Ӂ����� */
@media (max-width: 768px) {
    .floating-chat-btn-with-text {
        bottom: 20px;
        left: 20px;
    }
    
    .chat-btn-container {
        gap: 10px;
        padding: 6px 14px 6px 10px;
    }
    
    .chat-btn-inner {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .chat-btn-text {
        font-size: 0.85rem;
        padding-right: 6px;
    }
    
    .chat-modal {
        width: 300px;
        height: 450px;
        bottom: 85px;
        left: 20px;
    }
}

@media (max-width: 480px) {
    .chat-btn-text {
        /*display: none;
        font-size: 0.85rem;*/
        padding-right: 0px;
        
    }
    
    .chat-btn-container {
        padding: 8px;
    }
    
    .chat-modal {
        width: calc(100vw - 40px);
        left: 20px;
        right: 20px;
    }
    
    .floating-chat-btn-with-text {
        bottom: 10px; 
        left: auto;  
        right: auto;     
    }
}

/* ���� ���� ��� (�������) */
.chat-btn-container.folded {
    padding: 8px;
}

.chat-btn-container.folded .chat-btn-text {
    display: none;
}


@media (max-width: 768px) {
    .floating-chat-btn {
        bottom: 20px;
        left: 20px;
    }
    
    .chat-modal {
        width: 300px;
        height: 450px;
        bottom: 70px;
        left: 20px;
    }
    
    .chat-btn-inner {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
    
    .answers-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .answer-btn {
        font-size: 0.7rem;
        min-height: 45px;
        padding: 0.5rem 0.3rem;
    }
}

@media (max-width: 480px) {
    .chat-modal {
        width: calc(100vw - 40px);
        left: 20px;
        right: 20px;
    }
}