﻿/*
    https://elvery.net/demo/responsive-tables/ 
    Wrapping a table in a container that has the ID .no-more-tables will cause the table column to stack on smaller screens
    NOTE: That you define column headers for your normal table view, but then add the same column text as a "data-title" attribute on each TD tag (to show when the table stacks)
    Example:
    <section id="no-more-tables">
        <table>
            <thead>
                <tr>
                    <th>Column 1 Header Text</th>
                    <th>Column 2 Header Text</th>
                    <th>Column 3 Header Text</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td data-title="Column 1 Header Text">1</td>
                    <td data-title="Column 2 Header Text">2</td>
                    <td data-title="Column 3 Header Text">3</td>
                </tr>
                <tr>
                    <td data-title="Column 1 Header Text">4</td>
                    <td data-title="Column 2 Header Text">5</td>
                    <td data-title="Column 3 Header Text">6</td>
                </tr>
            </tbody>
        </table>
    </section>
*/

@media only screen and (max-width: 680px) {
	
	/* Force table to not be like tables anymore */
	.no-more-tables table, 
	.no-more-tables thead, 
	.no-more-tables tbody, 
	.no-more-tables th, 
	.no-more-tables td, 
	.no-more-tables tr { 
		display: block; 
	}
 
	/* Hide table headers (but not display: none;, for accessibility) */
	.no-more-tables thead tr { 
		position: absolute;
		top: -9999px;
		left: -9999px;
	}
 
	.no-more-tables tr { border: 1px solid #ccc; }
 
	.no-more-tables td { 
		/* Behave  like a "row" */
		border: none;
		border-bottom: 1px solid #eee; 
		position: relative;
		padding-left: 50%; 
		white-space: normal;
		text-align:left;
	}
 
	.no-more-tables 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;
		text-align:left;
		font-weight: bold;
	}
 
	/*
	Label the data
	*/
	.no-more-tables td:before { content: attr(data-title); }
}