﻿/* 1) Hero spans full viewport */
.hero-banner {
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

    .hero-banner img {
        display: block;
        width: 100%;
        height: auto;
    }

/* Header row to match "Join Public Challenge" */
.challenge-settings-header {
    margin: 32px 62px 0; /* same edge spacing */
    padding: 0;
}

    .challenge-settings-header .header-row {
        display: flex;
        align-items: center; /* align title & button */
        justify-content: space-between; /* title left, button right */
        gap: 16px;
        margin-bottom: 0;
    }

    .challenge-settings-header .page-title {
        margin: 0;
        font-size: 2rem;
        font-weight: 700;
        color: #181D27;
    }

    .challenge-settings-header .header-actions {
        white-space: nowrap;
    }
    /* Scoped button styling for the header */
    .challenge-settings-header .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 10px 16px;
        border-radius: 8px;
        border: 1px solid #D5D7DA;
        background: #FFF;
        box-shadow: 0 1px 2px rgba(10,13,18,0.05);
        font-weight: 500;
        font-size: 14px;
        text-decoration: none;
        color: #181D27;
    }

        .challenge-settings-header .btn:hover {
            background-color: #F5F5F5;
        }

    .challenge-settings-header .btn-outline-secondary {
        border-color: #D5D7DA;
        color: #181D27;
        background: #FFF;
    }

/* Page content wrapper (unchanged core layout) */
.manage-activity-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Inline alert (site-style) */
.inline-alert {
    max-width: 1100px;
    margin: 10px auto 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid;
    text-align: center;
    box-shadow: 0 1px 2px rgba(10,13,18,0.05);
}

    .inline-alert.error {
        background-color: #f8d7da;
        border-color: #f5c2c7;
        color: #842029;
    }

/* Wrap that centers the whole table */
.table-wrap {
    display: flex;
    justify-content: center;
}

.table.manage-activity {
    table-layout: fixed;
    width: auto; /* shrink to content so the table itself centers */
    margin: 0 auto;
    border-collapse: separate;
    border-spacing: 0 14px; /* vertical spacing between teams */
}

/* Column widths (fixed so the table width is predictable) */
.col-team {
    width: 220px;
}

.col-label {
    width: 140px;
}

.col-cards {
    width: auto;
}

.table.manage-activity th,
.table.manage-activity td {
    vertical-align: top;
}

/* Cells */
.table.manage-activity .team-name {
    text-align: center;
}

.table.manage-activity .role-label {
    font-weight: 700;
    text-align: center;
}

/* Slot cell: 4 cards in one row */
.table.manage-activity .slot-cell {
    display: grid;
    grid-template-columns: repeat(4, 180px);
    gap: 12px;
    justify-content: center; /* center the row of four */
}

/* Cards — uniform size */
.slot-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    width: 100%;
    min-height: 78px;
}

    .slot-card .slot-pos {
        font-weight: 700;
        font-size: 0.92rem;
        line-height: 1.2;
    }

        .slot-card .slot-pos sup {
            font-size: 0.75em;
            vertical-align: super;
            margin-left: 2px;
            font-weight: 700;
        }

    .slot-card .slot-name {
        font-size: 0.88rem;
        line-height: 1.2;
        word-break: break-word;
    }

    .slot-card.selected {
        background-color: #eef;
        border-color: #66f;
    }
    /* selected (pre-queue) */
    .slot-card.queued {
        background-color: #e8f5e9;
        border-color: #81c784;
    }
    /* queued (persists) */

    /* Placeholder / empty cards (non-interactive) */
    .slot-card.empty {
        opacity: .65;
        border-style: dashed;
        cursor: default;
        pointer-events: none;
    }

/* Submit bar */
.submit-actions {
    max-width: 1100px;
    margin: 18px auto 36px;
    padding: 0 16px;
    text-align: center;
}

    .submit-actions .btn {
        display: inline-block;
        border: 1px solid #4DC24D;
        background: #4DC24D;
        color: #fff;
        font-weight: 700;
        padding: 11px 18px;
        border-radius: 10px;
        cursor: pointer;
    }

        .submit-actions .btn[disabled] {
            opacity: .55;
            cursor: not-allowed;
        }

    .submit-actions .swap-counter {
        margin-top: 8px;
        color: #6b7280;
        font-size: .95rem;
    }

    .submit-actions .submit-status {
        margin-top: 6px;
        font-size: .95rem;
    }

/* Responsive: stack to 2-wide on small screens */
@media (max-width: 800px) {
    .table.manage-activity .slot-cell {
        grid-template-columns: repeat(2, 160px);
    }
}
