/* Property of Sistema THEAD. All rights reserved. */
/* Putting a file on a micro:bit over USB (assets/js/microbit-flash.js):
   the button, its status line and progress bar, in the robot's firmware
   guide and in Microbit Mode. */

.tj-flash {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 10px 0 4px;
}
.tj-flash-btn {
    min-height: 44px;
    padding: 8px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--action-green, #2aa845);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.tj-flash-btn:disabled { opacity: 0.6; cursor: progress; }
/* After a success: "do it again" (another micro:bit), no longer the main act. */
.tj-flash-btn.is-secondary {
    background: #fff;
    color: var(--action-green, #2aa845);
    box-shadow: inset 0 0 0 2px var(--action-green, #2aa845);
}
.tj-flash-status {
    margin: 0;
    min-height: 1.3em;
    text-align: center;
    color: var(--brand-ink, #03283f);
}
.tj-flash-status:empty { display: none; }
.tj-flash-bar {
    width: min(320px, 100%);
    height: 10px;
    border-radius: 999px;
    background: rgba(var(--brand-blue-rgb, 0, 128, 201), 0.15);
    overflow: hidden;
}
.tj-flash-bar[hidden] { display: none; }
.tj-flash-bar > span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--brand-blue, #0080C9);
    transition: width 0.2s linear;
}

.tj-flash-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.tj-flash-btn .tj-icon { width: 22px; height: 22px; flex: none; }
