/* Chat Support Button */
.chat-support-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: none;
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
    cursor: pointer;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
}

.chat-support-button.show {
    display: flex; /* Show when 'show' class is added */
    animation: chatButtonAppear 0.6s ease-out forwards;
}

.chat-support-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 35px rgba(79, 70, 229, 0.4);
}

.chat-support-button:active {
    transform: translateY(0) scale(0.98);
}

.chat-support-button svg {
    width: 28px;
    height: 28px;
    color: white;
    transition: transform 0.3s ease;
}

.chat-support-button:hover svg {
    transform: scale(1.1);
}

@keyframes chatButtonAppear {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Chat Modal */
.chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20001;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.chat-modal.show {
    display: flex;
    opacity: 1;
}

.chat-modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.chat-modal.show .chat-modal-content {
    transform: scale(1);
}

.chat-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
}

.chat-modal-header h3 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 600;
}

.chat-modal-close {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.chat-modal-close:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.chat-modal-close svg {
    width: 16px;
    height: 16px;
    stroke-width: 3;
}

.chat-modal-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-modal-body p {
    margin: 0 0 16px 0;
    color: #6b7280;
    font-size: 1.3rem;
    line-height: 1.4;
}

.chat-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.chat-form .form-group {
    margin-bottom: 12px;
}

.chat-form label {
    margin-bottom: 2px;
    color: #374151;
    font-weight: 500;
    font-size: 1.3rem;
    display: block;
}

/* Стили для выбора способа связи */
.contact-method-selection {
    margin-bottom: 2px;
    padding: 2px 0;
}


.contact-method-options {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.radio-option:hover {
    background-color: #f1f5f9;
}

.radio-option input[type="radio"] {
    width: auto;
    margin: 0 12px 0 0;
    padding: 0;
    cursor: pointer;
    accent-color: #4f46e5;
}

.radio-label {
    font-size: 1.1rem;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
}

.field-hint {
    color: #888;
    font-weight: normal;
    font-size: 0.9em;
}

/* Стили для Telegram секции */
.telegram-section {
    text-align: center;
    padding: 20px;
}


.telegram-btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0088cc 0%, #00a8ff 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.telegram-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
    color: white;
    text-decoration: none;
}

.chat-form input,
.chat-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1.3rem;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    font-family: inherit;
}

.chat-form input:focus,
.chat-form textarea:focus {
    border-color: #4f46e5;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.chat-form textarea {
    resize: vertical;
    min-height: 80px;
}

.chat-submit-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 4px;
    margin-bottom: 4px;
}

.chat-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
}

.chat-submit-btn:active {
    transform: translateY(0);
}

.chat-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.chat-submit-btn:disabled:hover {
    transform: none;
    box-shadow: none;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

/* Mobile responsive for chat button */
@media (max-width: 768px) {
    .chat-support-button {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
    
    .chat-support-button svg {
        width: 24px;
        height: 24px;
    }
    
    .chat-modal-content {
        width: 95%;
        margin: 20px;
        max-height: 85vh;
    }
    
    .chat-modal-header,
    .chat-modal-body {
        padding: 16px;
    }
    
    .chat-modal-header h3 {
        font-size: 1.6rem;
    }
    
    .chat-modal-body p {
        font-size: 1.3rem;
    }
    
    .chat-form label {
        font-size: 1.3rem;
    }
    
    .contact-method-selection {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .contact-method-selection h4 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .contact-method-options {
        flex-direction: column;
        gap: 8px;
    }
    
    .radio-label {
        font-size: 1.1rem;
    }
    
    .telegram-btn {
        padding: 10px 20px;
        font-size: 1.1rem;
    }
    
    .chat-form input,
    .chat-form textarea {
        font-size: 1.3rem;
        padding: 8px 10px;
    }
    
    .chat-submit-btn {
        font-size: 1.3rem;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .chat-support-button {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
    }
    
    .chat-support-button svg {
        width: 20px;
        height: 20px;
    }
    
    .chat-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        margin: 0;
    }
    
    .chat-modal-header,
    .chat-modal-body {
        padding: 16px;
    }
}
