/* ========================================
   DATATABLES RESPONSIVE STYLES - McQueen Homes
   ======================================== */

/* Mobile Responsive Table Overrides */
@media
only screen and (max-width: 760px),
(min-device-width: 768px) and (max-device-width: 1024px) {

	/* Force table to not be like tables anymore */
	table, thead, tbody, th, td, tr {
		display: block;
	}

	/* Hide table headers (but not display: none;, for accessibility) */
	thead tr {
		position: absolute;
		top: -9999px;
		left: -9999px;
	}

	tr { border: 1px solid #ccc; }

	td {
		/* Behave  like a "row" */
		border: none;
		border-bottom: 1px solid #eee;
		position: relative;
		padding-left: 50%;
	}

	td:before {
		/* Now like a table header */
		position: absolute;
		/* Top/left values mimic padding */
		top: 6px;
		left: 6px;
		width: 45%;
		padding-right: 10px;
		white-space: nowrap;
	}

	.mobile-header {
		display:block;
		font-weight: bolder;
	}
}

/* STR Inventory Mobile Optimizations */
@media (max-width: 768px) {
    #strInventoryTable tbody tr {
        display: block;
        border: 1px solid #e9ecef;
        border-radius: 6px;
        padding: 0.5rem;
        margin-bottom: 0.75rem;
    }

    #strInventoryTable td {
        padding: 0.6rem 0.5rem;
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }

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

    #strInventoryTable .property-column,
    #strInventoryTable .item-details,
    #strInventoryTable .item-meta {
        width: 100%;
    }

    #strInventoryTable .item-meta {
        text-align: left !important;
    }

    #strInventoryTable .item-meta > * {
        display: block;
        margin-bottom: 0.35rem;
    }

    #strInventoryTable .item-quantity {
        font-size: 2.5rem;
        line-height: 1.1;
        display: block;
        margin-bottom: 0.25rem;
    }
}

@media (max-width: 576px) {
    #strInventoryTable td {
        padding: 0.45rem 0.35rem;
    }

    #strInventoryTable .item-quantity {
        font-size: 2rem;
    }
}

/* Make sure DataTable responsive doesn't override */
@media (max-width: 768px) {
    table.dataTable tbody td {
        vertical-align: top !important;
    }
}

/* Enhanced STR Inventory Mobile Layout */
@media (max-width: 480px) {
    #strInventoryTable td {
        padding: 0.35rem 0.25rem;
    }

    #strInventoryTable .item-quantity {
        font-size: 1.75rem;
    }
}

/* Home Inventory Mobile Responsive */
@media (max-width: 767px) {
    .lightbox-gallery h2 {
        margin-bottom:25px;
        padding-top:25px;
        font-size:24px;
    }
}

/* PWH Mobile Responsive */
@media only screen and (max-width: 600px) {
    .pwh-responsive-class {
        /* Add PWH specific responsive styles here if any */
    }
}

/* Budget Mobile Responsive */
@media only screen and (max-width: 600px) {
    .budget-responsive-class {
        /* Add budget specific responsive styles here if any */
    }
}
