/* Property of Sistema THEAD. All rights reserved. */
/* Getting a micro:bit robot ready (assets/js/robot-setup.js): three
   numbered steps that light up in turn, side by side where there is room
   and stacked on phones; the "copy the file yourself" fold-out; and the
   way in from the robot's information window. */

.swal-robot-setup .swal2-html-container { margin: 0.6em 1em 0.2em; }

.robot-setup { color: var(--brand-ink, #03283f); }

.robot-setup-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
    font-weight: 700;
}
.robot-setup-hero img {
    height: 52px;
    width: auto;
    object-fit: contain;
}

.robot-setup-lead {
    max-width: 58ch;
    margin: 0 auto 4px;
    line-height: 1.45;
}

/* ---- the three steps ---- */
.robot-setup-steps {
    list-style: none;
    margin: 14px 0 6px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.rs-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 12px;
    border: 2px solid #dfe7ee;
    border-radius: 16px;
    background: #f7fafc;
    text-align: center;
    opacity: 0.6;
    transition: opacity 0.2s, border-color 0.2s, background-color 0.2s;
}
.rs-step p { margin: 0; line-height: 1.35; }
.rs-step.is-current {
    opacity: 1;
    border-color: var(--brand-blue, #0080C9);
    background: #fff;
}
.rs-step.is-done {
    opacity: 1;
    border-color: var(--action-green, #2aa845);
    background: #fff;
}
.rs-num {
    flex: none;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--brand-blue, #0080C9);
    color: #fff;
    font-weight: 700;
}
.rs-step.is-done .rs-num { background: var(--action-green, #2aa845); }
/* The step's picture beside its number; a done step's number becomes a
   check (both from the app's icon set, ui/tj-icons.js). */
.rs-head { display: flex; align-items: center; gap: 10px; }
.rs-icon { width: 30px; height: 30px; color: var(--brand-blue, #0080C9); }
.rs-step.is-done .rs-icon { color: var(--action-green, #2aa845); }
.rs-step:not(.is-current):not(.is-done) .rs-icon { color: #8c99a4; }
.rs-num .tj-icon--check { display: none; width: 20px; height: 20px; }
.rs-step.is-done .rs-num .rs-n { display: none; }
.rs-step.is-done .rs-num .tj-icon--check { display: block; }
.rs-step .tj-flash { margin: 0; }
.robot-setup-nousb {
    margin: 12px auto 0;
    max-width: 58ch;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fff4df;
    line-height: 1.35;
}

.robot-setup-already {
    margin: 8px 0 0;
    text-align: center;
    color: #4a6273;
}

/* ---- another way: the .hex download ---- */
.robot-setup-manual {
    margin-top: 12px;
    padding-top: 6px;
    border-top: 1px solid #e3e9ef;
    text-align: left;
}
.robot-setup-manual summary {
    display: list-item;
    min-height: 44px;
    line-height: 44px;
    cursor: pointer;
    font-weight: 600;
    color: var(--brand-blue, #0080C9);
}
.robot-setup-manual p { margin: 0 0 10px; line-height: 1.45; }
.robot-setup-download {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border: 2px solid var(--brand-blue, #0080C9);
    border-radius: 999px;
    color: var(--brand-blue, #0080C9);
    font-weight: 700;
    text-decoration: none;
}
.robot-setup-download:hover { background: rgba(0, 128, 201, 0.08); }

/* Phones: one step under another, number beside the words. */
@media (max-width: 640px) {
    .robot-setup-steps { grid-template-columns: 1fr; }
    .rs-step {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 10px 12px;
    }
    .rs-step .tj-flash { align-items: flex-start; }
    .robot-setup-hero img { height: 40px; }
}

/* ---- the way in from the robot's information window ---- */
.robot-blocks-prepare {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e3e9ef;
}
.robot-blocks-prepare p { margin: 0 0 8px; }
.robot-blocks-prepare-btn {
    min-height: 44px;
    padding: 8px 20px;
    border: 2px solid var(--brand-blue, #0080C9);
    border-radius: 999px;
    background: #fff;
    color: var(--brand-blue, #0080C9);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

/* ---- the "could not connect" window's hint ---- */
.connect-fail-setup {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #eef6fc;
    text-align: left;
}
