:root {
    --mfs-ticket-border: #d8e0e8;
    --mfs-ticket-soft: #f5f8fb;
    --mfs-ticket-text: #1f2937;
    --mfs-ticket-muted: #667085;
    --mfs-ticket-accent: #246b74;
    --mfs-ticket-danger: #b42318;
    --mfs-ticket-success: #067647;
}

.mfs-ticket-public {
    margin: 0;
    background: #f5f8fb;
    color: var(--mfs-ticket-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mfs-ticket-public-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1rem clamp(1rem, 4vw, 4rem);
    background: #fff;
    border-bottom: 1px solid var(--mfs-ticket-border);
}

.mfs-ticket-public-header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.mfs-ticket-public-header a {
    color: var(--mfs-ticket-accent);
    text-decoration: none;
}

.mfs-ticket-brand {
    font-size: 1.15rem;
    font-weight: 800;
}

.mfs-ticket-page {
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.mfs-ticket-page--narrow {
    width: min(820px, calc(100% - 2rem));
}

.mfs-ticket-panel {
    margin-top: 1.5rem;
}

.mfs-ticket-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.mfs-ticket-warning,
.mfs-ticket-success,
.mfs-ticket-error {
    margin: 1rem 0;
    padding: 1rem 1.1rem;
    border: 1px solid transparent;
    border-radius: .85rem;
}

.mfs-ticket-warning {
    background: #fffaeb;
    border-color: #fedf89;
    color: #7a2e0e;
}

.mfs-ticket-success {
    background: #ecfdf3;
    border-color: #abefc6;
    color: #05603a;
}

.mfs-ticket-error {
    background: #fef3f2;
    border-color: #fecdca;
    color: var(--mfs-ticket-danger);
}

.mfs-ticket-form {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--mfs-ticket-border);
    border-radius: .9rem;
}

.mfs-ticket-form label,
.mfs-ticket-admin-settings label {
    display: grid;
    gap: .4rem;
    font-weight: 700;
}

.mfs-ticket-form input,
.mfs-ticket-form select,
.mfs-ticket-form textarea,
.mfs-ticket-filters input,
.mfs-ticket-filters select,
.mfs-ticket-admin-settings select {
    box-sizing: border-box;
    width: 100%;
    padding: .75rem .85rem;
    border: 1px solid #b8c4d0;
    border-radius: .65rem;
    background: #fff;
    color: var(--mfs-ticket-text);
    font: inherit;
}

.mfs-ticket-form textarea {
    resize: vertical;
    line-height: 1.55;
}

.mfs-ticket-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.mfs-ticket-checkbox {
    grid-template-columns: auto 1fr !important;
    align-items: start;
    font-weight: 500 !important;
}

.mfs-ticket-checkbox input {
    width: auto;
    margin-top: .25rem;
}

.mfs-ticket-submit {
    justify-self: start;
}

.mfs-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.mfs-ticket-privacy-text {
    margin-top: 1rem;
    color: var(--mfs-ticket-muted);
    font-size: .9rem;
}

.mfs-ticket-layout {
    display: grid;
    grid-template-columns: minmax(250px, 360px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
    margin: 1.25rem 0;
}

.mfs-ticket-layout--staff {
    grid-template-columns: minmax(300px, 430px) minmax(0, 1fr);
}

.mfs-ticket-list-panel,
.mfs-ticket-conversation-panel,
.mfs-ticket-new {
    min-width: 0;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--mfs-ticket-border);
    border-radius: .9rem;
}

.mfs-ticket-list {
    display: grid;
    gap: .6rem;
    max-height: 70vh;
    overflow: auto;
}

.mfs-ticket-list-item {
    display: grid;
    gap: .2rem;
    padding: .8rem;
    border: 1px solid var(--mfs-ticket-border);
    border-radius: .75rem;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.mfs-ticket-list-item:hover,
.mfs-ticket-list-item:focus {
    border-color: var(--mfs-ticket-accent);
    background: #f6fbfc;
}

.mfs-ticket-list-item.priority-kritisk {
    border-left: 5px solid #d92d20;
}

.mfs-ticket-list-item.priority-hoej {
    border-left: 5px solid #f79009;
}

.mfs-ticket-number {
    color: var(--mfs-ticket-accent);
    font-size: .85rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.mfs-ticket-list-item small {
    color: var(--mfs-ticket-muted);
}

.mfs-ticket-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--mfs-ticket-border);
}

.mfs-ticket-meta h3 {
    margin: .2rem 0;
}

.mfs-ticket-status {
    padding: .45rem .7rem;
    border-radius: 999px;
    background: #eef4f7;
    color: #23515a;
    font-size: .85rem;
    font-weight: 800;
    white-space: nowrap;
}

.mfs-ticket-conversation {
    display: grid;
    gap: .85rem;
    margin: 1rem 0;
}

.mfs-ticket-message {
    max-width: 86%;
    padding: .9rem;
    border: 1px solid var(--mfs-ticket-border);
    border-radius: .9rem;
    background: var(--mfs-ticket-soft);
}

.mfs-ticket-message.is-requester {
    margin-left: auto;
    background: #edf9fa;
}

.mfs-ticket-message.is-staff {
    margin-right: auto;
    background: #f8f9fc;
}

.mfs-ticket-message.is-internal {
    max-width: 100%;
    background: #fffaeb;
    border-color: #fedf89;
}

.mfs-ticket-message header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .55rem;
    color: var(--mfs-ticket-muted);
    font-size: .82rem;
}

