/**
 * Оптимизированные стили для мобильного виджета тарифов
 * Убраны дублирующиеся стили и неиспользуемые классы
 */

/* ===== ОСНОВНОЙ КОНТЕЙНЕР ===== */
.tariff-mobile-widget-container {
    background: #000000;
    color: #fff;
    padding: 20px;
    border-radius: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto;
}

/* ===== ЗАГОЛОВОК ===== */
.tariff-mobile-title {
    font-size: 2em;
    font-weight: 700;
    margin: 0 0 20px 0;
    text-align: center;
    color: #fff;
}

/* ===== ПАНЕЛЬ КАТЕГОРИЙ ===== */
.mobile-tariff-categories {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.mobile-category-item {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.7);
    padding: 15px 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: left;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-category-item:hover {
    color: #FF8C00;
    background: rgba(255, 140, 0, 0.1);
    border-color: rgba(255, 140, 0, 0.3);
    transform: translateX(5px);
}

.mobile-category-item.active {
    color: #FF8C00;
    background: rgba(255, 140, 0, 0.15);
    border-color: rgba(255, 140, 0, 0.4);
    font-weight: 600;
}

.mobile-category-item.active::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: #FF8C00;
    border-radius: 2px;
}

.category-arrow {
    font-size: 1.5em;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.mobile-category-item.active .category-arrow {
    opacity: 1;
    color: #FF8C00;
}

/* ===== ПОЛНОЭКРАННЫЙ КОНТЕНТ ===== */
.mobile-tariff-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.mobile-tariff-content.active {
    display: flex;
    animation: slideIn 0.3s ease-out;
}

/* ===== КНОПКИ УПРАВЛЕНИЯ ===== */
.mobile-control-buttons {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-btn, .close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.8);
}

.info-btn {
    border: 2px solid #1976D2;
    color: #1976D2;
}

.close-btn {
    border: 2px solid #FF8C00;
    color: #FF8C00;
    font-size: 20px;
}

.info-btn:hover, .close-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
}

/* ===== ИЗОБРАЖЕНИЕ ТАРИФА ===== */
.mobile-tariff-image {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.mobile-tariff-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== КОНТЕНТ ПОВЕРХ ИЗОБРАЖЕНИЯ ===== */
.mobile-tariff-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.92) 30%, rgba(0, 0, 0, 0.75) 60%, rgba(0, 0, 0, 0.4) 80%, transparent 100%);
    padding: 40px 30px;
    text-align: center;
    color: #fff;
}

