/* ================================
   ENHANCED STYLES FOR EXISTING MYSERVICE63 MODALS
   Дополнения к существующим формам и модальным окнам
   ================================ */

/* ================================
   1. УЛУЧШЕНИЯ ДЛЯ СУЩЕСТВУЮЩИХ МОДАЛЬНЫХ ОКОН FANCYBOX
   ================================ */

/* Оверлей Fancybox */
.fancybox-bg {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%) !important;
    backdrop-filter: blur(10px);
}

.fancybox-container {
    backdrop-filter: blur(5px);
}

/* Модальное окно Fancybox */
.fancybox-slide--html .fancybox-content {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    padding: 0;
    overflow: hidden;
    max-width: 500px;
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Кнопка закрытия */
.fancybox-button--close {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    right: -18px;
    top: -18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.fancybox-button--close:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.fancybox-button--close svg {
    width: 16px;
    height: 16px;
}

/* ================================
   2. СТИЛИЗАЦИЯ ФОРМЫ ЗАКАЗА ЗВОНКА (form_order_call.php)
   ================================ */

/* Заголовок формы */
.myservice__header-top-modal-form h3,
.order__call h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.myservice__header-top-modal-form h3::after,
.order__call h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FFE53B 0%, #FF2525 100%);
    animation: shimmerLine 3s infinite;
}

@keyframes shimmerLine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Тело формы */
.order__call {
    padding: 40px 30px;
    background: #fff;
}

/* Поля ввода */
.order__call input[type="text"],
.order__call input[type="tel"],
.order__call input[type="email"],
.order__call textarea,
.form-subscribe input[type="email"] {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: #F9FAFB;
    margin-bottom: 20px;
}

.order__call input[type="text"]:focus,
.order__call input[type="tel"]:focus,
.order__call input[type="email"]:focus,
.order__call textarea:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

/* Placeholder стили */
.order__call input::placeholder,
.order__call textarea::placeholder {
    color: #9CA3AF;
    font-weight: 400;
}

/* Labels для полей */
.order__call label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    letter-spacing: 0.3px;
}

/* Textarea */
.order__call textarea {
    min-height: 120px;
    resize: vertical;
    font-family: 'Inter', sans-serif;
}

/* ================================
   3. РАДИО-КНОПКИ И ЧЕКБОКСЫ
   ================================ */

/* Радио-кнопки */
.form__radiobox label {
    position: relative;
    padding-left: 35px;
    margin-bottom: 15px;
    cursor: pointer;
    font-size: 15px;
    color: #4B5563;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.form__radiobox label:hover {
    color: #667eea;
}

.radio-style {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 2px solid #D1D5DB;
    border-radius: 50%;
    background: #fff;
    transition: all 0.3s ease;
}

.radio-box:checked + .radio-style {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.radio-box:checked + .radio-style::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    animation: radioCheck 0.3s ease;
}

