﻿/* Hero banner */
.hero-banner img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Page content wrapper */
.league-settings-page {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* NEW: Header row area (mirrors Join Public Challenges spacing) */
.league-settings-header {
    margin: 32px 62px 0; /* tighter than 62px */
    padding: 0;
}

    .league-settings-header .header-row {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 0px; /* tighter gap before tabs */
    }

    .league-settings-header .header-actions {
        white-space: nowrap;
    }

/* Settings tabs */
.settings-tabs {
    position: relative;
    display: flex;
    list-style: none;
    width: 100%;
    margin: 1rem 0; /* slightly tighter */
    padding: 0;
    justify-content: center;
    gap: 2rem;
}

    .settings-tabs::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: var(--Gray-200, #E9EAEB);
        z-index: 1;
    }

    .settings-tabs .tab-item {
        position: relative;
        padding-bottom: 1rem;
        cursor: pointer;
    }

        .settings-tabs .tab-item a {
            text-decoration: none;
            font-family: Inter, sans-serif;
            font-size: 14px;
            font-weight: 600;
            line-height: 20px;
            color: var(--Gray-500, #717680);
        }

        .settings-tabs .tab-item.active a {
            color: #4DC24D;
        }

        .settings-tabs .tab-item.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: #4DC24D;
            z-index: 2;
        }

/* Tab content panels */
.tab-content {
    padding-top: 1.5rem;
}

.tab-panel {
    display: none;
}

    .tab-panel.active {
        display: block;
    }

    /* Generic form styling */
    .tab-panel .form-group {
        margin-bottom: 1rem;
    }

    .tab-panel label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 500;
    }

    .tab-panel input, .tab-panel select, .tab-panel textarea {
        width: 100%;
        padding: 0.5rem;
        border: 1px solid #ccc;
        border-radius: 4px;
    }

    .tab-panel .btn-group {
        margin-top: 1rem;
        display: flex;
        gap: 1rem;
    }

    .tab-panel .btn {
        padding: 0.5rem 1rem;
        border-radius: 4px;
        border: none;
        cursor: pointer;
    }

    .tab-panel .btn-primary {
        background-color: #4DC24D;
        color: #fff;
    }

    .tab-panel .btn-secondary {
        background-color: #E9EAEB;
        color: #414651;
    }

/* ---------- Manage League ---------- */
.league-name-card {
    max-width: 640px;
    margin: 0 auto 1rem auto;
    padding: 16px 18px;
    border: 1px solid #EAEAEA;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 0 8px rgba(0,0,0,.06);
}

.ln-title {
    margin: 0 0 10px 0;
    font-weight: 600;
}

.ln-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.ln-input {
    padding: 10px 12px;
    border: 1px solid #D5D7DA;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
}

.ln-save {
    white-space: nowrap;
}

.ln-msg {
    margin-top: 8px;
    min-height: 20px;
}

/* Delete League button */
#manageLeague .btn-danger {
    width: auto;
    min-width: 180px;
    display: block;
    margin: 10px auto 0 auto;
    text-align: center;
}

/* ---------- Manage Challenges ---------- */
#manageChallenges.tab-panel.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#manageChallenges #challengeContent {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 1rem auto;
    text-align: center;
}

#manageChallenges .btn {
    display: inline-block;
    margin: 0 auto;
}

/* ---------- Manage Coaches (stacked) ---------- */
.coaches-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
}

.invite-col, .coaches-list-col {
    width: 100%;
}

/* NEW: Invite Link card */
.invite-link-card {
    width: 100%;
    background: #fff;
    border: 2.5px solid #EAEAEA;
    border-radius: 25px;
    box-shadow: 0 0 14px rgba(0,0,0,0.15);
    padding: 18px 20px;
    box-sizing: border-box;
    margin: 0 auto 1.25rem auto;
    max-width: 520px;
}

.ilc-head {
    margin-bottom: 10px;
}

.ilc-title {
    margin: 0;
    font-family: "Inter Tight", sans-serif;
    font-size: 22px;
    color: #4DC24D;
    font-weight: 600;
}

.ilc-sub {
    display: block;
    color: #717680;
    font-size: 13px;
}

.ilc-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.ilc-input {
    padding: 10px 12px;
    border: 1px solid #D5D7DA;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    width: 100%;
    background: #FBFBFB;
}

.ilc-copy {
    white-space: nowrap;
}

.ilc-feedback {
    min-height: 18px;
    margin-top: 6px;
    font-size: 13px;
}

    .ilc-feedback.ok {
        color: #2e7d32;
    }

    .ilc-feedback.err {
        color: #c62828;
    }

/* Invite card */
.invite-card {
    width: 100%;
    background: #fff;
    border: 2.5px solid #EAEAEA;
    border-radius: 25px;
    box-shadow: 0 0 14px rgba(0,0,0,0.15);
    padding: 24px;
    box-sizing: border-box;
    margin-bottom: 2rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

    .invite-card .divider {
        width: 100%;
        height: 1px;
        background: #EAEAEA;
        margin-bottom: 1rem;
    }

    .invite-card .login-header {
        margin: 0;
        font-family: "Inter Tight", sans-serif;
        font-size: 28px;
        color: #4DC24D;
        font-weight: 600;
    }

    .invite-card .input-wrapper {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 14px;
        border: 1px solid #D5D7DA;
        border-radius: 8px;
        background: #FFF;
        box-shadow: 0 1px 2px rgba(10,13,18,0.05);
        width: 100%;
        margin-bottom: 0.5rem;
    }

        .invite-card .input-wrapper .text-input {
            flex: 1 0 0;
            border: none;
            outline: none;
            background: transparent;
            font-family: Inter, sans-serif;
            font-size: 16px;
            line-height: 24px;
            color: #181D27;
        }

    .invite-card .login-btn {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 10px 16px;
        border-radius: 8px;
        border: 1px solid #4DC24D;
        background: #4DC24D;
        color: #FFF;
        font-family: Inter, sans-serif;
        font-size: 16px;
        font-weight: 600;
        line-height: 24px;
        box-shadow: 0 1px 2px rgba(10,13,18,0.05);
        cursor: pointer;
        transition: opacity 0.2s ease;
        margin-top: 1rem;
    }

        .invite-card .login-btn:hover {
            opacity: 0.9;
        }

    .invite-card .text-danger {
        font-size: 14px;
        margin: -8px 0 8px;
    }

/* Type-ahead dropdown */
.field-group.position-relative {
    position: relative;
}

#usernameSuggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

    #usernameSuggestions .list-group-item {
        cursor: pointer;
    }

/* === Smart two-column layout for Manage Coaches (existing) === */
.coaches-stack.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
    align-items: start;
    justify-items: center;
    max-width: 1120px;
}

    .coaches-stack.two-col .invite-col,
    .coaches-stack.two-col .coaches-list-col {
        width: 100%;
    }

@media (max-width: 900px) {
    .coaches-stack.two-col {
        display: flex;
        flex-direction: column;
        max-width: 820px;
    }
}