.mobile-tariff-title {
    font-size: 2.5em;
    font-weight: 700;
    margin: 0 0 20px 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.mobile-tariff-time {
    background: rgba(76, 175, 80, 0.9);
    border: 2px solid #4CAF50;
    border-radius: 50px;
    padding: 15px 25px;
    display: inline-block;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.mobile-tariff-description {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* ===== ЦЕНЫ В ГОРИЗОНТАЛЬНЫХ ПОЛЯХ ===== */
.mobile-prices {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.price-circle {
    width: auto;
    height: auto;
    min-width: 140px;
    max-width: 180px;
    background: rgba(255, 140, 0, 0.9);
    border: 3px solid #FF8C00;
    border-radius: 25px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4);
    padding: 15px 20px;
    transition: all 0.3s ease;
    flex: 0 0 auto;
}

.price-circle:hover {
    background: rgba(255, 140, 0, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.6);
}

.price-label {
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 0;
    margin-right: 10px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    text-align: left;
    white-space: nowrap;
}

.price-value {
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    text-align: right;
    white-space: nowrap;
}

/* ===== КНОПКА ПОКУПКИ ===== */
.mobile-buy-button {
    background: linear-gradient(135deg, #FF8C00, #FF7F00);
    border: none;
    border-radius: 25px;
    padding: 18px 50px;
    color: #fff;
    font-weight: 700;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.4);
    min-width: 320px;
    width: 80%;
    max-width: 400px;
    margin-bottom: env(safe-area-inset-bottom, 0px);
}

.mobile-buy-button:hover {
    background: linear-gradient(135deg, #FF7F00, #FF6600);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.6);
}

.mobile-buy-button.disabled {
    background: linear-gradient(135deg, #666, #555);
    font-size: 1.0em;
    padding: 15px 40px;
    min-width: 280px;
    text-transform: none;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.mobile-buy-button.disabled:hover {
    background: linear-gradient(135deg, #666, #555);
    transform: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

/* Специальные стили для адаптации под URL строку браузера */
.mobile-tariff-overlay.with-url-bar .mobile-buy-button {
    margin-bottom: calc(env(safe-area-inset-bottom, 0px) + 80px) !important;
    transform: translateY(-40px) !important;
}

.mobile-tariff-overlay.viewport-adapted .mobile-buy-button {
    margin-bottom: calc(env(safe-area-inset-bottom, 0px) + 70px) !important;
    transform: translateY(-30px) !important;
}

/* Динамический отступ для iOS Safari и других браузеров */
@supports (padding: max(0px)) {
    .mobile-buy-button {
        margin-bottom: max(env(safe-area-inset-bottom), 0px);
    }
    
    .mobile-tariff-overlay.viewport-adapted .mobile-buy-button {
        margin-bottom: calc(max(env(safe-area-inset-bottom), 0px) + 70px) !important;
    }
    
    .mobile-tariff-overlay.with-url-bar .mobile-buy-button {
        margin-bottom: calc(max(env(safe-area-inset-bottom), 0px) + 80px) !important;
    }
}

/* Дополнительная адаптация для мобильных устройств */
@media only screen and (max-device-width: 480px) {
    .mobile-tariff-overlay.viewport-adapted .mobile-buy-button,
    .mobile-tariff-overlay.with-url-bar .mobile-buy-button {
        position: relative;
        bottom: 20px;
        margin-bottom: 80px !important;
        transform: translateY(-20px) !important;
    }
}

/* Специальная адаптация для iOS устройств */
@supports (-webkit-appearance: none) {
    @media only screen and (max-device-width: 768px) {
        .mobile-tariff-overlay.viewport-adapted .mobile-buy-button {
            margin-bottom: 90px !important;
            transform: translateY(-25px) !important;
        }
        
        .mobile-tariff-overlay.with-url-bar .mobile-buy-button {
            margin-bottom: 100px !important;
            transform: translateY(-35px) !important;
        }
    }
}

/* ===== ИНФОРМАЦИОННЫЙ МОДАЛ ===== */
.mobile-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(40, 40, 40, 0.95);
    z-index: 2000;
    display: none;
    flex-direction: column;
    backdrop-filter: blur(10px);
    overflow-y: auto;
}

.mobile-info-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.info-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 140, 0, 0.3);
}

.info-modal-title {
    font-size: 1.8em;
    font-weight: 700;
    color: #FF8C00;
    margin: 0;
}

.info-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #FF8C00;
    background: transparent;
    color: #FF8C00;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-modal-close:hover {
    transform: scale(1.1);
    background: rgba(255, 140, 0, 0.2);
}

.info-modal-content {
    padding: 30px;
    flex: 1;
    color: #fff;
    overflow-y: auto;
}

/* ===== КОНТЕНТ ИНФОРМАЦИОННОГО МОДАЛА ===== */
.product-description {
    background: rgba(255, 140, 0, 0.1);
    border: 1px solid rgba(255, 140, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.session-info {
    margin-bottom: 25px;
}

.session-info h4 {
    color: #4CAF50;
    font-size: 1.2em;
    margin-bottom: 10px;
    font-weight: 600;
}

.session-info p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
}

.features-info {
    margin-bottom: 25px;
}

.features-info h4 {
    color: #FF8C00;
    font-size: 1.2em;
    margin-bottom: 10px;
    font-weight: 600;
}

.features-info ul {
    list-style: none;
    padding: 0;
    background: rgba(255, 140, 0, 0.1);
    border: 1px solid rgba(255, 140, 0, 0.3);
    border-radius: 10px;
    padding: 15px 20px;
}

.features-info li {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.features-info li::before {
    content: '•';
    color: #FF8C00;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.price-info {
    margin-bottom: 25px;
}

.price-info h4 {
    color: #1976D2;
    font-size: 1.2em;
    margin-bottom: 10px;
    font-weight: 600;
}

.price-info p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
    background: rgba(25, 118, 210, 0.1);
    border: 1px solid rgba(25, 118, 210, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
}

/* ===== ОШИБКИ ===== */
.tariff-mobile-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: #F44336;
    font-weight: 600;
}

/* ===== ЗАГРУЗКА ===== */
.mobile-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.7);
}

.mobile-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 140, 0, 0.3);
    border-radius: 50%;
    border-top-color: #FF8C00;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

/* ===== МОДАЛЬНОЕ ОКНО ПОКУПКИ БИЛЕТОВ ===== */
.mobile-ticket-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
}

.mobile-ticket-modal {
    background: #1a1a1a;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 140, 0, 0.3);
}

.mobile-ticket-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 140, 0, 0.3);
}