.mfs-ticket-message-body {
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.mfs-ticket-inline-form {
    margin-top: 1rem;
}

.mfs-ticket-empty {
    padding: 2.5rem 1rem;
    color: var(--mfs-ticket-muted);
    text-align: center;
}

.mfs-ticket-new {
    margin-top: 1.25rem;
}

.mfs-ticket-staff-shortcut {
    margin-top: 1.5rem;
}

.mfs-ticket-stat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .75rem;
    margin: 1rem 0;
}

.mfs-ticket-stat-grid article {
    display: grid;
    gap: .25rem;
    padding: .9rem;
    background: #fff;
    border: 1px solid var(--mfs-ticket-border);
    border-radius: .8rem;
}

.mfs-ticket-stat-grid strong {
    font-size: 1.5rem;
}

.mfs-ticket-stat-grid span {
    color: var(--mfs-ticket-muted);
    font-size: .85rem;
}

.mfs-ticket-filters {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr) 1fr auto;
    gap: .65rem;
    padding: .85rem;
    background: #fff;
    border: 1px solid var(--mfs-ticket-border);
    border-radius: .9rem;
}

.mfs-ticket-admin-settings {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
    gap: .65rem;
    align-items: end;
    padding: .85rem 0;
    border-bottom: 1px solid var(--mfs-ticket-border);
}

.mfs-ticket-reply-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.mfs-ticket-note-form {
    background: #fffcf2;
}

.mfs-ticket-audit {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--mfs-ticket-border);
}

.mfs-ticket-table-wrap {
    overflow-x: auto;
}

.mfs-ticket-audit table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}

.mfs-ticket-audit th,
.mfs-ticket-audit td {
    padding: .5rem;
    border-bottom: 1px solid var(--mfs-ticket-border);
    text-align: left;
}

@media (max-width: 1100px) {
    .mfs-ticket-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .mfs-ticket-filters,
    .mfs-ticket-admin-settings {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .mfs-ticket-form-grid,
    .mfs-ticket-layout,
    .mfs-ticket-layout--staff,
    .mfs-ticket-reply-grid {
        grid-template-columns: 1fr;
    }

    .mfs-ticket-list {
        max-height: 45vh;
    }

    .mfs-ticket-message {
        max-width: 100%;
    }

    .mfs-ticket-heading,
    .mfs-ticket-meta,
    .mfs-ticket-public-header {
        flex-direction: column;
    }
}

@media (max-width: 540px) {
    .mfs-ticket-stat-grid,
    .mfs-ticket-filters,
    .mfs-ticket-admin-settings {
        grid-template-columns: 1fr;
    }
}


/* MFS_DEL07B_COMPACT_USER_MENU */
.user-nav {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-wrap: wrap;
}

.user-nav > a {
    padding: .48rem .62rem;
    white-space: nowrap;
    line-height: 1.15;
}

@media (max-width: 1050px) {
    .user-nav {
        gap: .2rem;
    }

    .user-nav > a {
        padding: .42rem .5rem;
        font-size: .9rem;
    }
}

@media (max-width: 760px) {
    .user-nav {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: thin;
        padding-bottom: .2rem;
    }

    .user-nav > a {
        flex: 0 0 auto;
    }
}
/* MFS_DEL07R_CONTACT_LAYOUT */
.public-site.mfs-ticket-public {
    margin: 0;
    background: var(--mfs-sand);
    color: var(--mfs-ink);
    font-family: var(--mfs-font);
    font-size: 17px;
    line-height: 1.65;
}

.page-contact-ticket .mfs-ticket-contact-section {
    padding-top: clamp(2.5rem, 5vw, 4rem);
}

.page-contact-ticket .mfs-ticket-page {
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

.page-contact-ticket .mfs-ticket-page--narrow {
    max-width: 820px;
}

.page-contact-ticket .mfs-ticket-form {
    box-shadow: var(--mfs-shadow-soft);
}

.page-contact-ticket .mfs-ticket-privacy-text {
    margin-bottom: 0;
}

@media (max-width: 800px) {
    .public-site.mfs-ticket-public {
        font-size: 16px;
    }
}
