/* SupportWizard v1.4.16 shared rich-content layer.
 * Loaded by TinyMCE and both ticket conversation renderers.
 */
.sw-rich-content {
    color: #111827;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.sw-rich-content,
.sw-rich-content * {
    box-sizing: border-box;
}

.sw-rich-content p {
    margin: 0 0 10px;
}

.sw-rich-content p:last-child {
    margin-bottom: 0;
}

.sw-rich-content h1,
.sw-rich-content h2,
.sw-rich-content h3,
.sw-rich-content h4,
.sw-rich-content h5,
.sw-rich-content h6 {
    color: #0f172a;
    font-weight: 700;
    line-height: 1.25;
    margin: 18px 0 10px;
}

.sw-rich-content h1 { font-size: 28px; }
.sw-rich-content h2 { font-size: 24px; }
.sw-rich-content h3 { font-size: 20px; }
.sw-rich-content h4 { font-size: 17px; }
.sw-rich-content h5 { font-size: 15px; }
.sw-rich-content h6 { font-size: 13px; }

/* Neutralize WHMCS / legacy global table styling inside rich content.
 * Layout tables keep author-supplied inline styles; data tables opt into sw-data-table.
 */
.sw-rich-content table {
    background: transparent;
    border: 0;
    border-collapse: separate;
    border-spacing: 0;
    margin: 12px 0;
    max-width: 100%;
    width: auto;
}

.sw-rich-content table thead,
.sw-rich-content table tbody,
.sw-rich-content table tfoot,
.sw-rich-content table tr,
.sw-rich-content table th,
.sw-rich-content table td {
    background: transparent;
    border: 0;
}

.sw-rich-content table th,
.sw-rich-content table td {
    padding: 0;
    text-align: inherit;
    vertical-align: top;
}

.sw-rich-content .sw-data-table {
    border-collapse: collapse;
    width: 100%;
}

.sw-rich-content .sw-data-table th,
.sw-rich-content .sw-data-table td {
    border: 1px solid #dbe3ec;
    padding: 8px 10px;
}

.sw-rich-content .sw-data-table th {
    background: #f8fafc;
    font-weight: 700;
}

.sw-rich-content ul,
.sw-rich-content ol {
    margin: 8px 0 12px 22px;
    padding-left: 18px;
}

.sw-rich-content blockquote {
    border-left: 4px solid #dbe3ec;
    color: #475569;
    font-size: 1em;
    line-height: 1.55;
    margin: 10px 0;
    padding: 6px 12px;
}

.sw-rich-content blockquote p,
.sw-rich-content blockquote h1,
.sw-rich-content blockquote h2,
.sw-rich-content blockquote h3,
.sw-rich-content blockquote h4,
.sw-rich-content blockquote h5,
.sw-rich-content blockquote h6 {
    font-size: 1em;
    font-weight: 400;
    line-height: 1.55;
    margin: 0 0 8px;
}

.sw-rich-content blockquote p:last-child {
    margin-bottom: 0;
}

.sw-rich-content hr {
    border: 0;
    border-top: 1px solid #dbe3ec;
    margin: 16px 0;
}

.sw-rich-content code {
    background: #f1f5f9;
    border: 1px solid #dbe3ec;
    border-radius: 4px;
    color: #0f172a;
    font-family: Consolas, Monaco, monospace;
    font-size: .92em;
    padding: 1px 4px;
}

.sw-rich-content pre {
    background: #0f172a;
    border-radius: 6px;
    color: #e2e8f0;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    line-height: 1.5;
    margin: 12px 0;
    overflow: auto;
    padding: 12px;
    white-space: pre-wrap;
}

.sw-rich-content pre code {
    background: transparent;
    border: 0;
    color: inherit;
    font-size: inherit;
    padding: 0;
}

.sw-rich-content a {
    color: #1d4ed8;
    text-decoration: underline;
}

.sw-rich-content img.sw-inline-image {
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    display: block;
    height: auto;
    margin: 12px 0;
    max-width: 100%;
}

/* Component system */
.sw-rich-content .sw-card {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #dbe3ec;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
    display: flex;
    gap: 14px;
    margin: 16px 0;
    max-width: 100%;
    padding: 16px 18px;
}

.sw-rich-content .sw-card--info {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border-color: #bfdbfe;
    border-left: 4px solid #2563eb;
}

.sw-rich-content .sw-card--warning {
    background: linear-gradient(135deg, #fff8e8 0%, #ffffff 100%);
    border-color: #f0dca5;
    border-left: 4px solid #d49a18;
}

.sw-rich-content .sw-card--danger {
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
    border-color: #fecaca;
    border-left: 4px solid #dc2626;
}

.sw-rich-content .sw-card--success {
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
    border-color: #bbf7d0;
    border-left: 4px solid #16a34a;
}

.sw-rich-content .sw-card--sales {
    background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 100%);
    border-color: #ddd6fe;
    border-left: 4px solid #7c3aed;
}

.sw-rich-content .sw-card__icon {
    align-items: center;
    border-radius: 12px;
    display: flex;
    flex: 0 0 42px;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.sw-rich-content .sw-card--info .sw-card__icon { background: #dbeafe; color: #1d4ed8; }
.sw-rich-content .sw-card--warning .sw-card__icon { background: #fef3c7; color: #a16207; }
.sw-rich-content .sw-card--danger .sw-card__icon { background: #fee2e2; color: #b91c1c; }
.sw-rich-content .sw-card--success .sw-card__icon { background: #dcfce7; color: #15803d; }
.sw-rich-content .sw-card--sales .sw-card__icon { background: #ede9fe; color: #6d28d9; }

.sw-rich-content .sw-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

.sw-rich-content .sw-card__title {
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 4px;
}

.sw-rich-content .sw-card__text {
    color: #475569;
    line-height: 1.55;
}

.sw-rich-content .sw-callout {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #64748b;
    border-radius: 10px;
    margin: 14px 0;
    padding: 12px 14px;
}

.sw-rich-content .sw-callout--info { background: #eff6ff; border-left-color: #2563eb; }
.sw-rich-content .sw-callout--warning { background: #fffbeb; border-left-color: #d97706; }
.sw-rich-content .sw-callout--danger { background: #fef2f2; border-left-color: #dc2626; }
.sw-rich-content .sw-callout--success { background: #f0fdf4; border-left-color: #16a34a; }

.sw-rich-content .sw-price {
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid #dbe3ec;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 16px 0;
    padding: 15px 18px;
}

.sw-rich-content .sw-price__label {
    color: #334155;
    flex: 1 1 180px;
    font-weight: 700;
}

.sw-rich-content .sw-price__old {
    color: #94a3b8;
    font-size: 14px;
    text-decoration: line-through;
}

.sw-rich-content .sw-price__current {
    color: #0f172a;
    font-size: 21px;
    font-weight: 800;
    white-space: nowrap;
}

.sw-rich-content .sw-icon-row {
    align-items: flex-start;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    gap: 12px;
    margin: 12px 0;
    padding: 12px 14px;
}

.sw-rich-content .sw-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sw-rich-content .sw-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sw-rich-content .sw-button {
    border: 1px solid transparent;
    border-radius: 8px;
    display: inline-block;
    font-weight: 700;
    padding: 9px 14px;
    text-decoration: none;
}

.sw-rich-content .sw-button--primary {
    background: #2563eb;
    color: #ffffff;
}

.sw-rich-content .sw-button--secondary {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
}

/* Host-owned SVG icon component. Empty spans survive the sanitizer by class allowlist. */
.sw-rich-content .sw-icon,
.sw-icon {
    background-color: currentColor;
    display: inline-block;
    flex: 0 0 auto;
    height: 22px;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
    vertical-align: -.2em;
    width: 22px;
}

.sw-rich-content .sw-icon--sm, .sw-icon--sm { height: 16px; width: 16px; }
.sw-rich-content .sw-icon--md, .sw-icon--md { height: 22px; width: 22px; }
.sw-rich-content .sw-icon--lg, .sw-icon--lg { height: 30px; width: 30px; }

.sw-icon--info { -webkit-mask-image: url('../icons/info.svg'); mask-image: url('../icons/info.svg'); }
.sw-icon--warning { -webkit-mask-image: url('../icons/warning.svg'); mask-image: url('../icons/warning.svg'); }
.sw-icon--success { -webkit-mask-image: url('../icons/success.svg'); mask-image: url('../icons/success.svg'); }
.sw-icon--cart { -webkit-mask-image: url('../icons/cart.svg'); mask-image: url('../icons/cart.svg'); }
.sw-icon--security { -webkit-mask-image: url('../icons/security.svg'); mask-image: url('../icons/security.svg'); }
.sw-icon--tools { -webkit-mask-image: url('../icons/tools.svg'); mask-image: url('../icons/tools.svg'); }
.sw-icon--document { -webkit-mask-image: url('../icons/document.svg'); mask-image: url('../icons/document.svg'); }
.sw-icon--clock { -webkit-mask-image: url('../icons/clock.svg'); mask-image: url('../icons/clock.svg'); }

/* Merge snapshot classes are internal rich-content classes and remain supported. */
.sw-rich-content .sw-merge-snapshot,
.sw-rich-content .sw-merge-snapshot-meta,
.sw-rich-content .sw-merge-snapshot-thread,
.sw-rich-content .sw-merge-message,
.sw-rich-content .sw-merge-message-body {
    max-width: 100%;
}

@media (max-width: 640px) {
    .sw-rich-content .sw-card {
        gap: 10px;
        padding: 14px;
    }

    .sw-rich-content .sw-card__icon {
        flex-basis: 36px;
        height: 36px;
        width: 36px;
    }

    .sw-rich-content .sw-price {
        align-items: flex-start;
        flex-direction: column;
    }
}

.sw-rich-content .sw-icon,
.sw-icon {
    font-size: 0;
    line-height: 1;
}

/* v1.4.17 pre-ticket guidance / audit snapshot */
.sw-pre-ticket-guidance {
    background: #f8fafc;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    margin-top: 16px;
    overflow: hidden;
}

.sw-pre-ticket-guidance > summary {
    align-items: center;
    color: #1f2937;
    cursor: pointer;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    list-style: none;
    min-height: 46px;
    padding: 11px 14px;
}

.sw-pre-ticket-guidance > summary::-webkit-details-marker,
.sw-pre-ticket-guidance-audit > summary::-webkit-details-marker {
    display: none;
}

.sw-pre-ticket-guidance-summary-main {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    min-width: 0;
}

.sw-pre-ticket-guidance-summary-main i {
    color: #2563eb;
    flex: 0 0 auto;
}

.sw-pre-ticket-guidance-count {
    background: #e0ecff;
    border-radius: 999px;
    color: #1d4ed8;
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
}

.sw-pre-ticket-guidance-body {
    border-top: 1px solid #dbe3ec;
    padding: 14px;
}

.sw-pre-ticket-guidance-intro {
    color: #475569;
    margin: 0 0 12px;
}

.sw-pre-ticket-guidance-system {
    background: #fff;
    border-left: 4px solid #2563eb;
    border-radius: 7px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    margin-bottom: 14px;
    padding: 11px 13px;
}

.sw-pre-ticket-guidance-system p {
    margin: 5px 0 0;
}

.sw-pre-ticket-guidance-list {
    display: grid;
    gap: 9px;
}

.sw-pre-ticket-guidance-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 11px 12px;
}

.sw-pre-ticket-guidance-item-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.sw-pre-ticket-guidance-item p {
    color: #475569;
    margin: 4px 0 8px;
}

.sw-pre-ticket-guidance-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.sw-pre-ticket-guidance-meta span {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #64748b;
    display: inline-flex;
    font-size: 11px;
    gap: 4px;
    padding: 3px 7px;
}

.sw-pre-ticket-guidance-meta .is-opened {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.sw-pre-ticket-guidance-meta .is-not-opened {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.sw-pre-ticket-guidance-ack {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #166534;
    margin-top: 12px;
    padding: 11px 12px;
}

.sw-pre-ticket-guidance-ack p {
    color: #334155;
    margin: 7px 0 0;
}

.sw-pre-ticket-guidance-ack p span {
    font-weight: 700;
}

.sw-pre-ticket-guidance-audit {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 7px;
    margin-top: 12px;
    padding: 0;
}

.sw-pre-ticket-guidance-audit > summary {
    color: #475569;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    list-style: none;
    padding: 8px 10px;
}

.sw-pre-ticket-guidance-audit dl {
    border-top: 1px dashed #cbd5e1;
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0 10px 8px;
}

.sw-pre-ticket-guidance-audit dl > div {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(130px, 190px) minmax(0, 1fr);
    padding-top: 7px;
}

.sw-pre-ticket-guidance-audit dt {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.sw-pre-ticket-guidance-audit dd {
    color: #334155;
    font-size: 11px;
    margin: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .sw-pre-ticket-guidance > summary {
        align-items: flex-start;
    }

    .sw-pre-ticket-guidance-audit dl > div {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

/* v1.4.17 frozen automatic form notices */
.sw-pre-ticket-guidance-notices {
    display: grid;
    gap: 9px;
    margin-bottom: 14px;
}

.sw-pre-ticket-guidance-notice {
    background: #fff;
    border: 1px solid #dbe3ec;
    border-left: 4px solid #64748b;
    border-radius: 8px;
    padding: 10px 12px;
}

.sw-pre-ticket-guidance-notice-info { border-left-color: #2563eb; }
.sw-pre-ticket-guidance-notice-note { border-left-color: #64748b; }
.sw-pre-ticket-guidance-notice-warning { border-left-color: #d97706; }
.sw-pre-ticket-guidance-notice-danger { border-left-color: #dc2626; }
.sw-pre-ticket-guidance-notice-success { border-left-color: #059669; }

.sw-pre-ticket-guidance-notice-message {
    margin-top: 6px;
}

.sw-pre-ticket-guidance-notice-message > :first-child { margin-top: 0; }
.sw-pre-ticket-guidance-notice-message > :last-child { margin-bottom: 0; }

/* v1.4.17.9 dynamic response components */
.sw-rich-content .sw-response-box,
.sw-response-box {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #dbe3ec;
    border-left-width: 4px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
    display: flex;
    gap: 14px;
    margin: 14px 0;
    max-width: 100%;
    padding: 14px 16px;
}

.sw-rich-content .sw-response-box__icon,
.sw-response-box__icon {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    display: flex;
    flex: 0 0 46px;
    height: 46px;
    justify-content: center;
    overflow: hidden;
    padding: 5px;
    width: 46px;
}

.sw-rich-content .sw-response-box__icon-image,
.sw-response-box__icon-image {
    display: block;
    height: 34px;
    max-height: 34px;
    max-width: 34px;
    object-fit: contain;
    width: 34px;
}

.sw-rich-content .sw-response-box__body,
.sw-response-box__body {
    flex: 1 1 auto;
    min-width: 0;
}

.sw-rich-content .sw-response-box__title,
.sw-response-box__title {
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 5px;
}

.sw-rich-content .sw-response-box__text,
.sw-response-box__text {
    color: #475569;
    line-height: 1.55;
}

.sw-rich-content .sw-response-box__text > :last-child,
.sw-response-box__text > :last-child {
    margin-bottom: 0;
}
