/**
 * hana+nils · Büro für Gestaltung
 * https://hananils.de · buero@hananils.de
 */

/* Page status */

.k-section-name-pages [data-status='unlisted'],
.k-section-name-pages [data-status='draft'],
.k-section-name-sections [data-status='unlisted'],
.k-section-name-sections [data-status='draft'] {
    background-color: rgba(255, 255, 255, 0.4);
}

.k-section-name-pages [data-status='unlisted'] .k-link span,
.k-section-name-pages [data-status='draft'] .k-link span,
.k-section-name-sections [data-status='unlisted'] .k-link span,
.k-section-name-sections [data-status='draft'] .k-link span {
    color: rgba(0, 0, 0, 0.7);
}

/* Section tags */

.hn-tag {
    margin-right: 5px;
    padding: 2px 7px;
    font-size: 0.9em;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.04);
}

.hn-tag.with-hash::before {
    content: '#';
    margin-right: 0.2em;
    color: rgba(0, 0, 0, 0.6);
}

.hn-tag.is-bold {
    color: #fff;
    background: #4271ae;
}

.hn-tag.is-bold.with-hash::before {
    color: rgba(255, 255, 255, 0.6);
}

.hn-tag.with-envelope {
    margin-right: 0.5rem;
    padding-left: 24px;
    background-image: url(../images/icon_mail-open.svg);
    background-repeat: no-repeat;
    background-position: 5px 1px;
}

.hn-tag.with-envelope.is-sent {
    background-color: #2ca653;
    background-image: url(../images/icon_mail-sent.svg);
    background-position: 5px center;
}

.hn-tag.with-envelope.is-sent::after {
    content: ' ✓';
}

/* News modules */

[data-template='module.text'] .k-grid {
    grid-template-columns: repeat(12, 1fr);
}

[data-template='module.text'] .k-column[data-width='2/3'] {
    grid-column-start: span 8;
}

[data-template='module.text'] .k-column[data-width='1/3'] {
    grid-column-start: span 4;
}

[data-template='module.text'] .k-empty[data-layout='list'] > p {
    padding: 0.45rem 0.75rem 0;
}

/**
 * Previews
 */

/* Light */

@font-face {
    src: url('../fonts/Ludwig-Light.woff') format('woff');
    font-family: 'Ludwig';
    font-weight: 200;
    font-style: normal;
}

/* Light Italic */

@font-face {
    src: url('../fonts/Ludwig-LightItalic.woff') format('woff');
    font-family: 'Ludwig';
    font-weight: 200;
    font-style: italic;
}

/* Extra Black */

@font-face {
    src: url('../fonts/Ludwig-ExtraBlack.woff') format('woff');
    font-family: 'Ludwig';
    font-weight: 800;
    font-style: normal;
}

[data-snippet^='preview'] .k-preview-section-preview {
    padding: 2rem;
}

[data-snippet^='preview'] .year {
    display: flex;
    align-items: first baseline;
    font-family: 'Ludwig';
    line-height: 34px;
}

[data-snippet^='preview'] .year h2 {
    flex-basis: 115px;
    min-width: 115px;
    margin: 0;
    padding: 0;
    font-size: 31px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: oldstyle-nums;
}

[data-snippet^='preview'] .year article,
[data-snippet^='preview'] .year strong,
[data-snippet^='preview'] .year b {
    font-size: 21px;
    font-weight: 200;
}

[data-snippet^='preview'] .year a {
    overflow-wrap: break-word;
    text-decoration: underline;
    text-decoration-color: currentcolor;
    text-decoration-thickness: auto;
    text-decoration-color: rgba(0, 0, 0, 0.15);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

[data-snippet^='preview'] .moved-punctuation {
    font-style: normal;
}

[data-snippet^='preview'] .is-related::before {
    content: '\2192';
    display: inline-block;
    position: relative;
    padding-right: 7px;
    text-decoration: none;
}

/* Dynamic text helpers */

.k-section-name-helper details {
    position: relative;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.k-section-name-helper details:last-of-type {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.k-section-name-helper details::after {
    content: '→';
    position: absolute;
    top: 0;
    right: 0;
    margin: 8px 0;
    font-weight: 600;
    line-height: 1.5em;
    pointer-events: none;
}

.k-section-name-helper details[open]::after {
    content: '×';
}

.k-section-name-helper summary::-webkit-details-marker {
    display: none;
}

.k-section-name-helper summary {
    margin: 8px 0;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.k-section-name-helper details p {
    margin-bottom: 8px;
}

.k-section-name-helper ul {
    margin-left: 0 !important;
    padding-left: 0.8rem;
}

.k-section-name-helper li {
    position: relative;
    margin-bottom: 8px;
    list-style: none;
}

.k-section-name-helper li::before {
    content: '–';
    position: absolute;
    top: 0;
    left: -0.8rem;
}

.k-section-name-helper span {
    color: #4271ae;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    background-color: #e3eaf3;
}

.k-section-name-helper code {
    padding: 0 0.1rem;
    color: #000;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    background-color: rgba(0, 0, 0, 0.05);
}

.k-section-name-helper span strong {
    color: #000;
    font-weight: normal;
}

/* Kirbytag highlighting */

.kirbytag span:first-child,
.kirbytag span:last-child,
.kirbykey span {
    color: #4271ae;
}

/* Jobs sunrise/sunset */

.hn-tag.sunrise,
.hn-tag.sunset {
    padding-left: 22px;
    background-image: url(../images/icon_calendar-event.svg);
    background-repeat: no-repeat;
    background-position: 5px 2px;
    background-size: 14px 14px;
    font-variant-numeric: tabular-nums;
    color: #000;
}

.hn-tag.sunset {
    background-image: url(../images/icon_sunset.svg);
}

.k-section-name-jobs article:has(.is-pending) {
    /* background-color: #fffde3; */
}

.k-section-name-jobs article:has(.is-sunset) {
    background-color: #f2f6f8;
}

.k-section-name-jobs article:has(.is-pending) .k-link span {
    font-style: italic;
}

.k-section-name-jobs article:has(.is-sunset) .k-link span {
    color: rgba(0, 0, 0, 0.5);
}

.k-section-name-jobs article:has(.is-sunset) .hn-tag {
    background-color: #e7f1f6;
}
