/* HEADSUP: prefix all rules with an id or class of the component to prevent style bleed into other parts of the page! */

.d-none {
    display: none;
}

/* functional styles - see https://a11y-dialog.netlify.app/usage/styling */
.reflexion-dialog-container,
.reflexion-dialog-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1050; /* same as $zindex-modal-backdrop */
}

.reflexion-dialog-container {
    display: flex;
}

.reflexion-dialog-container[aria-hidden="true"] {
    display: none;
}

.reflexion-dialog-overlay {
    background-color: rgb(51 51 51 / 0.8);
}

.reflexion-dialog {
    margin: auto;
    z-index: 1055; /* same as $zindex-modal */
    position: relative;
}

/* theme styling */
#reflexionHelpNeeds {
    padding: 0.25em 1em;
    text-transform: none;
    font-weight: bold;
}
#reflexionHelpNeeds:focus:not(:focus-visible) {
    outline: none;
}

.reflexion-dialog {
    max-width: 60em;
    max-height: 85vh; /* fallback */
    max-height: 85dvh;

    background-color: rgb(255, 255, 255);

    /* scroll handling: */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.reflexion-dialog-content {
    padding: 1.25rem;

    /* scroll handling: */
    overflow-x: hidden;
    overflow-y: auto;
}

.reflexion-dialog-header {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    gap: 1.25rem;

    color: rgb(255, 255, 255);
    background-color: rgb(82, 92, 163);
    padding: 1.25rem;
}
.reflexion-dialog-header .reflexion-dialog-title {
    flex-grow: 1;
    margin: 0;
    padding: 0;
}
.reflexion-dialog-header h1 {
    font-size: 1.5em;
}
.reflexion-dialog-content h2 {
    font-size: 1.2em;
    font-weight: bold;
}

.reflexion-dialog-header .btn-close {
    flex-grow: 0;
    flex-shrink: 0;

    width: 2.5rem;
    height: 2.5rem;

    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}


#reflexionCardForm .form-legend small {
    display: block;
    font-size: 0.625em;
    font-weight: normal;
}

#reflexionCardForm .form-legend .truncate {
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100vw - 8rem);
    display: inline-block;
    overflow: hidden;
    vertical-align: middle;
}

#reflexionCardForm .form-fieldset-action + .form-fieldset-action {
    margin-top: 0.5em;
}

#reflexionCardForm .form-check {
    display: flex;
    align-items: flex-start;
}

#reflexionCardForm .form-check .form-label {
    margin-top: 0.2em;
    margin-bottom: 0;
}

/* Step 1 */

#reflexionFieldsetStep1 .form-row {
    display: flex;
}

#reflexionFieldsetStep1 .form-label {
    width: 1.5rem;
}

/* textarea for mobile */
#reflexionFieldsetStep1 textarea {
    max-width: 100%;
    width: 100%;
    min-height: 3rem;
}

/* more like input for tablet and desktop */
@media screen and (min-width: 47.5rem) {
    #reflexionFieldsetStep1 .form-row {
        align-items: center;
    }

    #reflexionFieldsetStep1 textarea {
        max-width: 100%;
        width: 100%;
        min-height: 0;
        max-height: 2.25rem;
    }
}

/* Step 4 */

.reflexioncard {
    padding: 0 0.5em 0.5em 0.5em;
    background-color: white;
    margin-bottom: 1.25rem;
    max-width: 100%;
    width: fit-content;
}

.reflexioncard .form-row-summary {
    overflow: auto;
}

/* used as placeholder to prevent layout shifts in table */
.reflexioncard .far {
    opacity: 0;
}

#reflexionFieldsetStep4 .form-label {
    color: rgb(27 185 152);
    font-size: 1.5em;
    font-weight: bold;
}

#reflexionGoals {
    border: 2px dotted rgb(27 185 152);
}

#reflexionStep4Table {
    background-color: white;
    border-collapse: separate;
    width: 100%;
}

#reflexionStep4Table col[class] {
    width: 3.75em;
}
#reflexionStep4Table col.reflexion-action {
    min-width: 22em;
}

