﻿/* Page content wrapper */
.challenge-settings-page {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero banner */
.hero-banner img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Header row (title left, back button right) */
.challenge-settings-header {
    margin: 32px 62px 0;
    padding: 0;
}

    .challenge-settings-header .header-row {
        display: flex;
        align-items: center; /* put title & button on same horizontal plane */
        justify-content: space-between; /* title left, button right */
        gap: 16px;
        margin-bottom: 0;
    }

    .challenge-settings-header .page-title {
        margin: 0; /* remove default margins so it aligns with button */
        font-size: 30px;
        font-weight: 600;
    }

    .challenge-settings-header .header-actions {
        white-space: nowrap;
        margin-left: auto; /* belt-and-suspenders pin to right */
    }

    /* Scoped Back button style to match other settings pages */
    .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-outline-secondary {
        border-color: #D5D7DA;
        color: #181D27;
        background: #FFF;
    }

    .challenge-settings-header .btn:hover,
    .challenge-settings-header .btn:focus {
        background: #F5F5F5; /* readable hover */
        color: #181D27;
        border-color: #D5D7DA;
    }

/* Settings tabs (mirrors League Settings) */
.settings-tabs {
    position: relative;
    display: flex;
    list-style: none;
    width: 100%;
    margin: 1rem 0;
    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;
    }

/* ========================= */
/* NEW: Settings Card layout */
/* ========================= */

.settings-card {
    max-width: 560px; /* centered card width */
    margin: 0 auto; /* center horizontally */
    padding: 1.25rem 1.25rem;
    border: 1px solid #E9EAEB;
    border-radius: 12px;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(10,13,18,0.05);
}

.settings-card-title {
    margin: 0 0 0.25rem 0;
    font-size: 20px;
    font-weight: 600;
}

.settings-card-desc {
    margin: 0 0 1rem 0;
    font-size: 14px;
    color: #525866;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 16px;
}

.form-label {
    min-width: 100px;
    font-weight: 600;
    font-size: 14px;
}

.form-select {
    min-width: 180px;
    padding: 8px 10px;
    border: 1px solid #D5D7DA;
    border-radius: 8px;
    background: #FFF;
    font-size: 14px;
}

/* simple checkbox look aligned with inputs */
.form-checkbox {
    width: 18px;
    height: 18px;
}

.actions-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
}

/* Inline warning message (e.g., lock note) */
.inline-warning {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #7a3e00;
    background-color: #fff3cd; /* light yellow background */
    border: 1px solid #ffeeba;
}

/* Status messages for Save action */
.status-msg {
    margin-left: 1rem;
    font-size: 14px;
    font-weight: 500;
}

    .status-msg.ok {
        color: #28a745; /* green */
    }

    .status-msg.err {
        color: #dc3545; /* red */
    }

/* Disabled look for locked controls */
.form-select:disabled,
.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Minor helper text */
.help-text {
    margin: 4px 0 10px;
    font-size: 13px;
    color: #6b7280;
}
