﻿/* =========================================================
   GLOBAL LAYOUT
========================================================= */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #000;
}

.admin-container {
    display: block;
    min-height: 100vh;
}

.admin-shell {
    padding: 30px;
}

/* =========================================================
   HEADER
========================================================= */
.site-header {
    padding: 20px 30px;
    background: #ffffff;
    border-bottom: 1px solid #ccc;
}

.site-header h1 {
    text-align: center;
    margin: 0;
    font-size: 32px;
    font-weight: bold;
    color: #222;
}

/* =========================================================
   SECTION BLOCKS
========================================================= */
section {
    margin-bottom: 40px;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* =========================================================
   FORMS
========================================================= */
label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

input[type="text"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    border-radius: 4px;
    border: 1px solid #bbb;
    background: #fff;
    font-size: 14px;
}

textarea {
    resize: vertical;
}

/* =========================================================
   BUTTONS
========================================================= */
button,
.button-row button,
.button-row a,
a.button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 14px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

button,
a.button,
input[type="submit"] {
    background: #1e73be;
    color: white;
    border: none;
}

.button-danger {
    background: #c0392b;
    color: white;
}

.button-danger:hover {
    background: #992d22;
}

.button-neutral {
    background: #7f8c8d;
}

.button-neutral:hover {
    background: #636e70;
}

.button-success {
    background: #2e8b57;
}

.button-success:hover {
    background: #256f46;
}

.button-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

button:hover,
.button-row a:hover {
    background: #155a94;
}

/* =========================================================
   TABLES — CLEAN WHITE WITH FULL BORDERS
========================================================= */

.scroll-wrapper {
    overflow-x: auto;
    width: 100%;
}

/* Base table styling */
.results-table,
.roster-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #ccc;
}

/* Cells — allow wrapping */
.results-table th,
.results-table td,
.roster-table th,
.roster-table td {
    border: 1px solid #ccc;
    padding: 6px;
    font-size: 13px;
    text-align: left;
    white-space: normal;
    word-break: break-word;
}

/* Headers */
.results-table th,
.roster-table th {
    background: #ffffff;
    font-weight: bold;
    text-align: center;
}

/* Checkbox alignment */
.results-table input[type="checkbox"],
.roster-table input[type="checkbox"] {
    width: auto;
    margin: 0 auto;
    display: block;
}

/* Optional: limit very wide roster columns */
.roster-table td:nth-child(4),   /* Address */
.roster-table td:nth-child(10) { /* Email */
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================================
   ROSTER FORM GRID
========================================================= */
.roster-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 30px;
}

.roster-bio {
    grid-column: 1 / span 2;
}

/* =========================================================
   PICTURE LIST
========================================================= */
.picture-list {
    list-style: none;
    padding: 0;
}

.picture-list li {
    margin-bottom: 12px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* =========================================================
   PRINT STYLES
========================================================= */
@media print {
    .site-header,
    button,
    .no-print {
        display: none !important;
    }

    .admin-shell {
        padding: 0;
    }

    table {
        border: 1px solid #000;
    }

    th, td {
        border: 1px solid #000 !important;
        padding: 6px !important;
    }
}

/* =========================================================
   RESPONSIVE ADMIN LAYOUT (REPLACES OLD MOBILE BLOCK)
========================================================= */

/* Tablet (700–1099px) */
@media (max-width: 1099px) {

    .roster-form-grid {
        grid-template-columns: 1fr;
    }

    .roster-bio {
        grid-column: 1;
    }

    .admin-sidebar {
        position: relative;
        width: 100%;
        margin-bottom: 20px;
        text-align: left;
    }

    .button-row {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* TABLE SHRINK FOR TABLET */
    .results-table th,
    .results-table td,
    .roster-table th,
    .roster-table td {
        font-size: 12px;
        padding: 4px;
    }

    .results-table,
    .roster-table {
        transform: scale(0.97);
        transform-origin: top left;
    }
}

/* Mobile (=699px) */
@media (max-width: 699px) {

    label {
        margin-top: 10px;
        font-size: 14px;
    }

    input, select, textarea {
        font-size: 14px;
        padding: 6px;
    }

    .scroll-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table.roster-table,
    table.equip-table {
        min-width: 900px;
    }

    .admin-sidebar {
        width: 100%;
        text-align: left;
        margin-bottom: 20px;
    }

    .button-row {
        flex-direction: column;
        align-items: flex-start;
    }

    button,
    .button-row button,
    .button-row a {
        width: auto;
        max-width: 100%;
        margin-bottom: 10px;
        white-space: wrap;
    }
}