/* SportzCG - Global Mobile Styles */

/* ===== Nav Bar ===== */
.scg-nav {
    background: #333;
    color: #fff;
    padding: 8px 16px;
    font-family: Raleway, sans-serif;
    font-size: 14px;
}
.scg-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.scg-nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}
.scg-nav-brand strong { color: #fff; }
.scg-nav-org { color: #aaa; }
.scg-nav-toggle {
    display: none;
    background: none;
    border: 1px solid #666;
    color: #fff;
    padding: 4px 10px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 3px;
    line-height: 1;
}
.scg-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}
.scg-nav-links a { color: #ccc; text-decoration: none; padding: 4px 6px; }
.scg-nav-links a:hover { color: #fff; }
.scg-nav-sep { color: #666; }
.scg-nav-user {
    display: flex;
    align-items: center;
    gap: 6px;
}
.scg-nav-user a.scg-logout { color: #ff6b6b; text-decoration: none; padding: 4px 6px; }
.scg-nav-user a.scg-logout:hover { color: #ff4444; }

@media screen and (max-width: 640px) {
    .scg-nav-toggle { display: inline-block; }
    .scg-nav-links,
    .scg-nav-user {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding-top: 8px;
    }
    .scg-nav-links.open,
    .scg-nav-user.open {
        display: flex;
    }
    .scg-nav-links a,
    .scg-nav-user a { padding: 8px 0; }
    .scg-nav-sep { display: none; }
    .scg-nav-user { border-top: 1px solid #555; margin-top: 4px; padding-top: 8px; }
}

/* ===== Touch Targets ===== */
@media screen and (max-width: 640px) {
    button, .button,
    input[type="submit"] {
        min-height: 44px;
        padding: 10px 16px;
    }
    select {
        min-height: 44px;
    }
    input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }
}

/* ===== Data Table Grids (players, wrestlers, admin users) ===== */
.data-grid-header {
    font-weight: bold;
    border-bottom: 2px solid #ccc;
    padding-bottom: 8px;
}
.data-grid-row {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

/* Hide secondary columns on small screens */
@media screen and (max-width: 639px) {
    .hide-for-small { display: none !important; }
}
@media screen and (min-width: 640px) {
    .show-for-small-only { display: none !important; }
}

/* ===== Score Page (Skeleton CSS) ===== */
.score-layout {
    display: flex;
    flex-wrap: wrap;
    text-align: center;
}
.score-team {
    flex: 1 1 45%;
    padding: 0 8px;
}
.score-team-label {
    font-size: 1.2em;
    font-weight: bold;
    padding: 8px 0;
}
.score-value {
    font-size: 6em;
    font-weight: bold;
    line-height: 1.1;
}
.score-center {
    width: 100%;
    text-align: center;
    padding: 8px 0;
}
.score-btn {
    width: 80%;
    min-height: 52px;
    font-size: 1.1em;
    margin: 4px auto;
    display: block;
    cursor: pointer;
}

@media screen and (max-width: 480px) {
    .score-value {
        font-size: 3.5em;
    }
    .score-team-label {
        font-size: 1em;
    }
    .score-btn {
        width: 90%;
        min-height: 48px;
    }
}

/* ===== Foundation Page Responsive Tweaks ===== */
@media screen and (max-width: 639px) {
    h1 { font-size: 1.6rem; }
    .callout { padding: 12px; }
    .grid-padding-x > .cell { padding-left: 6px; padding-right: 6px; }

    /* Stack add-player form fields on mobile */
    .new-player-field {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ===== Admin Page ===== */
.admin-user-row .role-select {
    width: auto;
    display: inline-block;
    margin: 0;
    padding: 4px 8px;
}
.admin-user-row .delete-btn {
    margin: 0;
    padding: 4px 12px;
}
@media screen and (max-width: 639px) {
    .admin-user-row .role-select {
        width: 100%;
        min-height: 44px;
    }
    .admin-user-row .delete-btn {
        width: 100%;
        min-height: 44px;
        margin-top: 4px;
    }
}
