/* Кнопка для проверки заказа */
.order-check-button {
    position: absolute;
    top: 1px;
    right: 93px;
    width: 48px;
    height: 48px;
    background: rgb(255, 255, 255);
    border: 1px solid rgba(204, 204, 204, 0.49);
    cursor: pointer;
    border-radius: 18%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.order-check-button svg {
    width: 24px;
    height: 24px;
}

.order-check-button, .ios-search-btn {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s; /* Плавное появление */
}

.order-check-button.hidden, .ios-search-btn.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s; /* Плавное исчезновение */
}

.order-check-button:hover {
    background-color: rgba(240, 240, 240, 1);
}

/* Модальное окно заказа */
.order-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
}

.order-modal-content {
    background-color: rgba(30, 30, 30, 0.9);
    width: 90%;
    max-width: 900px;
    margin: 50px auto;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    color: white;
}

.order-modal-content h2 {
    color: white;
    margin-bottom: 10px;
}

.order-instruction {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 15px;
}

.block-message {
    color: #ff5a00;
    font-size: 16px;
    text-align: center;
}

/* Контейнер для ввода номера заказа, email и телефона */
#order-input-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

#order-input-container input {
    font-size: 16px; /* Минимальный размер шрифта для предотвращения зума */
    -webkit-appearance: none; /* Убирает стандартные стили Safari */
    width: 100%; /* или конкретная ширина */
    padding: 8px;
    box-sizing: border-box;
}

#order-input-container input:focus {
    font-size: 16px; /* Фиксируем размер при фокусе */
    outline: none; /* Убираем стандартный outline, если нужно */
}

/* Опционально: контроль контейнера */
#order-input-container {
    max-width: 100%;
    overflow-x: hidden;
}

#order-id-input,
#order-email-input,
#order-phone-input {
    width: 100%;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
}

#order-id-input:focus,
#order-email-input:focus,
#order-phone-input:focus {
    border-color: #eeeeee;
}

#fetch-order-button {
    background: linear-gradient(135deg, #f44336, #ffeb3b, #4caf50);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

#fetch-order-button:hover {
    background-color: #45a049;
}

/* Детали заказа */
.order-details {
    font-size: 16px;
}

.order-section {
    margin-bottom: 20px;
}

.order-details h3 {
    color: white;
}

/* Таблица товаров */
.order-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.order-items-table th,
.order-items-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.order-items-table th {
    background-color: rgba(255, 255, 255, 0.05);
    font-weight: bold;
    color: #fff;
}

.order-items-table td {
    vertical-align: middle;
}

.order-item-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 5px;
    vertical-align: middle;
}

.order-item-link {
    color: #f9f9f9;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-item-link:hover,
.order-item-link:focus {
    text-decoration: underline;
    color: #b7b7b7;
}

/* Кнопка закрытия */
.close-order-modal {
    background-color: transparent;
    border: none;
    font-size: 28px;
    color: #ffffff;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Адаптивные стили */
@media (max-width: 1024px) {
    .order-check-button {
        top: -50px;
        right: 85px;
        width: 45px;
        height: 45px;
    }

    .order-check-button svg {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 767px) {
    .order-check-button {
        top: 1px;
        right: 86px;
        width: 48px;
        height: 48px;
    }

    .order-check-button svg {
        width: 20px;
        height: 20px;
    }

    .order-modal-content {
        width: 100%;
        margin: 0 auto;
        padding: 15px;
        border-radius: 0;
        max-height: 90vh;
    }

    #order-id-input,
    #order-email-input,
    #order-phone-input {
        font-size: 14px;
        padding: 8px;
    }

    #fetch-order-button {
        padding: 8px;
        font-size: 14px;
    }

    .order-details {
        font-size: 14px;
    }

    .order-items-table th,
    .order-items-table td {
        padding: 8px;
    }

    .order-item-image {
        width: 30px;
        height: 30px;
    }

    .order-item-link {
        gap: 8px;
    }

    .order-modal-content h2 {
        font-size: 18px;
    }

    .order-instruction {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .order-check-button {
        top: 1px;
        right: 86px;
        width: 48px;
        height: 48px;
    }

    .order-check-button svg {
        width: 18px;
        height: 18px;
    }

    .order-modal-content {
        padding: 10px;
    }

    #order-id-input,
    #order-email-input,
    #order-phone-input {
        font-size: 12px;
        padding: 6px;
    }

    #fetch-order-button {
        padding: 6px;
        font-size: 12px;
    }

    .order-details {
        font-size: 12px;
    }

    .order-items-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .order-items-table th,
    .order-items-table td {
        padding: 6px;
        min-width: 100px;
    }

    .order-item-image {
        width: 25px;
        height: 25px;
    }

    .order-item-link {
        gap: 6px;
    }

    .close-order-modal {
        font-size: 24px;
        top: 15px;
        right: 15px;
    }

    .order-instruction {
        font-size: 11px;
    }
}