/* === BigDawg Motorsports — Global Styles (Revised Mechanical Spec) === */

/* Theme variables */
:root {
    --bdms-red: #900;
    --bdms-red-hover: #7b0000;

    /* Controlled accent blue — NEVER for links or buttons */
    --bdms-accent-blue: #007BFF;

    /* Mechanical grayscale palette */
    --bdms-black: #0b0b0b;
    --bdms-graphite: #1a1a1a;
    --bdms-steel: #2a2a2a;
    --bdms-silver: #c8c8c8;
    --bdms-muted: #888;

    --card-radius: 2px;

    /* Neutralize Bootstrap focus ring (avoid blue) */
    --bs-focus-ring-color: rgba(136, 136, 136, .35);
}

/* Base layout */
body {
    font-family: 'Open Sans', Arial, sans-serif;
    background: #f2f2f2; /* Removed gradient — BDMS forbids decorative backgrounds */
    color: #222;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 60px;
}

a {
    color: inherit; /* Never blue */
    text-decoration: none;
}

a:hover,
a:focus,
a:focus-visible {
    text-decoration: underline; /* Structural affordance */
}

/* Headings — mechanical, uppercase, tight */
h1, h2, h3, h4, h5 {
    font-family: 'Oswald', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: .5rem;
}

/* Optional: thin accent underline for section headers */
h2.bdms-section-title {
    border-bottom: 2px solid var(--bdms-accent-blue);
    padding-bottom: .25rem;
}

