/* res_trackreq.css - Responsive styles for track request page */

/* Tablet Devices (768px - 1024px) */
@media screen and (max-width: 1024px) {
    /* Main container adjustments */
    main {
        padding: 15px;
        padding-bottom: 40px;
    }

    /* Header text sizing */
    .text-center h1 {
        font-size: 3.5rem !important;
    }

    .text-center p.lead {
        font-size: 1rem;
    }

    /* QR Verify Container */
    .qr-verify-container {
        max-width: 95%;
        padding: 20px;
    }

    .qr-verify-grid {
        gap: 20px;
    }

    /* Results container */
    .results-container {
        max-width: 95%;
    }

    /* Table adjustments */
    .tracking-table th,
    .tracking-table td {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* Small Tablets and Large Phones (600px - 768px) */
@media screen and (max-width: 768px) {
    /* Main background and layout */
    main {
        padding: 10px;
        padding-bottom: 30px;
        min-height: auto;
    }

    /* Header text */
    .text-center h1 {
        font-size: 2.5rem !important;
        margin-bottom: 15px !important;
    }

    .text-center p.lead {
        font-size: 0.95rem;
        margin-bottom: 25px !important;
    }

    /* QR and Manual Verify - Stack vertically */
    .qr-verify-container {
        max-width: 100%;
        padding: 15px;
        margin: 10px auto 20px auto;
    }

    .qr-verify-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .qr-card,
    .manual-card {
        padding: 15px;
    }

    .qr-card h3,
    .manual-card h3 {
        font-size: 1.1rem;
    }

    /* QR Reader */
    #qr-reader {
        max-width: 100%;
        padding: 15px;
    }

    /* Form container */
    .form-container {
        width: 95%;
        padding: 20px;
    }

    .form-container .flex {
        flex-direction: column;
    }

    .form-container input {
        width: 100%;
        border-radius: 5px;
        margin-bottom: 10px;
    }

    .form-container button {
        width: 100%;
        border-radius: 5px;
    }

    /* Results container */
    .results-container {
        max-width: 100%;
    }

    /* Result card */
    .result-card {
        margin-bottom: 15px;
    }

    .result-header {
        padding: 12px 15px;
    }

    .result-header h3 {
        font-size: 1.2rem;
    }

    /* Table - Hide less important columns */
    .tracking-table th:nth-child(4),
    .tracking-table td:nth-child(4) {
        display: none;
    }

    .tracking-table th,
    .tracking-table td {
        padding: 8px;
        font-size: 0.85rem;
    }

    /* Action buttons - Stack vertically */
    .tracking-table td:last-child > div {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .details-btn,
    .remove-btn {
        width: 100%;
        justify-content: center;
    }

    /* Details content */
    .details-content {
        padding: 10px;
    }

    /* Verification container */
    .verification-container {
        padding: 15px;
    }

    .verification-container .row {
        flex-direction: column;
        gap: 10px;
    }

    .verification-container .col-md-6 {
        flex: 1 1 100%;
        min-width: 100%;
    }

    /* No results */
    .no-results {
        width: 95%;
        padding: 15px;
    }

    .no-results h3 {
        font-size: 1.1rem;
    }

    /* Clear all button positioning */
    .clear-all-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* Mobile Devices (480px - 600px) */
@media screen and (max-width: 600px) {
    /* Header text */
    .text-center h1 {
        font-size: 2rem !important;
    }

    .text-center p.lead {
        font-size: 0.9rem;
    }

    /* QR Verify cards */
    .qr-card,
    .manual-card {
        padding: 12px;
    }

    .qr-card p,
    .manual-card p {
        font-size: 0.85rem;
    }

    /* Manual input and button */
    .manual-card input[type="text"] {
        width: 100%;
        font-size: 0.9rem;
    }

    .manual-card .verify-btn {
        font-size: 0.9rem;
    }

    /* Table - Show only essential info */
    .tracking-table th:nth-child(2),
    .tracking-table td:nth-child(2) {
        display: none;
    }

    .tracking-table th,
    .tracking-table td {
        padding: 6px;
        font-size: 0.8rem;
    }

    /* Status badge */
    .status-badge {
        font-size: 0.75rem;
        min-width: 80px;
        padding: 4px 8px;
    }

    /* Result header */
    .result-header h3 {
        font-size: 1rem;
    }

    .result-header p {
        font-size: 0.8rem;
    }

    /* Verification panel */
    .verification-container h1 {
        font-size: 1.1rem !important;
    }

    .verification-container h5 {
        font-size: 0.95rem;
    }

    .verification-container p {
        font-size: 0.85rem;
    }

    .verification-container .badge {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    /* Details table */
    .details-table td {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .details-table td:first-child {
        width: 40%;
    }

    /* Buttons */
    .details-btn,
    .remove-btn {
        font-size: 0.75rem;
        padding: 8px 10px;
    }

    .clear-all-btn {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

/* Extra Small Mobile Devices (below 480px) */
@media screen and (max-width: 480px) {
    /* Main layout */
    main {
        padding: 8px;
        padding-bottom: 20px;
    }

    /* Header */
    .text-center {
        padding: 0 10px !important;
    }

    .text-center h1 {
        font-size: 1.75rem !important;
        margin-bottom: 10px !important;
    }

    .text-center p.lead {
        font-size: 0.85rem;
        margin-bottom: 20px !important;
    }

    /* QR Verify container */
    .qr-verify-container {
        padding: 10px;
        margin: 5px auto 15px auto;
    }

    .qr-card,
    .manual-card {
        padding: 10px;
    }

    .qr-card h3,
    .manual-card h3 {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    /* QR Scanner button */
    .start-scan-btn {
        font-size: 0.85rem;
        padding: 10px;
    }

    /* Manual form */
    .manual-card label {
        font-size: 0.9rem;
    }

    .manual-card input[type="text"] {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .manual-card .verify-btn {
        padding: 10px;
        font-size: 0.85rem;
    }

    /* Result card */
    .result-card {
        border-radius: 8px;
    }

    .result-header {
        padding: 10px;
        border-radius: 8px 8px 0 0;
    }

    .result-header h3 {
        font-size: 0.95rem;
    }

    /* Table - Mobile card layout */
    .tracking-table thead {
        display: none;
    }

    .tracking-table,
    .tracking-table tbody,
    .tracking-table tr,
    .tracking-table td {
        display: block;
        width: 100%;
    }

    .tracking-table tr {
        margin-bottom: 15px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        overflow: hidden;
    }

    .tracking-table td {
        text-align: left;
        padding: 10px 15px;
        border-bottom: 1px solid #f1f5f9;
        position: relative;
        padding-left: 50%;
    }

    .tracking-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 45%;
        padding-right: 10px;
        font-weight: 600;
        color: #475569;
    }

    .tracking-table td:last-child {
        padding-left: 15px;
    }

    .tracking-table td:last-child:before {
        content: none;
    }

    /* Action buttons in mobile */
    .tracking-table td:last-child > div {
        margin-top: 5px;
    }

    /* Details row */
    .details-row td {
        padding: 0 !important;
    }

    .details-row td:before {
        content: none !important;
    }

    .details-content {
        padding: 10px;
    }

    /* Verification container mobile */
    .verification-container {
        padding: 12px;
        margin: 0;
    }

    .verification-header h1 {
        font-size: 1rem !important;
    }

    .verification-status {
        padding: 10px;
    }

    .verification-status h4 {
        font-size: 0.9rem;
    }

    .verification-status p {
        font-size: 0.8rem;
    }

    .document-details {
        padding: 12px;
    }

    .document-details h5 {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .document-details p {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }

    /* QR Code in verification */
    .document-details img[alt="QR Code"] {
        max-width: 180px !important;
    }

    .verification-container .btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    /* No results */
    .no-results {
        padding: 15px;
    }

    .no-results i {
        font-size: 1.5rem;
    }

    .no-results h3 {
        font-size: 1rem;
    }

    .no-results p {
        font-size: 0.85rem;
    }

    /* Status badges */
    .status-badge {
        font-size: 0.7rem;
        min-width: 70px;
        padding: 3px 6px;
    }
}

/* Landscape orientation adjustments for mobile */
@media screen and (max-width: 768px) and (orientation: landscape) {
    main {
        min-height: auto;
        padding-top: 80px;
    }

    .text-center h1 {
        font-size: 2rem !important;
    }

    .qr-verify-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* Print styles */
@media print {
    .qr-verify-container,
    .form-container,
    .clear-all-btn,
    .details-btn,
    .remove-btn {
        display: none;
    }

    .tracking-table {
        border: 1px solid #000;
    }

    .tracking-table th,
    .tracking-table td {
        border: 1px solid #000;
        padding: 8px;
    }
}