.mobile-ticket-modal-header h3 {
    color: #FF8C00;
    font-size: 1.5em;
    font-weight: 700;
    margin: 0;
}

.mobile-ticket-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #FF8C00;
    background: transparent;
    color: #FF8C00;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-ticket-modal-close:hover {
    transform: scale(1.1);
    background: rgba(255, 140, 0, 0.2);
}

.mobile-ticket-modal-content {
    padding: 25px;
}

/* ===== ФОРМА ВЫБОРА БИЛЕТОВ ===== */
.mobile-ticket-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-ticket-type {
    background: rgba(255, 140, 0, 0.1);
    border: 1px solid rgba(255, 140, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-ticket-type label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.mobile-ticket-label {
    font-size: 1.2em;
    font-weight: 600;
    color: #fff;
}

.mobile-ticket-price {
    font-size: 1.1em;
    font-weight: bold;
    color: #FF8C00;
    background: rgba(255, 140, 0, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
}

.mobile-quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.mobile-qty-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #FF8C00;
    background: transparent;
    color: #FF8C00;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-qty-btn:hover {
    background: rgba(255, 140, 0, 0.2);
    transform: scale(1.05);
}

.mobile-qty-btn:active {
    transform: scale(0.95);
}

.mobile-qty-input {
    width: 80px;
    height: 50px;
    border: 2px solid rgba(255, 140, 0, 0.5);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-align: center;
    font-size: 1.3em;
    font-weight: bold;
    outline: none;
}

.mobile-qty-input:focus {
    border-color: #FF8C00;
    background: rgba(255, 140, 0, 0.1);
}

/* ===== ИТОГО И КНОПКА ПОКУПКИ ===== */
.mobile-total-price {
    background: rgba(255, 140, 0, 0.15);
    border: 2px solid rgba(255, 140, 0, 0.4);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    font-size: 1.3em;
    color: #FF8C00;
    margin-top: 10px;
}

.mobile-btn-buy-tickets {
    background: linear-gradient(135deg, #FF8C00, #FF7F00);
    border: none;
    border-radius: 25px;
    padding: 18px 40px;
    color: #fff;
    font-weight: 700;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.4);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.mobile-btn-buy-tickets:hover:not(:disabled) {
    background: linear-gradient(135deg, #FF7F00, #FF6600);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.6);
}

.mobile-btn-buy-tickets:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===== СООБЩЕНИЕ О НЕДОСТУПНОСТИ ===== */
.mobile-tariff-not-for-sale {
    text-align: center;
    padding: 25px 15px;
    color: rgba(255, 255, 255, 0.9);
}

.mobile-tariff-not-for-sale h3 {
    color: #FF8C00;
    font-size: 1.1em;
    margin-bottom: 10px;
    font-weight: 600;
}

.mobile-tariff-not-for-sale p {
    font-size: 0.95em;
    line-height: 1.4;
    margin: 0;
    opacity: 0.9;
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== БЛОКИРОВКА СКРОЛЛА ===== */
body.mobile-fullscreen-open,
body.mobile-info-modal-open,
body.mobile-ticket-modal-open {
    overflow: hidden;
}

/* ===== СКРЫТИЕ СКРОЛЛБАРА ===== */
.mobile-tariff-content::-webkit-scrollbar {
    display: none;
}

.mobile-tariff-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 480px) {
    .tariff-mobile-widget-container {
        padding: 15px;
        border-radius: 15px;
    }
    
    .mobile-control-buttons {
        top: 15px;
        left: 15px;
        right: 15px;
    }
    
    .mobile-tariff-overlay {
        padding: 30px 20px;
    }
    
    .mobile-tariff-title {
        font-size: 2em;
    }
    
    .mobile-prices {
        flex-direction: column;
        gap: 15px;
    }
    
    .price-circle {
        min-width: 280px;
        max-width: 320px;
    }
    
    .mobile-buy-button {
        min-width: 280px;
        font-size: 1.1em;
        padding: 16px 40px;
    }
    
    .mobile-ticket-modal-overlay {
        padding: 10px;
    }
    
    .mobile-ticket-modal {
        max-width: 100%;
        border-radius: 15px;
    }
    
    .mobile-ticket-modal-header {
        padding: 15px 20px;
    }
    
    .mobile-ticket-modal-header h3 {
        font-size: 1.3em;
    }
    
    .mobile-ticket-modal-content {
        padding: 20px;
    }
    
    .mobile-ticket-type {
        padding: 15px;
    }
    
    .mobile-qty-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3em;
    }
    
    .mobile-qty-input {
        width: 70px;
        height: 45px;
        font-size: 1.2em;
    }
    
    .mobile-total-price {
        font-size: 1.2em;
        padding: 15px;
    }
    
    .mobile-btn-buy-tickets {
        padding: 16px 30px;
        font-size: 1.1em;
    }
}

@media (max-width: 360px) {
    .mobile-tariff-title {
        font-size: 1.8em;
    }
    
    .mobile-category-item {
        font-size: 1.1em;
        padding: 12px 16px;
    }
    
    .price-circle {
        min-width: 260px;
        max-width: 300px;
        padding: 12px 16px;
    }
    
    .mobile-buy-button {
        min-width: 260px;
        font-size: 1em;
        padding: 14px 30px;
    }
    
    .mobile-ticket-modal-header h3 {
        font-size: 1.2em;
    }
    
    .mobile-ticket-label {
        font-size: 1.1em;
    }
    
    .mobile-ticket-price {
        font-size: 1em;
        padding: 4px 10px;
    }
    
    .mobile-qty-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
    
    .mobile-qty-input {
        width: 60px;
        height: 40px;
        font-size: 1.1em;
    }
}

@media (min-width: 768px) {
    .tariff-mobile-widget-container {
        max-width: 500px;
    }
    
    .mobile-prices {
        gap: 30px;
    }
    
    .price-circle {
        min-width: 160px;
        max-width: 200px;
    }
    
    .mobile-buy-button {
        min-width: 350px;
        max-width: 450px;
    }
}

@media (pointer: coarse) {
    .mobile-category-item {
        padding: 3px 22px;
        font-size: 1.3em;
    }
    
    .info-btn, .close-btn {
        width: 44px;
        height: 44px;
    }
    
    .mobile-buy-button {
        padding: 20px 50px;
        font-size: 1.3em;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .mobile-tariff-overlay {
        padding: 20px 30px;
    }
    
    .mobile-tariff-title {
        font-size: 2em;
        margin-bottom: 15px;
    }
    
    .mobile-tariff-description {
        font-size: 1em;
        margin-bottom: 20px;
    }
    
    .mobile-prices {
        margin-bottom: 20px;
    }
} 