/* Navbar */
nav.navbar {
    background: var(--bdms-graphite);
    border-bottom: 2px solid var(--bdms-accent-blue);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav.navbar .navbar-brand,
nav.navbar .nav-link {
    color: #eee;
}

nav.navbar .nav-link:hover,
nav.navbar .nav-link:focus,
nav.navbar .nav-link:focus-visible {
    text-decoration: underline;
}

.bdms-navbar-logo {
    height: 56px;
    width: 56px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: .7rem;
}

.bdms-navbar-toggler {
    border: 1px solid #555;
    border-radius: 2px;
    padding: .35rem .6rem;
}

.bdms-navbar-toggler:focus,
.bdms-navbar-toggler:focus-visible {
    outline: 2px solid #888;
    outline-offset: 2px;
    box-shadow: none;
}

.bdms-navbar-toggler-icon {
    color: #eee;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.bdms-nav-badge {
    background: #555;
    color: #eee;
}

.bdms-nav-dropdown-menu {
    min-width: 320px;
}

.nav-link.active {
    font-weight: 700;
    text-decoration: underline;
}

/* Page container */
main.container {
    background: #fff;
    border-radius: var(--card-radius);
    padding: 2rem 1.25rem;
    margin-top: 2rem;

    /* Removed soft shadow, replaced with mechanical edge */
    box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}

/* Panels — mechanical, not decorative */
.bdms-panel {
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 2px;
    background: #fff;
    padding: 1rem;
}

.bdms-readout {
    border: 1px solid rgba(0, 0, 0, .35);
    border-radius: 2px;
    background: var(--bdms-graphite);
    color: #eee;
    padding: 1rem;
}

.bdms-muted {
    color: #aaa;
}

.bdms-subtitle {
    color: var(--bdms-muted);
    font-size: 1rem;
}

.bdms-title-sm {
    font-size: 1.15rem;
}

.bdms-label {
    display: inline-block;
    min-width: 4.25rem;
    color: #aaa;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-size: .78rem;
}

.bdms-tag {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 2px;
    padding: .15rem .45rem;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #ddd;
    background: rgba(0, 0, 0, .2);
}

.bdms-flash {
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 2px;
    padding: .75rem;
    background: #f7f7f7;
}

.bdms-flash-error {
    border-color: rgba(153, 0, 0, .35);
    color: var(--bdms-red);
}

/* Forum latest column */
.bdms-forum-latest {
    font-size: .95rem;
    text-align: left;
    min-width: 14rem;
}

@media (min-width: 768px) {
    .bdms-forum-latest {
        text-align: right;
    }
}

/* Footer */
footer {
    background: #111;
    color: #ccc;
    text-align: center;
    padding: 1rem 0;
    border-top: 3px solid var(--bdms-red);
    margin-top: auto;
}

/* Bottom nav (mobile) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #111;
    border-top: 3px solid var(--bdms-red);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1100;
}

.bottom-nav a {
    color: #ccc;
    text-align: center;
    text-decoration: none;
    font-size: .85rem;
    flex: 1;
    transition: color .2s;
}

.bottom-nav a i {
    display: block;
    font-size: 1.3rem;
    margin-bottom: 2px;
}

.bottom-nav a.active,
.bottom-nav a:hover {
    color: var(--bdms-red);
}

@media (min-width:768px) {
    .bottom-nav {
        display: none;
    }
}

/* Buttons — neutral, mechanical, never blue */
.bdms-btn {
    display: inline-block;
    padding: 12px 20px;
    border: 1px solid #444;
    background: #1a1a1a;
    color: #eee;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-radius: 2px;
}

.bdms-btn-sm {
    padding: 6px 10px;
    font-size: .75rem;
}

/* Destructive actions only */
.bdms-btn-danger {
    background: var(--bdms-red);
    border-color: var(--bdms-red);
    color: #fff;
}

.bdms-btn-danger:hover,
.bdms-btn-danger:focus,
.bdms-btn-danger:focus-visible {
    background: var(--bdms-red-hover);
}

.bdms-btn:hover,
.bdms-btn:focus,
.bdms-btn:focus-visible {
    text-decoration: underline;
    background: #161616;
}

.bdms-btn:focus-visible {
    outline: 2px solid #888;
    outline-offset: 2px;
}

.form-control:focus {
    border-color: #666;
    box-shadow: none;
    outline: 2px solid #888;
    outline-offset: 1px;
}

.bdms-auth {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bdms-auth-panel {
    width: 100%;
    max-width: 420px;
}

.bdms-notice {
    border: 1px solid rgba(0, 0, 0, .2);
    padding: .75rem;
    margin-bottom: 1rem;
    background: #f7f7f7;
}

.bdms-error {
    color: #900;
    min-height: 1.25rem;
    font-size: .95rem;
}

.bdms-auth-links {
    font-size: .95rem;
}

.bdms-small {
    font-size: .85rem;
}

.bdms-btn-secondary {
    background: #f3f3f3;
    color: #111;
    border-color: #666;
}

.bdms-btn-secondary:hover,
.bdms-btn-secondary:focus,
.bdms-btn-secondary:focus-visible {
    background: #e9e9e9;
}

.bdms-readout-link {
    display: block;
}

.bdms-readout-link:hover,
.bdms-readout-link:focus,
.bdms-readout-link:focus-visible {
    text-decoration: none;
}

.bdms-readout-link:hover .bdms-title-sm,
.bdms-readout-link:focus .bdms-title-sm,
.bdms-readout-link:focus-visible .bdms-title-sm {
    text-decoration: underline;
}

.bdms-readout-link:hover {
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .18);
}

.bdms-readout-link:focus-visible {
    outline: 2px solid #888;
    outline-offset: 2px;
}

.bdms-readout-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .5rem;
    margin-bottom: .75rem;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.bdms-post-body {
    line-height: 1.35;
}

/* Admin layout helpers (avoid inline styles) */
.bdms-max-960 {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

.bdms-max-1100 {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* Neutral badges (avoid Bootstrap contextual colors) */
.bdms-badge {
    display: inline-block;
    padding: .15rem .45rem;
    border: 1px solid rgba(0, 0, 0, .25);
    border-radius: 2px;
    background: #f3f3f3;
    color: #111;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* Tables (avoid Bootstrap table theming) */
.bdms-table-wrap {
    overflow-x: auto;
}

.bdms-table {
    width: 100%;
    border-collapse: collapse;
}

.bdms-table th,
.bdms-table td {
    padding: .5rem .75rem;
    border-top: 1px solid rgba(0, 0, 0, .12);
    vertical-align: middle;
}

.bdms-table thead th {
    border-top: 0;
    border-bottom: 1px solid rgba(0, 0, 0, .18);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-size: .75rem;
    color: #555;
}

.bdms-table-compact th,
.bdms-table-compact td {
    padding: .35rem .5rem;
}

.bdms-breadcrumb {
    font-size: .85rem;
    color: var(--bdms-muted);
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
}

.bdms-sep {
    opacity: .8;
}