/* HCOSS_Mobile.css */
/* Mobile-first responsive design for HCOSS site */
/* ============================================================================ */

@media only screen and (max-width: 768px) {

    /* ========== BASE MOBILE STYLES ========== */
    
    body {
        font-size: 14px;
        margin: 0;
        padding: 10px;
        width: 100%;
        overflow-x: hidden;
    }
    
    html {
        overflow-x: hidden;
        scroll-behavior: smooth;
    }

    h1, h2, h3 {
        margin-top: 15px;
        margin-bottom: 10px;
        font-size: 1.2em;
    }

    h2 {
        font-size: 1.2em;
    }

    img {
        max-width: 100%;
        height: auto;
    }


    /* ========== CONTACT PAGE FORM ELEMENTS ========== */
    
	div.b {
		width: 100% !important;
		margin-top: 20px !important;
		margin-bottom: 15px !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		min-width: unset !important;
		max-width: 100% !important;
		overflow-x: hidden !important;
		padding: 0 !important;
	}

    
    body, html {
        overflow-x: hidden !important;
        min-width: unset !important;
    }

    /* ========== TABLE RESPONSIVENESS ========== */

    /* Stack navigation tables vertically */
    table.nav-table td,
    table.policy-nav td {
        display: block;
        width: 100% !important;
        margin: 0;
        padding: 8px 0;
    }

    /* Links in navigation become full-width blocks */
    table.nav-table a,
    table.policy-nav a {
        display: block;
        padding: 12px;
        text-align: center;
        text-decoration: none;
        width: 100%;
        box-sizing: border-box;
    }

    /* All tables adjust for mobile */
    table {
        width: 100% !important;
        margin: 10px 0;
    }

    td {
        padding: 8px;
        font-size: 12px;
        box-sizing: border-box;
    }

    /* Main page outline border - reduce width */
    table[width="95%"],
    table[width="85%"] {
        width: 100% !important;
        margin-left: 0;
        margin-right: 0;
    }

    /* Stack the main content table columns on mobile */
    table[width="95%"] col {
        width: 100% !important;
    }

    table[width="95%"] td {
        display: block;
        width: 100% !important;
        margin-bottom: 20px;
        padding: 10px !important;
    }

    /* Footer table - make flexible */
    table.footer-table {
        width: 100% !important;
    }

    table.footer-table td {
        display: block;
        width: 100% !important;
        text-align: center;
        padding: 10px 0;
    }

    /* ========== FORM SCALING & RESPONSIVENESS ========== */

    /* Main form container */
    .contact-form {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Form groups container and individual groups */
    .form-group-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    .form-group {
        width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        margin-bottom: 0 !important;
        gap: 0.25rem !important;
    }

    /* Form labels - reduce size */
    .form-label {
        font-size: 11px !important;
        margin: 0 !important;
        font-weight: normal;
    }

    /* Form inputs - SCALED DOWN for mobile */
    .form-input {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        height: 1.75rem !important;
        padding: 0.375rem 0.5rem !important;
        font-size: 13px !important;
        border: 1px solid #e5e7eb !important;
        margin: 0 !important;
        line-height: 1.2 !important;
    }

    /* Form textareas - SCALED DOWN for mobile */
    .form-textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        height: 3.5rem !important;
        padding: 0.375rem 0.5rem !important;
        font-size: 13px !important;
        border: 1px solid #e5e7eb !important;
        margin: 0 !important;
        resize: vertical !important;
        line-height: 1.2 !important;
        min-height: 3.5rem !important;
    }

    /* Form submit button - SCALED DOWN */
    .form-submit {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        height: 1.75rem !important;
        padding: 0.375rem 0.5rem !important;
        font-size: 13px !important;
        background-color: #3B3B3B !important;
        color: #fff !important;
        margin-top: 0.75rem !important;
        border: none !important;
        border-radius: 0.375rem !important;
        line-height: 1.2 !important;
    }

    /* ========== HCAPTCHA MOBILE OPTIMIZATION ========== */

    /* hCaptcha container - responsive wrapper */
    .h-captcha {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0.75rem 0 !important;
        padding: 0 !important;
    }

    /* hCaptcha iframe - scale to fit mobile viewport */
    .h-captcha iframe {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
        transform: scale(0.8) !important;
        transform-origin: top center !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Extra small devices (< 360px) - scale down further */
    @media (max-width: 360px) {
        .h-captcha iframe {
            transform: scale(0.7) !important;
        }

        .form-input,
        .form-textarea {
            font-size: 12px !important;
        }

        .form-label {
            font-size: 10px !important;
        }
    }

    /* ========== MAIN CONTENT WRAPPER ========== */

    /* Buttons and links in content */
    a[href*="contact"] {
        display: block;
        padding: 12px;
        margin: 15px auto;
        text-align: center;
        max-width: 100%;
    }

    /* ========== LIST TABLE STYLING ========== */

    table.list {
        display: block !important;
        width: 100% !important;
        border-collapse: collapse;
    }

    table.list thead {
        display: none; /* Hide the header row on mobile */
    }

    table.list tbody {
        display: block;
    }

    table.list tr {
        display: block;
        margin-bottom: 1.5rem;
        border: 1px solid #999;
        padding: 0.75rem;
        border-radius: 4px;
    }

    table.list td {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
        vertical-align: top !important;
        padding: 0.5rem 0 !important;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid #ddd;
        font-size: inherit;
    }

    table.list td:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

    table.list td::before {
        font-weight: bold;
        display: block;
        margin-bottom: 0.25rem;
        color: #c4c4c4;
        text-decoration: none;
        font-size: inherit;
    }

    /* Label each column */
    table.list tr td:nth-child(1)::before { content: "Decision Tier:"; }
    table.list tr td:nth-child(2)::before { content: "Financial Threshold:"; }
    table.list tr td:nth-child(3)::before { content: "Authority:"; }
    table.list tr td:nth-child(4)::before { content: "Documentation:"; }

} /* END @media only screen and (max-width: 768px) */
