.nnweb-support-page {
    max-width: 980px;
}

.nnweb-support-page__title {
    margin: 0 0 8px;
    font-size: var(--nnweb-app-page-title-size, 28px);
    line-height: 1.2;
    color: var(--nnweb-app-heading-color, #0f172a);
}

.nnweb-support-page__lead {
    margin: 0 0 24px;
    max-width: 42rem;
    font-size: var(--nnweb-app-lead-font-size, 15px);
    line-height: 1.6;
    color: var(--nnweb-app-muted-color, #64748b);
}

.nnweb-support-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 20px;
    align-items: start;
}

.nnweb-support-card--history,
.nnweb-support-card--older {
    min-width: 0;
}

.nnweb-support-card--older {
    margin-top: 20px;
}

.nnweb-support-card,
.nnweb-support-thread {
    padding: 22px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.nnweb-support-card__title,
.nnweb-support-thread__subject {
    margin: 0 0 18px;
    font-size: var(--nnweb-app-card-title-size, 18px);
    line-height: 1.3;
    color: var(--nnweb-app-heading-color, #0f172a);
}

.nnweb-support-field {
    display: block;
    margin-bottom: 16px;
}

.nnweb-support-field__label {
    display: block;
    margin-bottom: 8px;
    font-size: var(--nnweb-app-body-font-size, 13px);
    font-weight: 600;
    color: #475569;
}

.nnweb-support-field input,
.nnweb-support-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    font: inherit;
    color: #0f172a;
}

.nnweb-support-field input[readonly] {
    background: #f8fafc;
    color: #64748b;
}

.nnweb-support-field textarea {
    min-height: 140px;
    resize: vertical;
}

.nnweb-support-form__actions {
    margin-top: 8px;
}

.nnweb-support-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.nnweb-support-empty {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.nnweb-support-history {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nnweb-support-history__item {
    display: block;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nnweb-support-history__item:hover {
    border-color: #94a3b8;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.nnweb-support-history__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.nnweb-support-history__preview,
.nnweb-support-history__meta {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}

.nnweb-support-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.nnweb-support-badge--open {
    background: #ecfdf5;
    color: #047857;
}

.nnweb-support-badge--support_reply {
    background: #dbeafe;
    color: #1d4ed8;
}

.nnweb-support-badge--closed {
    background: #f1f5f9;
    color: #475569;
}

.nnweb-support-thread__header {
    margin-bottom: 20px;
}

.nnweb-support-thread__back {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--nnweb-app-link-color, #2563eb);
    text-decoration: none;
}

.nnweb-support-thread__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.nnweb-support-thread__messages {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.nnweb-support-message {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

.nnweb-support-message--customer {
    background: #f8fafc;
}

.nnweb-support-message--staff {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.nnweb-support-message__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #64748b;
}

.nnweb-support-message__body {
    font-size: var(--nnweb-app-body-font-size, 14px);
    line-height: 1.6;
    color: #0f172a;
}

.nnweb-dashboard-support-link.is-active {
    border-color: var(--nnweb-app-link-active-color, #2563eb);
    color: var(--nnweb-app-link-active-color, #2563eb);
}

.nnweb-dashboard-support-link__label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nnweb-dashboard-support-link__badge {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 0 0 2px #fff;
    flex-shrink: 0;
}

.nnweb-dashboard-support-link.has-unread {
    font-weight: 700;
}

.nnweb-support-unread-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.nnweb-support-unread-modal.is-visible {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.nnweb-support-unread-modal[hidden] {
    display: none !important;
}

.nnweb-support-unread-modal[hidden].is-visible {
    display: flex !important;
}

.nnweb-support-unread-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.nnweb-support-unread-modal.is-visible .nnweb-support-unread-modal__backdrop {
    opacity: 1;
}

.nnweb-support-unread-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(480px, calc(100vw - 32px));
    padding: 28px 24px 22px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    transition:
        transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.28s ease;
}

.nnweb-support-unread-modal.is-visible .nnweb-support-unread-modal__dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.nnweb-support-unread-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 22px;
    font-family: inherit;
    line-height: 0;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.nnweb-support-unread-modal__close span {
    display: block;
    line-height: 1;
    transform: translateY(-1px);
}

.nnweb-support-unread-modal__close:hover,
.nnweb-support-unread-modal__close:focus-visible {
    background: #e2e8f0;
    color: #0f172a;
}

.nnweb-support-unread-modal__title {
    margin: 0 0 10px;
    padding-right: 36px;
    font-size: 1.35rem;
    line-height: 1.25;
    color: var(--nnweb-app-heading-color, #0f172a);
}

.nnweb-support-unread-modal__lead {
    margin: 0 0 22px;
    font-size: var(--nnweb-app-lead-font-size, 15px);
    line-height: 1.6;
    color: var(--nnweb-app-muted-color, #64748b);
}

.nnweb-support-unread-modal__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.nnweb-support-unread-modal__later,
.nnweb-support-unread-modal__view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    outline: none;
    box-shadow: none;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.nnweb-support-unread-modal__later {
    border: 1px solid #64748b;
    background: #fff;
    color: #0f172a;
}

.nnweb-support-unread-modal__later:hover,
.nnweb-support-unread-modal__later:focus-visible {
    background: #e2e8f0 !important;
    border-color: #334155 !important;
    color: #020617 !important;
}

.nnweb-support-unread-modal__later:active {
    background: #cbd5e1 !important;
    border-color: #1e293b !important;
    color: #020617 !important;
}

.nnweb-support-unread-modal__view {
    border: 0;
    background: var(--nnweb-app-btn-bg, #2563eb);
    color: var(--nnweb-app-btn-color, #fff) !important;
}

.nnweb-support-unread-modal__view:hover,
.nnweb-support-unread-modal__view:focus-visible {
    background: var(--nnweb-app-btn-hover-bg, #1d4ed8) !important;
    color: var(--nnweb-app-btn-color, #fff) !important;
}

.nnweb-support-unread-modal__view:active {
    background: var(--nnweb-app-btn-active-bg, #1e40af) !important;
    color: var(--nnweb-app-btn-color, #fff) !important;
}

body.nnweb-support-unread-modal-open {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .nnweb-support-unread-modal,
    .nnweb-support-unread-modal__backdrop,
    .nnweb-support-unread-modal__dialog {
        transition: none;
    }

    .nnweb-support-unread-modal__dialog {
        transform: none;
    }
}

@media (max-width: 767px) {
    .nnweb-support-unread-modal__actions {
        flex-direction: column-reverse;
    }

    .nnweb-support-unread-modal__later,
    .nnweb-support-unread-modal__view {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .nnweb-support-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .nnweb-support-thread__meta,
    .nnweb-support-history__top,
    .nnweb-support-message__head {
        flex-direction: column;
        align-items: flex-start;
    }
}
