/* ========================================
   RESPONSIVE STYLES для Poni-GO
   ======================================== */

/* Основные responsive правила */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

/* Responsive font sizes */
@media (max-width: 576px) {
    html {
        font-size: 14px;
    }
    
    .h1, h1 { font-size: 1.75rem !important; }
    .h2, h2 { font-size: 1.5rem !important; }
    .h3, h3 { font-size: 1.25rem !important; }
    .h4, h4 { font-size: 1.1rem !important; }
    .h5, h5 { font-size: 1rem !important; }
    .h6, h6 { font-size: 0.875rem !important; }
}

@media (min-width: 577px) and (max-width: 768px) {
    html {
        font-size: 15px;
    }
}

@media (min-width: 1200px) {
    html {
        font-size: 17px;
    }
}

/* Контейнер responsive */
.container, .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

@media (max-width: 576px) {
    .container, .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Карточки responsive */
.card {
    border-radius: 1rem !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
        border-radius: 0.75rem !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
}

/* Кнопки responsive */
.btn {
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
}

@media (max-width: 576px) {
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

/* Навигация responsive */
.navbar {
    padding: 0.5rem 1rem;
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
}

/* Формы responsive */
.form-control, .form-select {
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 1rem;
}

@media (max-width: 576px) {
    .form-control, .form-select {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
}

/* Таблицы responsive */
.table-responsive {
    border-radius: 0.5rem;
    overflow-x: auto;
}

@media (max-width: 768px) {
    .table {
        font-size: 0.875rem;
    }
    
    .table th, .table td {
        padding: 0.5rem;
        white-space: nowrap;
    }
}

/* Модальные окна responsive */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 0.75rem 1rem;
    }
}

/* Карты (Leaflet) responsive */
#driverMap, #parentMap {
    width: 100%;
    min-height: 300px;
    border-radius: 1rem;
}

@media (max-width: 768px) {
    #driverMap, #parentMap {
        height: 300px !important;
        border-radius: 0.75rem;
    }
}

@media (min-width: 769px) {
    #driverMap, #parentMap {
        height: 450px !important;
    }
}

/* Badge responsive */
.badge {
    border-radius: 0.375rem;
}

@media (max-width: 576px) {
    .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Отступы responsive */
@media (max-width: 576px) {
    .py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
    .py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
    .py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
    .px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
    .px-3 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
    .mb-4 { margin-bottom: 1.5rem !important; }
    .mb-5 { margin-bottom: 2rem !important; }
}

/* Grid system improvements */
@media (max-width: 768px) {
    .col-md-6, .col-md-4, .col-md-3, .col-md-8, .col-md-9 {
        margin-bottom: 1rem;
    }
}

/* Специальные классы для мобильных устройств */
@media (max-width: 576px) {
    .mobile-center {
        text-align: center !important;
    }
    
    .mobile-full-width {
        width: 100% !important;
        display: block !important;
    }
    
    .mobile-hide {
        display: none !important;
    }
    
    .mobile-stack > * {
        display: block !important;
        width: 100% !important;
        margin-bottom: 0.5rem;
    }
}

@media (min-width: 577px) {
    .desktop-only {
        display: block !important;
    }
}

@media (max-width: 576px) {
    .desktop-only {
        display: none !important;
    }
}

/* Улучшения для touch устройств */
@media (hover: none) and (pointer: coarse) {
    .btn, .card, .list-group-item {
        min-height: 44px; /* Apple рекомендует минимум 44px для touch targets */
    }
    
    .btn {
        padding: 0.75rem 1rem;
    }
}

/* Специальные стили для водительского и родительского дашборда */
@media (max-width: 768px) {
    .driver-header, .parent-header {
        padding: 1rem 0.5rem;
    }
    
    .driver-header .container, .parent-header .container {
        padding: 0 0.5rem;
    }
    
    .driver-header-label {
        font-size: 0.75rem !important;
    }
    
    .driver-header-car-model {
        font-size: 0.9rem !important;
    }
    
    .action-card-icon {
        font-size: 2rem !important;
    }
}

/* Responsive действия для больших экранов */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .action-card {
        transition: transform 0.2s ease;
    }
    
    .action-card:hover {
        transform: translateY(-3px);
    }
}

/* Принт стили */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        color: #000 !important;
        background: #fff !important;
    }
    
    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border-width: 2px !important;
    }
    
    .card {
        border-width: 2px !important;
    }
}

/* Dark mode support (если потребуется в будущем) */
@media (prefers-color-scheme: dark) {
    /* Здесь можно добавить стили для темной темы */
}