/* CMI Global Styles
 * Custom overrides on top of Tailwind CDN utilities.
 * Tailwind config (colors, borderRadius, fontSize) lives in base.html <script>.
 */

/* ── Nav font-size bumps (+3px over global +1px) ── */
nav .text-sm { font-size: 18px !important; }
nav .text-lg { font-size: 22px !important; }

/* ── Button base shadow and transitions ── */
button[class*="bg-blue-600"], a[class*="bg-blue-600"],
button[class*="bg-green-600"], a[class*="bg-green-600"],
button[class*="bg-red-600"],  a[class*="bg-red-600"],
button[class*="bg-red-50"],   a[class*="bg-red-50"] {
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1);
}

button, a[class*="bg-"] {
    transition: all 0.15s ease;
}

/* ── Dramatic button hover states (CMI palette) ── */
button[class*="bg-blue-600"]:hover, a[class*="bg-blue-600"]:hover {
    background-color: #183E7D !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.15), 0 2px 4px -2px rgba(0,0,0,0.1) !important;
}

button[class*="bg-green-600"]:hover, a[class*="bg-green-600"]:hover {
    background-color: #167240 !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.15), 0 2px 4px -2px rgba(0,0,0,0.1) !important;
}

button[class*="bg-red-600"]:hover, a[class*="bg-red-600"]:hover {
    background-color: #80271E !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.15), 0 2px 4px -2px rgba(0,0,0,0.1) !important;
}

button[class*="bg-red-50"]:hover, a[class*="bg-red-50"]:hover {
    background-color: #E8A9A3 !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.06) !important;
}

/* ── Nav hover ── */
nav a:hover {
    text-decoration: underline !important;
    text-underline-offset: 4px !important;
}

/* ── Form element hover states ── */
input[type="text"]:hover, input[type="email"]:hover, input[type="password"]:hover,
textarea:hover, select:hover {
    border-color: #9CA5B4 !important;
}

input[type="checkbox"]:hover {
    border-color: #5CADEF !important;
    cursor: pointer;
}

select {
    cursor: pointer;
}

/* ── Zebra striping for JS-rendered tables ── */
.zebra-table tbody tr:nth-child(odd) {
    background-color: #F0F4F8;
}

.zebra-table tbody tr:hover {
    background-color: #E8F4FD !important;
}

/* ── Tablesort indicators ── */
th[role="columnheader"]:not(.no-sort) {
    cursor: pointer;
    user-select: none;
}

th[role="columnheader"]:not(.no-sort):hover {
    background-color: #0E1F3C;
}

th[role="columnheader"]:not(.no-sort)::after {
    content: " \25B2\25BC";
    font-size: 0.6em;
    color: #9CA5B4;
    margin-left: 4px;
    vertical-align: middle;
}

th[aria-sort="ascending"]:not(.no-sort)::after {
    content: " \25B2";
    color: #85D5FC;
}

th[aria-sort="descending"]:not(.no-sort)::after {
    content: " \25BC";
    color: #85D5FC;
}
