/*
|--------------------------------------------------------------------------
| Chapel Baseball LMS - Core Styles
|--------------------------------------------------------------------------
| Structural/base styles only.
| Team colors and branded appearance are in team-theme.css.
|--------------------------------------------------------------------------
*/

/*
|--------------------------------------------------------------------------
| Reset / Box Sizing
|--------------------------------------------------------------------------
*/

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100%;
    margin: 0;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size: 1rem;
    line-height: 1.55;

    background: #f3f6f9;
    color: #17212b;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}


/*
|--------------------------------------------------------------------------
| Shared Site Shell
|--------------------------------------------------------------------------
*/

.site-wrapper {
    width: 100%;
    margin: 0 auto;

    background: #ffffff;
}

.site-header,
.nav-wrapper,
.main-nav,
main,
.site-footer {
    width: 100%;
}


/*
|--------------------------------------------------------------------------
| Header Base Structure
|--------------------------------------------------------------------------
| Branded colors and typography are applied in team-theme.css.
|--------------------------------------------------------------------------
*/

.site-header {
    position: relative;
}

.site-brand {
    display: flex;
    align-items: center;

    width: 100%;
}

.site-brand-text {
    min-width: 0;
}

.site-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    text-decoration: none;
}

.site-logo {
    display: block;
}


/*
|--------------------------------------------------------------------------
| Navigation Base Structure
|--------------------------------------------------------------------------
*/

.nav-wrapper {
    position: relative;
}

.nav-toggle-control {
    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);

    white-space: nowrap;

    border: 0;
}

.nav-toggle {
    display: none;

    align-items: center;
    justify-content: space-between;

    width: 100%;

    padding: 12px 16px;

    cursor: pointer;

    font-weight: 700;

    user-select: none;
}

.nav-toggle-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.main-nav ul {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;

    gap: 0;

    margin: 0;
    padding: 0;

    list-style: none;
}

.main-nav li {
    margin: 0;
    padding: 0;
}

.main-nav a {
    display: flex;
    align-items: center;

    min-height: 48px;

    padding: 12px 15px;

    text-decoration: none;
}

.main-nav a:hover {
    text-decoration: none;
}


/*
|--------------------------------------------------------------------------
| General Content
|--------------------------------------------------------------------------
*/

main {
    display: block;
}

/*
|--------------------------------------------------------------------------
| Consistent Page Spacing
|--------------------------------------------------------------------------
| Full-width main pages get the same outer spacing used by Player Directory
| and My Profile. Two-column pages get the spacing on .page-layout instead,
| so the sidebar remains beside the content.
|--------------------------------------------------------------------------
*/

.site-wrapper > main:not(.main-content) {
    width: 100% !important;

    margin-left: auto !important;
    margin-right: auto !important;

    padding-left: 18px !important;
    padding-right: 18px !important;

    box-sizing: border-box;
}

.page-content,
.content-wrap,
.content-wrapper,
.page-wrap,
.page-wrapper,
.page-container,
.dashboard-wrap,
.dashboard-wrapper,
.dashboard-container,
.admin-wrap,
.admin-wrapper,
.admin-container,
.coach-wrap,
.coach-wrapper,
.coach-container,
.player-wrap,
.player-wrapper,
.player-container,
.profile-completion-wrapper {
    width: 100%;

    margin-left: auto;
    margin-right: auto;
}



.content-card {
    width: 100%;

    padding: 24px;

    border-radius: 12px;
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}

.page-heading h1,
.page-heading h2 {
    margin-top: 0;
    margin-bottom: 6px;
}

.page-heading p {
    margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
}

h1 {
    font-size: clamp(1.8rem, 4vw, 2.35rem);
}

h2 {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
}



/*
|--------------------------------------------------------------------------
| Shared Two-Column Page Layout
|--------------------------------------------------------------------------
| Restores the original Chapel Baseball LMS layout:
| main content on the left, sidebar on the right.
|--------------------------------------------------------------------------
*/

.page-layout {
    display: flex;
    align-items: flex-start;

    gap: 30px;

    width: 100%;

    margin-left: auto;
    margin-right: auto;

    padding:
        32px 18px 40px;
}

.main-content {
    flex: 1 1 auto;

    min-width: 0;

    padding: 0;
}

