* {
    box-sizing: border-box;
}


/* ==========================================================
   BODY
   ========================================================== */

body {
    margin: 0;
    padding: 16px;
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #222;
}


/* ==========================================================
   HEADINGS
   ========================================================== */

h1 {
    margin: 0 0 20px;
    font-size: 28px;
}

h2 {
    margin: 0 0 12px;
    font-size: 22px;
}


/* ==========================================================
   TABLE CONTAINER
   ========================================================== */

#upcoming-dividends {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
}


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

#dividends-table {
    width: auto;
    min-width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 14px;
    table-layout: auto;
}


/* ==========================================================
   TABLE CELLS
   ========================================================== */

#dividends-table th,
#dividends-table td {
    padding: 10px 12px;
    border: 1px solid #ddd;
    text-align: left;

    /* NEVER wrap table content */
    white-space: nowrap;

    /* Never force cells to become tiny */
    width: auto;
}


/* ==========================================================
   TABLE HEADERS
   ========================================================== */

#dividends-table th {
    background: #e9e9e9;
    font-weight: bold;

    /* Headers must stay on ONE LINE */
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
}


/* ==========================================================
   EX-DIVIDEND DATE HEADER
   ========================================================== */

/* Your Ex-Dividend Date is currently the final header */
#dividends-table th:last-child {
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    min-width: 145px;
    width: 145px;
}


/* ==========================================================
   LINKS
   ========================================================== */

#dividends-table a {
    text-decoration: none;
    font-weight: bold;
}


/* ==========================================================
   YAHOO LINK
   ========================================================== */

#dividends-table .yahoo-link {
    font-size: 11px;
    font-weight: normal;
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 600px) {

    body {
        padding: 10px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    #dividends-table {
        font-size: 13px;
        min-width: max-content;
    }

    #dividends-table th,
    #dividends-table td {
        padding: 8px 10px;
        white-space: nowrap;
    }

    #dividends-table th:last-child {
        min-width: 145px;
        width: 145px;
        white-space: nowrap !important;
    }
}
