/* Nòduls · Pas 4 — Constructor de situacions d’aprenentatge */

.annual-item__continue:not(:disabled) {
    border-color: rgba(164, 157, 246, 0.34);
    color: #ecebff;
    background: rgba(126, 121, 225, 0.12);
}

.annual-item__continue:not(:disabled):hover {
    background: rgba(126, 121, 225, 0.2);
}

.sa-editor {
    margin-top: 34px;
}

.sa-editor__empty {
    min-height: 360px;
    display: grid;
    grid-template-columns: auto minmax(0, 520px);
    gap: 28px;
    place-content: center;
    align-items: start;
    padding: 48px;
    border: 1px solid rgba(195, 203, 222, 0.13);
    border-radius: 2px;
    background:
        linear-gradient(
            145deg,
            rgba(7, 15, 28, 0.52),
            rgba(13, 23, 39, 0.42)
        );
}

.sa-editor__empty[hidden],
.sa-editor__workspace[hidden] {
    display: none;
}

.sa-editor__empty-index {
    color: #aaa5ff;
    font-family:
        "Iowan Old Style",
        "Palatino Linotype",
        Georgia,
        serif;
    font-size: 2.8rem;
    line-height: 1;
}

.sa-editor__empty h3 {
    margin: 0;
    color: #f4f1eb;
    font-family:
        "Iowan Old Style",
        "Palatino Linotype",
        Georgia,
        serif;
    font-size: clamp(1.9rem, 3vw, 3rem);
    font-weight: 500;
    letter-spacing: -0.04em;
}

.sa-editor__empty p {
    margin: 14px 0 0;
    color: #9ca6b9;
    font-size: 0.82rem;
    line-height: 1.7;
}

.sa-editor__empty button,
.sa-editor__switcher button,
.sa-concepts__form button,
.sa-editor__footer button {
    font: inherit;
    cursor: pointer;
}

.sa-editor__empty button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding: 0 15px;
    border: 1px solid rgba(167, 160, 248, 0.3);
    border-radius: 2px;
    color: #eeeefe;
    background: rgba(126, 121, 225, 0.11);
    font-size: 0.72rem;
    font-weight: 680;
}

.sa-editor__topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: end;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(195, 203, 222, 0.12);
}

