/**
 * Responsive Styles for Mobile Devices
 */

/* Mobile First Approach */
@media (max-width: 767px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    .container {
        padding: 10px;
    }

    .notice-marquee {
        padding: 8px 0;
    }

    .notice-marquee marquee {
        font-size: 14px;
    }

    .card {
        margin-bottom: 15px;
    }

    .card-header h4 {
        font-size: 1.1rem;
    }

    .nav-tabs {
        flex-wrap: wrap;
    }

    .nav-tabs .nav-link {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    #formTabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    #formTabs .nav-item {
        flex: 0 0 auto;
    }

    .table {
        font-size: 12px;
    }

    .table thead th,
    .table tbody td {
        padding: 8px 4px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
        white-space: normal;
    }

    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .upload-area {
        padding: 20px;
        min-height: 150px;
    }

    .portal-footer {
        font-size: 12px;
        padding: 10px 0;
    }

    .portal-footer .row > div {
        text-align: center !important;
        margin-bottom: 5px;
    }

    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Stack form elements */
    .row > [class*="col-"] {
        margin-bottom: 15px;
    }

    .card-header h2,
    .card-header h3,
    .card-header h4,
    .card-header h5,
    .card-header h6 {
        word-break: break-word;
    }

    .form-top-actions .btn {
        width: 100%;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    /* Hide less important elements on mobile */
    .text-muted.small {
        font-size: 0.75rem;
    }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1199px) {
    .container {
        max-width: 95%;
    }

    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }

    .nav-tabs .nav-link {
        padding: 10px 16px;
        font-size: 0.95rem;
    }

    .table {
        font-size: 13px;
    }

    .form-top-actions .btn {
        white-space: nowrap;
    }
}

/* Desktop Styles */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Touch-friendly buttons on mobile */
@media (max-width: 767px) {
    .btn,
    .form-check-input,
    input[type="checkbox"],
    input[type="radio"] {
        min-height: 44px;
        min-width: 44px;
    }

    .form-check-label {
        padding-left: 10px;
        line-height: 1.5;
    }
}

/* Landscape mobile orientation */
@media (max-width: 767px) and (orientation: landscape) {
    .portal-header {
        padding: 5px 0;
    }

    .header-image {
        height: 40px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .header-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}
