/* || General styles */

* {
    box-sizing: border-box;

    --bold: 600;
    --shadow: 2px 2px 0px #333;
    --rounding: 5px;
    --ff: "Lucida Grande", "Lucida Sans Unicode", sans-serif;
}

body {
    background-image: url("assets/bg.png");
    background-repeat: repeat;

    color: #000000;
    font-family: var(--ff);
    font-size: 15px;

    line-height: 1.3;
}

p,
li,
img {
    margin-bottom: 10px;
}

img {
    width: 100%;
}

ol li {
    list-style-type: decimal;
    margin-left: 30px;
}

b {
    font-weight: var(--bold);
}

i {
    font-style: italic;
}

button {
    font-family: inherit;
}

.circled {
    display: inline-block;
    border-radius: 50%;
    width: 1.3em;
    height: 1.3em;
    line-height: 1.4em;
    text-align: center;
    font-size: 0.8em;
    font-family: serif;
    color: #fff;
    background-color: #333;
    position: relative;
    top: -2px;
    margin-right: 7px;
}

/* || Markdown */

.markdown {
    line-height: 1.4;
}

.markdown h1 {
    font-weight: var(--bold);
    font-size: 1.1em;
    margin-bottom: 10px;
}

.markdown h2 {
    font-weight: var(--bold);
    font-size: 1.05em;
    margin-bottom: 10px;
}

.markdown blockquote {
    color: #888;
    border-left: 5px solid #888;
    padding: 0 10px;
    margin-bottom: 10px;
}

.markdown em,
.markdown i {
    font-style: italic;
}

.markdown strong,
.markdown b {
    font-weight: var(--bold);
}

.markdown ul,
.markdown ol {
    margin-bottom: 10px;
}

.markdown li {
    margin-bottom: 0;
    margin-left: 30px;
}

.markdown ol li {
    list-style-type: decimal;
}

.markdown ul li {
    list-style-type: disc;
}

.markdown code {
    background-color: rgba(0, 0, 0, 0.05);
    font-family: monospace;
}

/* || Tabbed menu */

.tabbed-menu {
    margin-bottom: 10px;
}

.tabbed-menu.closed::after {
    content: "Choose a step above to see more details.";
    display: block;

    background-color: #ddd;
    color: #444;

    font-style: italic;

    padding: 10px;
    border: 1px solid black;
    border-top-right-radius: var(--rounding);
    border-bottom-left-radius: var(--rounding);
    border-bottom-right-radius: var(--rounding);

    position: relative;
    top: -1px;
    z-index: 0;
}

.tabbed-menu-header {
    display: inline-block;

    background-color: #ddd;
    padding: 5px;
    border: 1px solid black;
    border-bottom: none;
    border-left: none;
    border-top-left-radius: var(--rounding);
    border-top-right-radius: var(--rounding);

    position: relative;
    z-index: 1;

    cursor: pointer;
    user-select: none;
}

.tabbed-menu-header:hover {
    background-color: #e8e8e8;
}

.tabbed-menu-header:first-child {
    border-left: 1px solid black;
}

.tabbed-menu-header.tabbed-menu-selected {
    background-color: #fff;
    font-weight: var(--bold);
    border-width: 2px;
    border-left: 1px solid black;
    top: 2px;
}

.tabbed-menu-header.tabbed-menu-selected:first-child {
    border-left-width: 2px;
}

.tabbed-menu-body {
    display: none;
    background-color: #fff;
    padding: 10px;
    border: 2px solid black;
    overflow: hidden;
    border-top-right-radius: var(--rounding);
    border-bottom-left-radius: var(--rounding);
    border-bottom-right-radius: var(--rounding);
}

.tabbed-menu-body.tabbed-menu-selected {
    display: block;
}

.tabbed-menu-body-heading {
    font-weight: var(--bold);
    font-size: 1.1em;
}

.tabbed-menu-body-label {
    font-size: 0.8em;
    font-style: italic;
    margin-bottom: 0px;
    margin-left: 10px;
}

.tabbed-menu-body-dropdown {
    width: 100%;
    margin-bottom: 10px;
}

.tabbed-menu .code-preview {
    background-color: #eee;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: var(--rounding);
}

/* || Menu bar */

.menu-bar {
    display: flex;
    justify-content: space-between;
    background-color: #333;
    color: #fff;
    padding: 10px;
}

.menu-bar a {
    color: inherit;
}

.menu-bar a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.version-number {
    color: rgba(255, 255, 255, 0.25);
    margin-left: 10px;
}

/* || Panes */

.pane {
    max-width: 800px;
    margin: 30px auto;
    scroll-margin-top: 10px;
}

@media (max-width: 810px) {
    .pane {
        width: calc(100% - 40px);
        margin-left: 20px;
    }
}

.pane.pane-inactive {
    display: none;
}

.pane-heading {
    display: inline-block;

    font-weight: var(--bold);
    font-size: 1.3em;

    background-color: #fff;
    border: 2px solid black;
    border-bottom: none;
    padding: 5px 10px;
    border-top-left-radius: var(--rounding);
    border-top-right-radius: var(--rounding);

    position: relative;
    top: 2px;
    z-index: 1;
}

.pane-body {
    background-color: #fff;
    border: 2px solid black;
    padding: 10px;
    box-shadow: var(--shadow);
    border-radius: var(--rounding);
    border-top-left-radius: 0;

    position: relative;
}

.tip {
    border: 1px dashed black;
    padding: 10px;
    border-radius: var(--rounding);
    line-height: 1.4;
}