.sa-editor__identity {
    min-width: 0;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.sa-editor__identity > span {
    flex: 0 0 auto;
    min-width: 48px;
    min-height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(171, 165, 248, 0.34);
    border-radius: 50%;
    color: #f2f1ff;
    background: rgba(126, 121, 225, 0.13);
    font-size: 0.67rem;
    font-weight: 760;
}

.sa-editor__identity p {
    margin: 1px 0 7px;
    color: #7d879a;
    font-size: 0.61rem;
    font-weight: 740;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sa-editor__identity h3 {
    margin: 0;
    overflow: hidden;
    color: #f4f1eb;
    font-family:
        "Iowan Old Style",
        "Palatino Linotype",
        Georgia,
        serif;
    font-size: clamp(1.9rem, 3.4vw, 3.4rem);
    font-weight: 500;
    letter-spacing: -0.045em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sa-editor__switcher {
    display: flex;
    gap: 10px;
    align-items: end;
}

.sa-editor__switcher label {
    display: grid;
    gap: 7px;
}

.sa-editor__switcher label > span {
    color: #7b869a;
    font-size: 0.59rem;
    font-weight: 720;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sa-editor__switcher select,
.sa-editor__switcher button {
    min-height: 42px;
    border: 1px solid rgba(188, 198, 220, 0.14);
    border-radius: 2px;
    color: #e7e9ef;
    background: rgba(5, 12, 23, 0.48);
    font-size: 0.7rem;
}

.sa-editor__switcher select {
    min-width: 220px;
    padding: 0 36px 0 12px;
}

.sa-editor__switcher button {
    padding: 0 13px;
}

.sa-editor__overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 24px 0 0;
    border-top: 1px solid rgba(195, 203, 222, 0.12);
    border-bottom: 1px solid rgba(195, 203, 222, 0.12);
}

.sa-editor__overview > div {
    min-width: 0;
    padding: 15px 18px 15px 0;
}

.sa-editor__overview > div + div {
    padding-left: 18px;
    border-left: 1px solid rgba(195, 203, 222, 0.12);
}

.sa-editor__overview dt {
    color: #748097;
    font-size: 0.59rem;
    font-weight: 720;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sa-editor__overview dd {
    margin: 8px 0 0;
    overflow: hidden;
    color: #dce0e8;
    font-size: 0.74rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sa-editor__sections {
    display: grid;
    gap: 22px;
    margin-top: 28px;
}

.sa-editor__section {
    padding: 25px;
    border: 1px solid rgba(195, 203, 222, 0.12);
    border-radius: 2px;
    background:
        linear-gradient(
            135deg,
            rgba(18, 31, 51, 0.58),
            rgba(9, 18, 32, 0.5)
        );
}

.sa-editor__section > header {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(195, 203, 222, 0.1);
}

.sa-editor__section > header > span {
    color: #aaa5ff;
    font-family:
        "Iowan Old Style",
        "Palatino Linotype",
        Georgia,
        serif;
    font-size: 1.15rem;
}

.sa-editor__section h4 {
    margin: 0;
    color: #f0eee9;
    font-family:
        "Iowan Old Style",
        "Palatino Linotype",
        Georgia,
        serif;
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: -0.025em;
}

.sa-editor__section header p {
    max-width: 670px;
    margin: 8px 0 0;
    color: #8792a7;
    font-size: 0.71rem;
    line-height: 1.55;
}

.sa-editor__form-grid,
.sa-sequence {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.sa-editor__field {
    display: grid;
    gap: 8px;
}

.sa-editor__field--wide {
    grid-column: 1 / -1;
}

.sa-editor__field > span,
.sa-concepts__form label > span {
    color: #cdd2dd;
    font-size: 0.66rem;
    font-weight: 680;
}

.sa-editor__field input,
.sa-editor__field textarea,
.sa-concepts__form input {
    width: 100%;
    border: 1px solid rgba(188, 198, 220, 0.13);
    border-radius: 2px;
    outline: none;
    color: #f2f4f8;
    background: rgba(5, 12, 23, 0.46);
    font: inherit;
}

.sa-editor__field input,
.sa-concepts__form input {
    min-height: 46px;
    padding: 0 12px;
}

.sa-editor__field textarea {
    min-height: 102px;
    padding: 11px 12px;
    resize: vertical;
}

.sa-editor__field input:focus,
.sa-editor__field textarea:focus,
.sa-concepts__form input:focus {
    border-color: rgba(159, 151, 245, 0.68);
    box-shadow:
        0 0 0 3px rgba(141, 136, 242, 0.08),
        inset 3px 0 0 rgba(154, 146, 244, 0.65);
}

.sa-concepts__form {
    margin-top: 22px;
}

.sa-concepts__form label {
    display: grid;
    gap: 8px;
}

.sa-concepts__form label > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.sa-concepts__form input {
    border-right: 0;
}

.sa-concepts__form button {
    min-width: 100px;
    border: 1px solid rgba(167, 160, 248, 0.32);
    border-radius: 0 2px 2px 0;
    color: #f0efff;
    background: rgba(126, 121, 225, 0.14);
    font-size: 0.7rem;
    font-weight: 680;
}

.sa-concepts__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.sa-concepts__list:empty {
    display: none;
}

.sa-concept {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 7px 0 11px;
    border: 1px solid rgba(166, 160, 247, 0.25);
    border-radius: 999px;
    color: #dddafa;
    background: rgba(126, 121, 225, 0.09);
    font-size: 0.68rem;
}

.sa-concept button {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #929bad;
    background: transparent;
    cursor: pointer;
}

.sa-concept button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.sa-concepts__empty {
    margin: 17px 0 0;
    color: #748097;
    font-size: 0.68rem;
}

.sa-concepts__empty[hidden] {
    display: none;
}

.sa-editor__footer {
    min-height: 72px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-top: 24px;
    padding: 14px 0 0;
    border-top: 1px solid rgba(195, 203, 222, 0.12);
}

.sa-editor__footer > span {
    color: #748097;
    font-size: 0.65rem;
}

.sa-editor__footer button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid rgba(167, 160, 248, 0.22);
    border-radius: 2px;
    color: #878ca0;
    background: rgba(126, 121, 225, 0.07);
    font-size: 0.7rem;
    font-weight: 680;
}

.sa-editor__footer button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .sa-editor__topbar {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .sa-editor__switcher {
        flex-wrap: wrap;
    }

    .sa-editor__overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sa-editor__overview > div:nth-child(3) {
        padding-left: 0;
        border-top: 1px solid rgba(195, 203, 222, 0.12);
        border-left: 0;
    }

    .sa-editor__overview > div:nth-child(4) {
        border-top: 1px solid rgba(195, 203, 222, 0.12);
    }
}

@media (max-width: 680px) {
    .sa-editor__empty {
        grid-template-columns: 1fr;
        padding: 32px 22px;
    }

    .sa-editor__identity h3 {
        white-space: normal;
    }

    .sa-editor__switcher {
        display: grid;
    }

    .sa-editor__switcher select {
        width: 100%;
        min-width: 0;
    }

    .sa-editor__overview,
    .sa-editor__form-grid,
    .sa-sequence {
        grid-template-columns: 1fr;
    }

    .sa-editor__overview > div {
        padding: 13px 0;
        border-top: 1px solid rgba(195, 203, 222, 0.12);
        border-left: 0 !important;
    }

    .sa-editor__field--wide {
        grid-column: auto;
    }

    .sa-editor__section {
        padding: 21px 17px;
    }
}
