/* responsive.css - Mobile responsive styles for ntn-scanner */

/* Base Mobile Styles */
@media only screen and (max-width: 1300px) {
    body {
        overflow-x: hidden;
    }

    main {
        zoom: 100% !important;
        padding: 0 !important;
    }

    /* Main container adjustments */
    .nss-main-container {
        width: 100% !important;
        min-width: unset !important;
        margin: 0 !important;
    }

    .nss-main-container-dimensions {
        width: 100% !important;
    }

    .nss-report-container {
        min-width: unset !important;
        width: 100% !important;
    }

    /* Home page features */
    .nss-feature-box {
        margin: 10px 10px !important;
        width: 100% !important;
    }

    .uk-flex {
        flex-wrap: wrap;
    }

    /* Scan form adjustments */
    .nss-scanner-input {
        width: 100% !important;
    }

    .uk-flex-middle {
        flex-wrap: wrap;
    }

    .nss-scan-button {
        margin-top: 10px !important;
        width: 100% !important;
        margin-left: 0 !important;
    }

    /* Table adjustments */
    .uk-table {
        font-size: 12px;
    }

    .uk-table th,
    .uk-table td {
        padding: 8px;
    }

    .nss-table-loc-column,
    .nss-table-loc-column-resolved {
        min-width: unset !important;
        max-width: 150px;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }

    /* Buttons and controls */
    .uk-button {
        padding: 0 15px;
    }

    .nss-signup-center-button {
        width: 100% !important;
        margin: 10px;
    }

    /* Navigation adjustments */
    .uk-navbar-container {
        padding: 0 10px;
    }

    .uk-navbar-right {
        margin-left: auto;
    }

    /* Progress bar */
    .nss-progress-container {
        width: 100%;
    }

    /* Login bar */
    .nss-login-bar {
        flex-direction: column;
        width: 100%;
    }

    .nss-user-avatar {
        margin-right: 0;
        margin-bottom: 10px;
    }

    /* Accordions */
    .nss-scan-accordion {
        font-size: 16px;
        padding: 10px;
    }

    /* Results display */
    .nss-report-title {
        font-size: 24px;
    }

    /* Fix for scan result container on mobile */
    .nss-scan-result-container {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding-left: 10px;
        padding-right: 10px;
    }

    /* FAQs */
    .uk-accordion-title {
        font-size: 16px;
    }

    /* Modal adjustments */
    .uk-modal-dialog {
        width: 95%;
        padding: 15px;
    }

    /* Hide elements that take too much space on mobile */
    .nss-desktop-only {
        display: none !important;
    }

    /* Logos and headings */
    .nss-logo-container h2 {
        font-size: 35px;
        text-align: center;
    }

    .nss-logo-container {
        width: 95% !important;
        padding-left: 10px;
    }

    .custom-container {
        width: 100% !important;
        overflow: hidden;
        margin-left: 10px;
        margin-bottom: 50px !important;
    }

    .nss-feature-background2 {
        width: 100% !important;
    }

    .nss-front-small {
        text-align: center;
    }

    /* Height adjustments */
    .uk-height-viewport {
        min-height: unset;
    }

    /* Responsive nav bar */
    .nss-navbar-2 {
        font-size: 12px;
        padding: 5px !important;
    }

    /* Scan history dropdown */
    .nss-loggedinbar-history select {
        width: 100%;
    }

    /* Action buttons on scan results */
    .nss-scan-result-container button {
        margin-bottom: 5px;
        margin-right: 5px;
    }

    /* Integration section */
    .nss-main-container .uk-flex-column button {
        margin-bottom: 10px;
    }

    /* Fix for the scan info label */
    .nss-scan-info-label {
        font-size: 11px;
    }

    /* Table responsive behavior */
    .uk-table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
    }

    /* Fix the Notion URL scanning form on mobile */
    /* Hide the non-essential elements when keyboard is active to give more space for input */
    .nss-form-focused .nss-feature-box,
    .nss-form-focused .uk-height-viewport {
        margin-top: -200px !important;
        transition: margin-top 0.3s ease;
    }

    /* Fix for the PDF export feature */
    .nss-export-pdf-container {
        overflow-x: auto;
        max-width: 100%;
    }

    /* Improve the touchability of buttons */
    button,
    .uk-button,
    .uk-navbar-toggle,
    a[data-uk-icon],
    .nss-report-btn-resolved,
    .nss-report-btn-resolved-done,
    .nss-scan-button {
        min-height: 44px;
        min-width: 44px;
    }

    /* Make clickable elements more touch-friendly */
    a,
    button,
    [role="button"],
    input,
    select,
    textarea {
        touch-action: manipulation;
    }

    /* Fix for any bottom-fixed elements that might be covered by mobile browser navigation */
    .nss-bottom-fixed {
        padding-bottom: env(safe-area-inset-bottom, 20px);
    }

    /* Improve the modals for mobile */
    .uk-modal-dialog {
        margin: 10px;
    }

    /* Better spacing for buttons on mobile */
    .uk-button+.uk-button {
        margin-top: 10px;
    }

    /* Mobile view card styles for scan results */
    .nss-mobile-row {
        display: block;
        margin-bottom: 15px;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
        background-color: #fff;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .nss-mobile-cell {
        display: flex;
        padding: 8px 0;
        border-bottom: 1px solid #f0f0f0;
        flex-wrap: wrap;
    }

    .nss-mobile-label {
        font-weight: bold;
        width: 90px;
        flex-shrink: 0;
    }

    .nss-mobile-value {
        flex: 1;
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: calc(100% - 90px);
    }

    .nss-mobile-button {
        width: 100%;
        margin-top: 15px;
        box-sizing: border-box;
    }

    /* Style for the full-width button on mobile */
    .mobile-full-width {
        width: 100% !important;
        box-sizing: border-box;
        display: block;
    }
}

/* Small tablets and large phones */
@media only screen and (min-width: 768px) and (max-width: 991px) {
    .nss-main-container {
        width: 90% !important;
        min-width: unset !important;
    }

    .nss-report-container {
        min-width: unset !important;
        width: 100% !important;
    }

    .nss-feature-box {
        margin: 5px !important;
    }

    .uk-flex {
        flex-wrap: wrap;
    }

    /* Feature boxes for tablets */
    .nss-main-container.nss-feature-box {
        width: 45% !important;
        margin: 10px !important;
    }
}

/* Additional classes for mobile-specific elements */
.nss-mobile-menu-button {
    display: none;
}

@media only screen and (max-width: 767px) {
    .nss-mobile-menu-button {
        display: block;
    }

    /* Apply these styles to fix the scan results table on mobile */
    .uk-table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .uk-table-responsive th:not(:first-child):not(:last-child),
    .uk-table-responsive td:not(:first-child):not(:last-child) {
        padding-left: 5px;
        padding-right: 5px;
    }

    /* Adjust buttons in scan results */
    .nss-report-btn-resolved,
    .nss-report-btn-resolved-done {
        padding: 0 10px;
        font-size: 12px;
    }

    /* Improve form elements layout */
    .uk-form-horizontal .uk-form-label {
        margin-bottom: 5px;
        width: 100%;
    }

    .uk-form-horizontal .uk-form-controls {
        margin-left: 0;
        width: 100%;
    }

    /* Mobile menu styles */
    #mobile-menu .uk-nav li {
        margin-bottom: 15px;
    }

    #mobile-menu .uk-nav a {
        font-size: 18px;
    }
}