/* Order Widget Styles */
.consultation-widget {
    position: fixed;
    z-index: 1000;
}

.widget-trigger {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, rgba(31, 165, 253, 0.9), rgba(13, 202, 240, 0.9));
    border: 1px solid rgba(31, 165, 253, 0.3);
    border-left: none;
    border-radius: 0 25px 25px 0;
    padding: 15px 20px 15px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    display: flex;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    animation: widgetGlow 2s ease-in-out infinite alternate;
}

@keyframes widgetGlow {
    0% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 
                    0 0 20px rgba(31, 165, 253, 0.4);
    }
    100% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 
                    0 0 30px rgba(31, 165, 253, 0.8),
                    0 0 50px rgba(31, 165, 253, 0.4);
    }
}

.widget-trigger:hover {
    background: linear-gradient(135deg, rgba(31, 165, 253, 1), rgba(13, 202, 240, 1));
    box-shadow: 0 15px 40px rgba(31, 165, 253, 0.4);
    animation: none;
}

.widget-trigger i {
    color: #fff;
    font-size: 20px;
    margin-bottom: 10px;
    display: block;
    transform: rotate(90deg);
}

.widget-text {
    color: #fff;
    font-size: 18px;
    font-weight: 500;
}

.widget-sidebar {
    position: fixed;
    left: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: rgba(9, 16, 26, 0.95);
    border-right: 1px solid rgba(31, 165, 253, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.4s ease;
    z-index: 2001;
    overflow-y: auto;
}

.widget-sidebar.active {
    left: 0;
}

.widget-header {
    padding: 25px;
    border-bottom: 1px solid rgba(31, 165, 253, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(31, 165, 253, 0.1), rgba(13, 202, 240, 0.05));
}

.widget-header h3 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0;
    background: linear-gradient(90deg, #ffffff, #1fa5fd);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.widget-close {
    background: none;
    border: none;
    color: #c1d1e9;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.widget-close:hover {
    background: rgba(31, 165, 253, 0.2);
    color: #fff;
}

.widget-content {
    padding: 25px;
}

.widget-content p {
    color: #c1d1e9;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.social-icons-widget {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.social-icon-widget {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(31, 165, 253, 0.1), rgba(13, 202, 240, 0.1));
    border: 1px solid rgba(31, 165, 253, 0.2);
    color: #1fa5fd;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon-widget:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(31, 165, 253, 0.2), rgba(13, 202, 240, 0.2));
    color: #fff;
    box-shadow: 0 8px 16px rgba(31, 165, 253, 0.3);
}

.social-icon-widget i {
    font-size: 18px;
}

.widget-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget-form-group {
    position: relative;
}

.widget-form-group input,
.widget-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(31, 165, 253, 0.05);
    border: 1px solid rgba(31, 165, 253, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.widget-form-group input:focus,
.widget-form-group textarea:focus {
    outline: none;
    border-color: rgba(31, 165, 253, 0.3);
    background: rgba(31, 165, 253, 0.1);
}

.widget-form-group input::placeholder,
.widget-form-group textarea::placeholder {
    color: #8b9bb4;
}

.widget-btn {
    padding: 12px 25px;
    background: linear-gradient(90deg, #1fa5fd, #0dcaf0);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.widget-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(31, 165, 253, 0.3);
}

.widget-btn i {
    transition: transform 0.3s ease;
}

.widget-btn:hover i {
    transform: translateX(3px);
}

.widget-privacy {
    margin-top: 15px;
}

.widget-privacy .privacy-text {
    font-size: 11px;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.widget-privacy .privacy-text a {
    color: #1fa5fd;
    text-decoration: underline;
}

/* Privacy checkbox styles */
.widget-privacy .privacy-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.widget-privacy .privacy-checkbox {
    display: none;
}

.widget-privacy .checkmark {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid #8b9bb4;
    border-radius: 4px;
    position: relative;
    background: transparent;
    transition: all 0.3s ease;
    margin-top: 2px;
    animation: blink-attention 1.5s ease-in-out infinite;
}

.widget-privacy .privacy-checkbox:checked + .checkmark {
    background: #1fa5fd;
    border-color: #1fa5fd;
    animation: none;
}

.widget-privacy .privacy-checkbox:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.widget-privacy .privacy-checkbox-label:hover .checkmark {
    border-color: #1fa5fd;
}

.widget-privacy .privacy-text {
    color: #8b9bb4;
    font-size: 0.85rem;
    line-height: 1.4;
}

.widget-privacy .required-note {
    color: #ff4757;
    font-weight: bold;
    margin-left: 4px;
}

.widget-privacy .required-text {
    margin-top: 8px;
    text-align: center;
}

.widget-privacy .required-asterisk {
    color: #ff4757;
    font-weight: bold;
    font-size: 0.75rem;
}

/* Blinking animation for checkbox */
@keyframes blink-attention {
    0%, 50%, 100% {
        border-color: #8b9bb4;
        box-shadow: none;
        background: transparent;
    }
    25%, 75% {
        border-color: #1fa5fd;
        box-shadow: 0 0 12px rgba(31, 165, 253, 0.8), 0 0 20px rgba(31, 165, 253, 0.6);
        background: rgba(31, 165, 253, 0.1);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.widget-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.widget-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 769px) {
    .consultation-widget.active .widget-trigger {
        opacity: 0;
        pointer-events: none;
    }
}

/* Стили для планшетов и мобильных устройств (менее 768px) */
@media screen and (max-width: 768px) {
    .widget-trigger {
        left: auto;
        right: 20px;
        bottom: 20px;
        top: auto;
        transform: none;
        border-radius: 50%;
        border: 1px solid rgba(31, 165, 253, 0.3);
        padding: 15px;
        writing-mode: initial;
        text-orientation: initial;
        width: 60px;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }
    
    .widget-trigger:hover {
        transform: translateY(-5px);
    }
    
    .widget-trigger i {
        transform: none;
        margin-bottom: 2px;
        font-size: 18px;
    }
    
    .widget-text {
        display: none;
    }
    
    .widget-sidebar {
        width: 100%;
        left: -100%;
    }
    
    .widget-sidebar.active {
        left: 0;
    }
    
    .widget-content {
        padding: 20px;
    }
    
    .widget-header {
        padding: 20px;
    }
    
    .widget-header h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .widget-sidebar {
        height: 100vh;
        border-radius: 0;
    }

    .widget-content {
        padding: 15px;
    }

    .widget-header {
        padding: 15px;
    }

    .social-icons-widget {
        gap: 12px;
    }

    .social-icon-widget {
        width: 40px;
        height: 40px;
    }

    .social-icon-widget i {
        font-size: 16px;
    }
}