#reflexionStep4Table th.reflexion-need {
    font-size: 87.5%;
}

#reflexionStep4Table th.reflexion-frequency {
    font-size: 75%;
    padding-left: 0;
    padding-right: 0;
}

.reflexion-frequency1 {
    color: red;
}
.reflexion-frequency2 {
    color: orange;
}
.reflexion-frequency3 {
    color: yellow;
    text-shadow: 0 0 2px rgb(0,0,0,0.5);
}
.reflexion-frequency4 {
    color: limegreen;
}

#reflexionStep4Table th,
#reflexionStep4Table td {
    padding: 0.5em;
}
#reflexionStep4Table th.rotate {
    padding: 0.5em 0.25em;
}

#reflexionStep4Table thead tr:first-child th:first-child,
#reflexionStep4Table tbody th:first-child {
    padding-left: 0;
}

#reflexionStep4Table .reflexion-white {
    background-color: white;
}

#reflexionStep4Table .reflexion-abs {
    position: relative;
}

#reflexionStep4Table .reflexion-abs span {
    position: absolute;
    top: 100%;
    color: rgb(27 185 152);
    font-size: 1.5em;
}

#reflexionStep4Table th.reflexion-rotate {
    font-weight: normal;
    vertical-align: bottom;
}

#reflexionStep4Table th.reflexion-rotate span {
    position: relative;
    left: 50%;
    transform: translateX(-50%) rotate(180deg);
    white-space: nowrap;
    writing-mode: vertical-rl;
}

#reflexionStep4Table thead tr:first-child th {
    padding-top: 0;
}

#reflexionStep4Table thead th.reflexion-frequency {
    font-weight: normal;
    text-align: center;
    vertical-align: bottom;
}

#reflexionStep4Table th.reflexion-frequency span {
    position: relative;
    display: inline-block;
    margin-bottom: 1.25em;
}

#reflexionStep4Table th.reflexion-frequency span:after {
    content: "";
    position: absolute;
    top: calc(100% + 0.5em);
    left: calc(50% - 0.75em);
    width: 0;
    height: 0;
    border: 0.75em solid transparent;
    border-top-color: rgb(27 185 152);
    border-bottom-width: 0;
}

#reflexionStep4Table tbody {
    color: rgb(82, 92, 163);
}

#reflexionStep4Table tbody tr > * {
    border-top: 2px dotted rgb(27 185 152);
    font-weight: normal;
}

#reflexionStep4Table tbody tr:last-child > * {
    border-bottom: 2px dotted rgb(27 185 152);
}

#reflexionStep4Table .reflexion-need1 {
    background-color: rgb(255 250 216);
}

#reflexionStep4Table .reflexion-need2 {
    background-color: rgb(219 236 187);
}

#reflexionStep4Table .reflexion-need3 {
    background-color: rgb(255 224 177);
}

#reflexionStep4Table .reflexion-need4 {
    background-color: rgb(184 230 248);
}

#reflexionStep4Table span.truncate {
    width: 370px;
    max-width: 70vw;
    display: inline-block;
    word-break: break-word;
}

#reflexionStep4Table td.reflexion-need,
#reflexionStep4Table td.reflexion-frequency {
    text-align: center;
}

/* result */
#pdfContent * {
    font-size: 14px;
}

#pdfContent .reflexioncard {
    width: 640px;
}

#pdfContent .reflexion-abs span {
    font-size: 16px;
}

#pdfContent th.reflexion-rotate {
    position: relative;
    height: 125px;
}
#pdfContent th.reflexion-rotate span {
    position: absolute;
    left: calc(-100% - 22px);
    top: 42px;
    width: 128px;
    height: 26px;
    transform: rotate(270deg);
    font-size: 10px;
    writing-mode: unset;
}

#pdfContent th.reflexion-frequency span {
    font-size: 9px;
}

#pdfContent span.truncate {
    display: inline-block;
    width: 364px !important;
    word-break: break-word;
}

#pdfContent .form-label {
    color: rgb(27 185 152);
    font-weight: bold;
}
