/* Быстрые фиксы для мобильных устройств */

/* Фикс для 100vh на мобильных (учитывает адресную строку браузера) */
@media (max-width: 768px) {
    .full-height {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    html {
        height: -webkit-fill-available;
    }
}

/* Фикс для input zoom на iOS */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* Фикс для sticky элементов на iOS */
@supports (-webkit-overflow-scrolling: touch) {
    .sticky-element {
        position: -webkit-sticky;
        position: sticky;
    }
}

/* Фикс для overflow на iOS */
@media (max-width: 768px) {
    body {
        position: relative;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
}

/* Фикс для активного состояния на iOS */
@media (max-width: 768px) {
    button,
    a,
    input[type="submit"],
    input[type="button"] {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        -webkit-user-select: none;
        user-select: none;
    }
}

/* Фикс для скролла внутри модальных окон на iOS */
@media (max-width: 768px) {
    .modal-content,
    .scrollable-content {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
    }
}

/* Фикс для position fixed на Android */
@media (max-width: 768px) {
    .fixed-element {
        position: fixed;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Фикс для flexbox на старых Android */
@media (max-width: 768px) {
    .flex-container {
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
    }
}

/* Фикс для backdrop-filter на мобильных */
@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
    .blur-background {
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
}

/* Фикс для safe-area на iOS */
@supports (padding: max(0px)) {
    body {
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
}

/* Фикс для кликабельности на iOS */
@media (max-width: 768px) {
    * {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    a, button, input, select, textarea {
        cursor: pointer;
    }
}

/* Фикс для transform на Android */
@media (max-width: 768px) {
    .animated-element {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
    }
}

/* Фикс для overflow-scrolling на iOS */
@media (max-width: 768px) {
    .scrollable {
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
    }
}

/* Фикс для border-radius на изображениях в Safari */
@media (max-width: 768px) {
    img {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Фикс для video на мобильных */
@media (max-width: 768px) {
    video {
        width: 100%;
        height: auto;
        object-fit: contain;
    }
}

/* Фикс для select на iOS */
@media (max-width: 768px) {
    select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 10px center;
        background-size: 20px;
        padding-right: 40px;
    }
}

/* Фикс для placeholder на мобильных */
@media (max-width: 768px) {
    ::placeholder {
        opacity: 0.6;
    }
    
    ::-webkit-input-placeholder {
        opacity: 0.6;
    }
    
    ::-moz-placeholder {
        opacity: 0.6;
    }
    
    :-ms-input-placeholder {
        opacity: 0.6;
    }
}

/* Фикс для focus на мобильных */
@media (max-width: 768px) {
    input:focus,
    textarea:focus,
    select:focus {
        outline: none;
        border-color: #218cf9;
    }
}

/* Фикс для disabled элементов */
@media (max-width: 768px) {
    button:disabled,
    input:disabled,
    select:disabled,
    textarea:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }
}

/* Фикс для горизонтального скролла */
@media (max-width: 768px) {
    .horizontal-scroll {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .horizontal-scroll::-webkit-scrollbar {
        display: none;
    }
}

/* Фикс для модальных окон на мобильных */
@media (max-width: 768px) {
    .modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Фикс для touch events */
@media (hover: none) and (pointer: coarse) {
    .hover-effect:hover {
        /* Отключаем hover эффекты на touch устройствах */
        transform: none;
        opacity: 1;
    }
    
    .hover-effect:active {
        /* Добавляем active эффекты вместо hover */
        opacity: 0.8;
        transform: scale(0.98);
    }
}

/* Фикс для landscape на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        min-height: 100vh;
    }
}

/* Фикс для notch на iPhone X и новее */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .header[data-v-fed5196b] {
            padding-top: max(10px, env(safe-area-inset-top));
        }
        
        .footer[data-v-0d9af663] {
            padding-bottom: max(15px, env(safe-area-inset-bottom));
        }
    }
}

/* Фикс для performance на мобильных */
@media (max-width: 768px) {
    * {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    img,
    video {
        will-change: transform;
    }
}

/* Фикс для pull-to-refresh на iOS */
@media (max-width: 768px) {
    body {
        overscroll-behavior-y: contain;
    }
}

/* Фикс для text selection на мобильных */
@media (max-width: 768px) {
    .no-select {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
}