.sidebar {
    flex: 0 0 260px;

    width: 260px;

    min-width: 260px;
}

.sidebar-box {
    margin-bottom: 20px;

    padding: 18px;

    background: #f4f4f4;

    border: 1px solid #dddddd;

    border-radius: 8px;
}

.sidebar-box:last-child {
    margin-bottom: 0;
}


/*
|--------------------------------------------------------------------------
| Generic Cards / Panels
|--------------------------------------------------------------------------
*/

.card,
.panel,
.dashboard-card,
.admin-card,
.profile-card,
.content-card {
    background: #ffffff;

    border: 1px solid #dce6ee;

    border-radius: 10px;
}


/*
|--------------------------------------------------------------------------
| Forms
|--------------------------------------------------------------------------
*/

.user-form,
.form-stack {
    display: flex;
    flex-direction: column;

    gap: 18px;
}

.form-row {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;

    gap: 6px;
}

label {
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;

    padding: 10px 12px;

    border: 1px solid #b8c7d3;

    border-radius: 7px;

    background: #ffffff;
    color: #17212b;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
}

.form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: 4px;
}


/*
|--------------------------------------------------------------------------
| Buttons / Action Links
|--------------------------------------------------------------------------
*/

button,
.button,
.btn,
input[type="submit"],
input[type="button"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 9px 15px;

    border: 1px solid transparent;
    border-radius: 7px;

    text-decoration: none;

    font-weight: 600;
    line-height: 1.2;

    cursor: pointer;
}

.button:hover,
.btn:hover {
    text-decoration: none;
}


/*
|--------------------------------------------------------------------------
| Alerts / Messages
|--------------------------------------------------------------------------
*/

.alert,
.message,
.notice,
.info-box {
    margin: 0 0 18px;

    padding: 14px 16px;

    border-radius: 8px;
}

.alert p:last-child,
.message p:last-child,
.notice p:last-child,
.info-box p:last-child {
    margin-bottom: 0;
}


/*
|--------------------------------------------------------------------------
| Tables
|--------------------------------------------------------------------------
*/

table {
    width: 100%;

    border-collapse: collapse;
}

th,
td {
    padding: 11px 12px;

    text-align: left;
    vertical-align: top;

    border-bottom: 1px solid #dce6ee;
}

th {
    font-weight: 700;
}


/*
|--------------------------------------------------------------------------
| Profile / Avatar Defaults
|--------------------------------------------------------------------------
*/

.profile-photo,
.profile-thumbnail,
.user-avatar {
    display: block;

    object-fit: cover;
}


/*
|--------------------------------------------------------------------------
| Footer
|--------------------------------------------------------------------------
*/

.site-footer {
    padding: 20px 24px;

    text-align: center;
}


/*
|--------------------------------------------------------------------------
| Tablet / Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 760px) {

    .site-wrapper > main:not(.main-content),
    .page-content {
        padding:
            24px 14px 32px;
    }

    .nav-toggle {
        display: flex;
    }

    .main-nav ul {
        display: none;

        flex-direction: column;
        align-items: stretch;

        width: 100%;
    }

    .nav-toggle-control:checked ~ .main-nav ul {
        display: flex;
    }

    .main-nav li {
        width: 100%;
    }

    .main-nav a {
        width: 100%;
        min-height: 46px;

        padding:
            11px 16px;
    }

    .page-content {
        padding:
            24px 14px 32px;
    }

    .content-card {
        padding:
            20px;
    }

    .page-heading {
        flex-direction: column;
    }

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


/*
|--------------------------------------------------------------------------
| Small Phones
|--------------------------------------------------------------------------
*/

@media (max-width: 480px) {

    main {
        padding-left:
            14px;

        padding-right:
            14px;
    }

    .content-card {
        padding:
            16px;
    }

    .form-actions {
        align-items: stretch;
    }

    .form-actions .button,
    .form-actions .btn,
    .form-actions button {
        width: 100%;
    }
}



@media (max-width: 750px) {

    .page-layout {
        flex-direction: column;

        gap: 20px;

        padding:
            24px 14px 32px;
    }

    .main-content,
    .sidebar {
        width: 100%;

        min-width: 0;

        flex-basis: auto;
    }
}