@keyframes radioCheck {
    0% { transform: translate(-50%, -50%) scale(0); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Чекбоксы */
.checkbox {
    position: relative;
    padding-left: 30px;
    margin-bottom: 20px;
    cursor: pointer;
    font-size: 14px;
    color: #6B7280;
    user-select: none;
}

.checkbox__label {
    display: flex;
    align-items: center;
    line-height: 1.5;
}

.checkbox__label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    border: 2px solid #D1D5DB;
    border-radius: 6px;
    background: #fff;
    transition: all 0.3s ease;
}

.checkbox input[type="checkbox"]:checked + .checkbox__label::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.checkbox input[type="checkbox"]:checked + .checkbox__label::after {
    content: '✓';
    position: absolute;
    left: 6px;
    top: 3px;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    animation: checkmark 0.3s ease;
}

@keyframes checkmark {
    0% { transform: scale(0) rotate(-45deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0); }
}

/* Ссылки в чекбоксах */
.checkbox__label a {
    color: #667eea;
    text-decoration: underline;
    margin: 0 4px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.checkbox__label a:hover {
    color: #764ba2;
    text-decoration: none;
}

/* ================================
   4. КНОПКИ ОТПРАВКИ
   ================================ */

/* Основная кнопка */
.default_btn,
.order__call button[type="submit"],
.form-subscribe button[type="submit"] {
    /*width: 100%;*/
    width: auto;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-top: 10px;
}

.default_btn::before,
.order__call button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.default_btn:hover,
.order__call button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.default_btn:hover::before,
.order__call button[type="submit"]:hover::before {
    width: 400px;
    height: 400px;
}

.default_btn:active,
.order__call button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* ================================
   5. ВЫПАДАЮЩЕЕ МЕНЮ МОДАЛЬНОГО ОКНА
   ================================ */

/* Кнопка открытия */
.myservice__header-top-modal > span {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
    font-size: 20px;
}

.myservice__header-top-modal > span:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.myservice__header-top-modal > span.close-drop {
    transform: rotate(180deg);
}

/* Выпадающее меню */
.myservice__header-top-modal-drop {
    position: absolute;
    right: 0;
    top: 60px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.myservice__header-top-modal-drop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.myservice__header-top-modal-drop::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 16px;
    height: 16px;
    background: #fff;
    transform: rotate(45deg);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

.myservice__header-top-modal-drop ul {
    padding: 8px;
    margin: 0;
    list-style: none;
}

.myservice__header-top-modal-drop ul li {
    margin: 0;
    padding: 0;
}

.myservice__header-top-modal-drop ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    color: #4B5563;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.myservice__header-top-modal-drop ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.myservice__header-top-modal-drop ul li a:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
    transform: translateX(4px);
}

.myservice__header-top-modal-drop ul li a:hover::before {
    left: 100%;
}

.myservice__header-top-modal-drop ul li a span[class^="icon-"] {
    font-size: 18px;
    color: #667eea;
}

/* Callback link стиль */
.myservice__header-top-modal-drop ul li a.callback {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 600;
}

.myservice__header-top-modal-drop ul li a.callback:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateX(4px) scale(1.02);
}

.myservice__header-top-modal-drop ul li a.callback span[class^="icon-"] {
    color: #fff;
}

/* ================================
   6. ФОРМА АВТОРИЗАЦИИ (form_sing_in.php)
   ================================ */

.myservice-login__wrapper {
    position: absolute;
    right: 0;
    top: 60px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    min-width: 350px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.myservice-login__wrapper.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.sing__in h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 25px;
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
}

.sing__in form {
    padding: 30px;
}

.sing__in input[type="text"],
.sing__in input[type="password"],
.sing__in input[type="email"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 15px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    background: #F9FAFB;
}

.sing__in input[type="text"]:focus,
.sing__in input[type="password"]:focus,
.sing__in input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Иконка глаза для пароля */
.password-toggle {
    position: relative;
}

.password-toggle .toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #9CA3AF;
    transition: color 0.3s ease;
}

.password-toggle .toggle-password:hover {
    color: #667eea;
}

/* Ссылки в форме */
.sing__in a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.sing__in a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ================================
   7. УВЕДОМЛЕНИЯ И АЛЕРТЫ
   ================================ */

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.4s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.alert i {
    font-size: 20px;
}

/* ================================
   8. LOADING STATES
   ================================ */

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* ================================
   9. FORM VALIDATION STYLES
   ================================ */

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group.has-error input {
    border-color: #EF4444;
    background: #FEF2F2;
}

.form-group.has-success input {
    border-color: #10B981;
    background: #F0FDF4;
}

.form-error {
    color: #EF4444;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.form-group.has-error .form-error {
    display: block;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ================================
   10. TOOLTIPS
   ================================ */

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #111827 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateY(-5px);
}

/* ================================
   11. КАПЧА
   ================================ */

.captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    border-radius: 12px;
}

.captcha-image {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #D1D5DB;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 3px;
    color: #667eea;
    user-select: none;
}

.captcha-refresh {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.captcha-refresh:hover {
    transform: rotate(180deg);
}

.captcha-input {
    flex: 1;
    padding: 10px;
    border: 2px solid #D1D5DB;
    border-radius: 8px;
    font-size: 16px;
}

/* ================================
   12. RESPONSIVE IMPROVEMENTS
   ================================ */

@media (max-width: 768px) {
    .myservice__header-top-modal-drop,
    .myservice-login__wrapper {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        min-width: 100%;
        border-radius: 0;
        transform: translateY(100%);
    }

    .myservice__header-top-modal-drop.show,
    .myservice-login__wrapper.show {
        transform: translateY(0);
        top: 82px;
    }

    .fancybox-slide--html .fancybox-content {
        border-radius: 20px 20px 0 0;
        max-width: 100%;
        margin-top: auto;
    }

    .modal {
        width: 95%;
        max-width: none;
    }
}