.tip::before {
    content: "Tip: ";
    font-weight: bold;
}

/* || Groups */

.group {
    margin-bottom: 20px;
}

.group-heading {
    font-size: 1.1em;
    font-weight: var(--bold);
    margin-left: 10px;
    margin-bottom: 10px;
}

/* || Cards */

.card {
    background-color: #f2f2f2;
    border: 1px solid black;
    border-radius: var(--rounding);
    margin-bottom: 10px;
    overflow: hidden;
    scroll-margin-top: 9px;
    position: relative;

    --card-accent: #333;
}

.card summary {
    display: block;
    cursor: pointer;
}

.card details .card-heading-suffix::after {
    content: "▼";
    transform: rotate(90deg);
    margin-right: 10px;
    transition: transform 0.1s;
}

.card details[open] .card-heading-suffix::after {
    transform: rotate(0deg);
}

.card-heading-wrapper {
    display: flex;
    height: 40px;
}

.card-heading-wrapper > * {
    display: flex;
    align-items: center;
}

.card-heading-prefix {
    background-color: var(--card-accent);
    color: #fff;
    padding: 0 10px;
    text-transform: uppercase;
    font-weight: var(--bold);
}

.card-heading-prefix-separator {
    display: inline-block;

    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;

    border-left: 10px solid var(--card-accent);

    margin-right: 10px;
}

.card-heading-subtitle::before {
    content: " for ";
    font-family: var(--ff);
    font-style: italic;
}

.card-heading-subtitle {
    display: block;
    font-size: 0.7em;
    text-transform: none;
    font-family: monospace;
}

.card-heading-suffix {
    margin-left: auto;
}

.card-heading {
    font-size: 1.1em;
    font-weight: var(--bold);
}

.card-body {
    padding: 10px;
}

.card-body:empty {
    padding: 0;
}

.card-body input {
    width: 100%;
    margin-bottom: 10px;
    padding: 3px;
}

.card-inner-heading {
    display: block;
    font-size: 1em;
    font-weight: var(--bold);
    margin-top: 8px;
    margin-bottom: 5px;
    margin-left: 5px;
}

/* Specific cards */

.cell-code {
    --card-accent: #333;
}

.cell-choice {
    --card-accent: #ff4d37;
}

.card.cell-choice textarea {
    width: 100%;
    height: 150px;
    font-family: var(--ff);
    resize: vertical;
}

.card.cell-choice .card-heading-suffix button {
    display: inline-block;
    margin-right: 10px;
    padding: 2px 5px;
    font-size: 1.2em;
    border-radius: var(--rounding);
    background-color: #333;
    color: #fff;
    cursor: pointer;
    outline: 0;
    border: none;
}

.card.cell-choice .card-heading-suffix button:not([disabled]):hover {
    background-color: #555;
}

.card.cell-choice .card-heading-suffix button[disabled] {
    cursor: not-allowed;
    background-color: #ccc;
    color: #555;
}

/* Card reference */

.card-reference {
    background-color: var(--card-accent);
    color: white;
    font-style: normal;
    padding: 0px 3px 0 3px;
    text-transform: uppercase;
    font-weight: var(--bold);
    border-radius: var(--rounding);
}

/* || Steps */

.step-delete {
    display: inline-block;
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-weight: var(--bold);
    margin-right: 5px;
    padding: 5px;
    border-radius: 5px;
}

.step-delete:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.step-add {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 80px;
    margin: auto;

    font-size: 1.1em;

    background-color: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.5);
    border-radius: 5px;

    cursor: pointer;
}

.step-add:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.step-add::before {
    content: "+";
    display: inline-block;
    font-size: 1.7em;
    line-height: 0.8em;
    text-align: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #eee;
    margin-right: 8px;
}

/* || Standout button */

.standout-button {
    display: block;
    width: 100%;
    padding: 30px;
    font-size: 1.2em;
    border-radius: var(--rounding);
    background-color: #333;
    color: #fff;
    cursor: pointer;
    outline: 0;
    border: none;
}

.standout-button:not([disabled]):hover {
    background-color: #555;
}

.standout-button[disabled] {
    cursor: not-allowed;
    background-color: #ccc;
    color: #555;
}

.standout-button .subtitle {
    display: block;
    font-size: 0.7em;
}

/* || Outline */

.outline-wrapper {
    width: 200px;
    margin-left: 10px;

    position: absolute;
    top: 0;
    bottom: 0;
    left: 100%;
}

.outline {
    background-color: #fff;
    font-size: 0.7em;

    padding: 5px;

    border: 2px solid black;
    border-radius: var(--rounding);
    box-shadow: var(--shadow);

    position: sticky;
    top: 10px;
}

.outline .outline-heading {
    font-weight: var(--bold);
}

.outline li {
    margin: 5px 0 0 10px;
    list-style-type: disc;
}

.outline a {
    color: inherit;
    text-decoration: none;
}

.outline a:hover {
    text-decoration: underline;
}

.outline .standout-button {
    padding: 0;
    margin-top: 10px;
}

.outline .standout-button a {
    display: block;
    padding: 15px;
}

/* || Custom Prism styles */

.token.operator {
    background: none;
}

code[class*="language-"] {
    text-shadow: none;
}

/* || Animations */

@keyframes just-added {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }

    70% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.just-added {
    animation: just-added 0.5s ease-out 1 forwards;
}

@keyframes attention {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(0.88);
    }

    70% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.attention {
    animation: attention 0.5s ease-out 1 forwards;
}
