/* Contact Responsive Styles - Mobile and tablet optimizations */

/* Tablet Styles */
@media (max-width: 1024px) {
    .container {
        max-width: 100%;
    }
    
    .navigation-bar {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .stats-row {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .stat-mini {
        flex: 1;
        min-width: 140px;
    }
    
    .cards-container {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        padding: 20px;
        gap: 16px;
    }
    
    .report-item-header {
        grid-template-columns: 1fr 1fr 1fr;
        font-size: 12px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Header Adjustments */
    .header h1 {
        font-size: 20px;
    }
    
    .header p {
        font-size: 10px;
    }
    
    /* Navigation Bar */
    .navigation-bar {
        padding: 12px 16px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-left {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .nav-btn {
        padding: 8px 16px;
        font-size: 11px;
        border: 1px solid #e1e4e8;
        border-radius: 4px;
        text-align: center;
    }
    
    .nav-btn.home-btn,
    .nav-btn.cards-btn {
        border-right: 1px solid #e1e4e8;
    }
    
    /* Controls Section */
    .controls {
        flex-direction: column;
        padding: 16px;
        gap: 12px;
    }
    
    .controls-left {
        max-width: 100%;
        width: 100%;
    }
    
    .controls-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
        font-size: 11px;
        padding: 8px 12px;
    }
    
    /* Table View */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 900px;
    }
    
    th, td {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }
    
    .action-btn {
        padding: 4px 8px;
        font-size: 10px;
        width: 100%;
    }
    
    /* Cards View */
    .cards-container {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 12px;
    }
    
    .business-card {
        padding: 16px;
    }
    
    .card-category {
        font-size: 9px;
        padding: 3px 8px;
    }
    
    /* Modal Adjustments */
    .modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-header h2 {
        font-size: 16px;
    }
    
    .form-section {
        padding: 16px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-footer {
        padding: 12px 20px;
        flex-wrap: wrap;
    }
    
    .modal-footer .btn {
        flex: 1;
        min-width: 100px;
    }
    
    /* Report View */
    .report-header {
        padding: 0 16px;
    }
    
    .report-search {
        width: 100%;
    }
    
    .report-container {
        padding: 16px;
    }
    
    .report-item-header {
        display: block;
        padding: 12px 16px;
    }
    
    .report-item-header > div {
        margin-bottom: 8px;
    }
    
    .report-item-header > div:last-child {
        margin-bottom: 0;
    }
    
    .report-item-details {
        padding: 16px;
        grid-template-columns: 1fr;
    }
    
    .report-label {
        margin-bottom: 4px;
        font-size: 11px;
    }
    
    .report-value {
        margin-bottom: 12px;
    }
    
    /* Stats Row */
    .stats-row {
        width: 100%;
        overflow-x: auto;
        padding: 8px 0;
    }
    
    .stat-mini {
        min-width: 110px;
    }
    
    /* Search Box */
    .search-box {
        font-size: 12px;
    }
    
    .search-box input {
        font-size: 12px;
    }
    
    /* File Upload Label */
    .file-upload-label {
        padding: 8px 12px;
        font-size: 11px;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    /* Header */
    .header {
        padding: 16px 16px;
    }
    
    .header h1 {
        font-size: 18px;
        flex-wrap: wrap;
    }
    
    .header h1 i {
        font-size: 16px;
    }
    
    /* Navigation */
    .navigation-bar {
        padding: 12px;
    }
    
    /* Stats */
    .stat-mini {
        padding: 6px 10px;
        min-width: 95px;
    }
    
    .stat-mini .stat-number {
        font-size: 16px;
    }
    
    .stat-mini .stat-label {
        font-size: 9px;
    }
    
    /* Controls */
    .controls {
        padding: 12px;
    }
    
    .controls-right {
        gap: 8px;
    }
    
    .btn {
        min-width: 100px;
        font-size: 10px;
        padding: 7px 10px;
    }
    
    .btn i {
        font-size: 10px;
    }
    
    /* Table */
    th, td {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    /* Cards */
    .info-banner {
        padding: 16px;
    }
    
    .info-banner h3 {
        font-size: 14px;
    }
    
    .info-banner p {
        font-size: 12px;
    }
    
    .business-card {
        padding: 14px;
    }
    
    .card-company {
        font-size: 14px;
    }
    
    .card-name {
        font-size: 12px;
    }
    
    .card-info {
        font-size: 11px;
        margin: 8px 0;
    }
    
    /* Modal */
    .form-section {
        padding: 14px 16px;
    }
    
    .form-group label {
        font-size: 11px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    /* Report */
    .report-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .report-export-options {
        bottom: 10px;
        right: 10px;
        flex-direction: column;
    }
    
    .report-export-btn {
        width: 140px;
        font-size: 11px;
        padding: 6px 12px;
    }
}

/* Landscape Mode Adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .modal-content {
        max-height: 100vh;
        margin: 0;
    }
    
    .modal-body {
        max-height: calc(100vh - 100px);
    }
    
    .form-section {
        padding: 12px 20px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn,
    .action-btn,
    .nav-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .close {
        width: 44px;
        height: 44px;
    }
    
    /* Remove hover effects on touch */
    .business-card:hover {
        transform: none;
    }
    
    tbody tr:hover {
        background: transparent;
    }
}

/* High DPI Display Adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Sharper borders */
    .business-card,
    .modal-content,
    .report-item {
        border-width: 0.5px;
    }
}

/* Print Responsive */
@media print {
    body {
        font-size: 10pt;
    }
    
    .container {
        max-width: 100%;
        box-shadow: none;
    }
    
    .business-card {
        page-break-inside: avoid;
    }
}
