/* =========================================================
   RACE EDITOR
   ========================================================= */

.race-editor-page {
    max-width: 1000px;
    margin: 0 auto;
}


/* =========================================================
   SELECTOR
   ========================================================= */

.race-editor-selector {
    margin-bottom: 35px;
    padding: 24px;

    background: #ffffff;

    border: 1px solid #e4ddd2;
    border-top: 5px solid #20a39e;
    border-radius: 8px;
}

.race-editor-selector label {
    display: block;

    margin-bottom: 8px;

    color: #183153;

    font-size: 0.75rem;
    font-weight: 900;

    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.race-editor-select-row {
    display: grid;
    grid-template-columns: 1fr auto;

    gap: 12px;
}

.race-editor-select-row select {
    min-height: 52px;

    padding: 0 14px;

    border: 1px solid #ccd7de;
    border-radius: 6px;

    background: #f8fafb;
    color: #183153;

    font-size: 1rem;
}


/* =========================================================
   RACE HEADER
   ========================================================= */

.race-editor-header {
    margin-bottom: 20px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;
}

.race-editor-header h2 {
    margin: 0;

    color: #183153;

    font-size: 2rem;
}

.race-editor-count {
    color: #20a39e;

    font-size: 0.75rem;
    font-weight: 900;

    letter-spacing: 0.12em;
}


/* =========================================================
   LEG CARDS
   ========================================================= */

.race-editor-legs {
    display: grid;

    gap: 25px;
}

.race-editor-leg {
    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e4ddd2;
    border-radius: 8px;

    box-shadow:
        0 8px 24px rgba(24, 49, 83, 0.07);
}

.race-editor-leg-header {
    padding: 20px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    background: #eef7f6;

    border-bottom: 1px solid #d8e8e6;
}

.race-editor-leg-header h3 {
    margin: 4px 0 0;

    color: #183153;

    font-size: 1.3rem;
}

.race-editor-leg-number {
    color: #e58a00;

    font-size: 0.7rem;
    font-weight: 900;

    letter-spacing: 0.14em;
}

.race-editor-leg-type {
    padding: 6px 10px;

    background: #ffffff;
    color: #20a39e;

    border-radius: 20px;

    font-size: 0.65rem;
    font-weight: 900;

    letter-spacing: 0.1em;
    text-transform: uppercase;
}


/* =========================================================
   FIELDS
   ========================================================= */

.race-editor-fields {
    padding: 24px;

    display: grid;

    gap: 20px;
}

.race-editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 16px;
}

.race-editor-field label {
    display: block;

    margin-bottom: 7px;

    color: #183153;

    font-size: 0.72rem;
    font-weight: 900;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.race-editor-field input,
.race-editor-field select,
.race-editor-field textarea {
    width: 100%;

    padding: 12px 14px;

    border: 1px solid #ccd7de;
    border-radius: 6px;

    outline: none;

    background: #f8fafb;
    color: #183153;

    font: inherit;
}

.race-editor-field textarea {
    resize: vertical;

    line-height: 1.6;
}

.race-editor-field input:focus,
.race-editor-field select:focus,
.race-editor-field textarea:focus {
    background: #ffffff;

    border-color: #20a39e;

    box-shadow:
        0 0 0 3px rgba(32, 163, 158, 0.12);
}


/* =========================================================
   OPTIONS
   ========================================================= */

.race-editor-options {
    display: flex;
    flex-wrap: wrap;

    gap: 20px;
}

.race-editor-checkbox {
    display: flex;
    align-items: center;

    gap: 8px;

    color: #183153;

    font-size: 0.85rem;
    font-weight: 800;
}

.race-editor-checkbox input {
    width: 18px;
    height: 18px;
}


/* =========================================================
   ACTIONS
   ========================================================= */

.race-editor-actions {
    padding-top: 5px;

    display: flex;
    justify-content: flex-end;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 650px) {

    .race-editor-select-row,
    .race-editor-grid {
        grid-template-columns: 1fr;
    }

    .race-editor-select-row .btn {
        width: 100%;
    }

    .race-editor-leg-header {
        align-items: flex-start;
    }

    .race-editor-fields {
        padding: 18px;
    }

    .race-editor-actions .btn {
        width: 100%;
    }

}