.supportwizard-client {
    margin: 12px 0 24px;
}

.sw-create-hero {
    align-items: center;
    display: flex;
    gap: 18px;
    margin: 8px 0 22px;
}

.sw-create-hero h2 {
    font-size: 30px;
    margin: 0 0 6px;
}

.sw-create-hero p {
    color: #64748b;
    margin: 0;
}

.sw-create-icon {
    align-items: center;
    background: #f3e8ff;
    border-radius: 8px;
    color: #7c3aed;
    display: inline-flex;
    flex: 0 0 62px;
    font-size: 28px;
    height: 62px;
    justify-content: center;
}

.sw-create-layout {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) 340px;
}

.sw-create-card,
.sw-help-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.sw-create-card {
    max-width: none;
    padding: 22px;
}

.sw-hp-field {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.sw-form-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sw-create-card label {
    color: #1f2937;
}

.sw-create-card .form-control {
    border-color: #dbe3ec;
    border-radius: 6px;
    min-height: 42px;
}

.sw-required {
    color: #dc2626;
}

.sw-client-file-drop {
    align-items: center;
    border: 1px dashed #a78bfa;
    border-radius: 8px;
    color: #475569;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    min-height: 86px;
    padding: 16px;
    text-align: center;
}

.sw-client-file-drop:hover,
.sw-client-file-drop:focus-within {
    background: #faf5ff;
    border-color: #7c3aed;
}

.sw-client-file-drop i {
    color: #7c3aed;
    font-size: 22px;
}

.sw-client-file-drop input {
    height: 1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

.sw-client-file-drop span {
    color: #64748b;
    font-size: 12px;
    font-weight: 400;
}

.sw-client-secret-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin: 18px 0;
}

.sw-client-secret-panel summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 8px;
    font-weight: 700;
    padding: 14px 16px;
}

.sw-client-secret-panel summary span {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.sw-client-secret-body {
    border-top: 1px solid #e2e8f0;
    padding: 0 16px 16px;
}

.sw-client-secret-body p {
    color: #64748b;
    margin: 0 0 10px;
}

.sw-legal-consent-panel {
    background: #f8fafc;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    margin: 18px 0 0;
    padding: 14px 16px;
}

.sw-legal-consent {
    align-items: flex-start;
    display: flex;
    gap: 10px;
    line-height: 1.5;
    margin: 0;
}

.sw-legal-consent input {
    flex: 0 0 auto;
    margin-top: 4px;
}

.sw-legal-consent a {
    font-weight: 700;
    text-decoration: underline;
}

.sw-secret-input {
    display: flex;
}

.sw-secret-input .form-control {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

.sw-secret-input .sw-secret-masked {
    -webkit-text-security: disc;
}

.sw-secret-input .btn {
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

.sw-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.sw-form-actions .btn {
    align-items: center;
    display: inline-flex;
    gap: 7px;
}

.sw-create-sidebar {
    display: grid;
    gap: 16px;
}

.sw-help-card {
    padding: 18px;
}

.sw-help-card h3 {
    align-items: center;
    color: #1f2937;
    display: flex;
    font-size: 16px;
    gap: 8px;
    margin: 0 0 12px;
}

.sw-help-card h3 i {
    color: #2563eb;
}

.sw-help-card ul {
    display: grid;
    gap: 9px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sw-help-card li {
    color: #475569;
    font-size: 13px;
    line-height: 1.45;
    padding-left: 22px;
    position: relative;
}

.sw-help-card li::before {
    color: #16a34a;
    content: "\2713";
    font-weight: 700;
    left: 0;
    position: absolute;
}

.sw-help-card strong {
    display: block;
    font-size: 20px;
    margin-bottom: 6px;
}

.sw-help-card p {
    color: #64748b;
    margin: 0;
}

.sw-client-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.sw-client-header h2 {
    margin: 0;
}

.sw-client-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 18px;
}

.sw-new-ticket-btn {
    font-weight: 700;
    min-width: 220px;
    padding: 12px 18px;
}

.sw-ticket-heading {
    border-bottom: 1px solid #dbe3ec;
    margin: 0 0 14px;
    padding: 0 0 12px;
}

.sw-ticket-heading h2 {
    font-size: 28px;
    line-height: 1.25;
    margin: 4px 0 0;
}

.sw-ticket-number {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.sw-status {
    align-items: center;
    color: #fff;
    display: inline-flex;
    gap: 4px;
    line-height: 1.2;
    max-width: max-content;
    border-radius: 4px;
    padding: 5px 9px;
    font-size: 12px;
}

.sw-ticket-form {
    max-width: 860px;
}

.sw-rich-editor {
    min-height: 220px;
}

.sw-editor-fallback-note {
    color: #92400e;
    margin: 0 0 6px;
}

.sw-ticket-meta {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    margin: 10px 0 18px;
    color: #64748b;
}

.sw-ticket-meta-panel {
    border-bottom: 1px solid #dbe3ec;
    padding: 0 0 16px;
}

.sw-ticket-meta-panel > span {
    align-content: start;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 78px;
    padding: 12px;
}

.sw-ticket-meta-panel .sw-status {
    display: flex;
    flex-direction: row;
    justify-content: center;
    max-width: none;
    width: 100%;
    white-space: nowrap;
}

.sw-ticket-meta-panel strong {
    color: #334155;
    font-size: 12px;
    text-transform: uppercase;
}

@media (max-width: 760px) {
    .sw-ticket-meta {
        grid-template-columns: 1fr;
    }
}

.sw-timeline {
    display: grid;
    gap: 14px;
    margin: 20px 0;
}

.sw-reply {
    border: 1px solid #d7dde5;
    border-radius: 8px;
    padding: 16px;
}

.sw-reply-admin {
    border-left: 4px solid #2563eb;
}

.sw-reply-client {
    border-left: 4px solid #16a34a;
}

.sw-reply-meta {
    align-items: center;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    color: #64748b;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
}

.sw-reply-body {
    color: #111827;
}

.sw-reply-body p {
    margin: 0 0 10px;
}

.sw-reply-body p:last-child {
    margin-bottom: 0;
}

.sw-reply-form-card {
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    margin-top: 22px;
    padding: 16px;
}

.sw-attachments {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.sw-attachments li {
    margin: 6px 0;
}

.sw-attachment-download {
    align-items: center;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #1f4f7a;
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    text-decoration: none;
    width: 100%;
}

.sw-attachment-download:hover,
.sw-attachment-download:focus {
    background: #f3f4f6;
    text-decoration: none;
}

.sw-attachment-download small {
    color: #64748b;
    margin-left: auto;
    white-space: nowrap;
}

.sw-secret-block {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    margin: 12px 0 0;
}

.sw-secret-block summary {
    color: #1f2937;
    cursor: pointer;
    font-weight: 700;
    padding: 10px 12px;
}

.sw-secret-block pre {
    background: #0f172a;
    border: 0;
    border-radius: 0 0 8px 8px;
    color: #e5e7eb;
    margin: 0;
    padding: 12px;
    white-space: pre-wrap;
}

@media (max-width: 1040px) {
    .sw-create-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .sw-create-hero {
        align-items: flex-start;
    }

    .sw-form-grid {
        grid-template-columns: 1fr;
    }

    .sw-create-card {
        padding: 16px;
    }
}


/* SupportWizard client icon/dropzone fixes */
.sw-create-icon .bi-chat-square-plus,
.sw-new-ticket-btn .bi-chat-square-plus {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-height: 1em;
    min-width: 1em;
}

.sw-create-icon .bi-chat-square-plus:empty::before,
.sw-new-ticket-btn .bi-chat-square-plus:empty::before {
    content: "\002B";
    display: inline-flex;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9em;
    font-weight: 700;
    line-height: 1;
}

.sw-client-file-drop.is-dragover {
    background: #f5f3ff;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.sw-client-file-drop.has-files {
    background: #faf5ff;
    border-color: #8b5cf6;
}

.sw-client-file-list {
    color: #475569;
    font-size: 12px;
    line-height: 1.35;
    margin-top: 4px;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.sw-turnstile-wrap {
    background: #f8fafc;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    display: grid;
    gap: 6px;
    margin: 14px 0;
    padding: 14px 16px;
}

.sw-turnstile-wrap strong {
    color: #1f2937;
}

.sw-turnstile-wrap small {
    color: #64748b;
}

.sw-turnstile-container {
    margin-top: 6px;
}

/* SupportWizard create-page hero icon alignment fix */
.sw-create-icon {
    line-height: 1;
    overflow: hidden;
    padding: 0;
    position: relative;
    text-align: center;
    width: 62px;
}

.sw-create-icon > i,
.sw-create-icon > span {
    display: none !important;
}

.sw-create-icon::before {
    align-items: center;
    content: "+";
    display: flex;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 30px;
    font-weight: 600;
    height: 100%;
    justify-content: center;
    left: 0;
    line-height: 1;
    position: absolute;
    top: -1px;
    width: 100%;
}


/* SupportWizard rich text rendering: keep saved TinyMCE content readable without relying on unsafe inline styles. */
.sw-reply-body table {
    border-collapse: collapse;
    margin: 12px 0;
    width: 100%;
}

.sw-reply-body td,
.sw-reply-body th {
    border: 1px solid #dbe3ec;
    padding: 8px;
    vertical-align: top;
}

.sw-reply-body th {
    background: #f8fafc;
    font-weight: 700;
}

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

.sw-reply-body blockquote {
    border-left: 4px solid #dbe3ec;
    color: #475569;
    margin: 12px 0;
    padding: 8px 12px;
}

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

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

.sw-reply-body 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-reply-body pre code {
    background: transparent;
    border: 0;
    color: inherit;
    font-size: inherit;
    padding: 0;
}

.sw-reply-body a {
    text-decoration: underline;
}

/* SupportWizard view log and timeline date UX */
.sw-reply-meta .sw-reply-dates {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

.sw-reply-date {
    align-items: center;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    color: #475569;
    display: inline-flex;
    font-size: 12px;
    gap: 4px;
    padding: 3px 8px;
}

.sw-date-label {
    color: #334155;
    font-weight: 700;
}

.sw-reply-date-edited {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.sw-view-summary .sw-side-row strong small {
    color: #64748b;
    display: block;
    font-size: 11px;
    font-weight: 500;
    margin-top: 2px;
}


.sw-kb-suggestions {
    background: #f8fafc;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    margin-top: 12px;
    padding: 14px 16px;
}

.sw-kb-suggestions-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.sw-kb-suggestions h3 {
    align-items: center;
    display: flex;
    font-size: 16px;
    gap: 8px;
    margin: 0;
}

.sw-kb-suggestions > p {
    color: #64748b;
    margin: 8px 0 12px;
}

.sw-kb-suggestions-list {
    display: grid;
    gap: 10px;
}

.sw-kb-suggestion-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
}

.sw-kb-suggestion-item strong {
    color: #1f2937;
    display: block;
    margin-bottom: 5px;
}

.sw-kb-suggestion-item p {
    color: #64748b;
    margin: 0 0 10px;
}

.sw-kb-suggestion-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.sw-kb-suggestion-open.btn {
    align-items: center;
    background: #2563eb;
    border-color: #1d4ed8;
    border-radius: 7px;
    color: #fff !important;
    display: inline-flex;
    font-weight: 600;
    line-height: 1.25;
    padding: 7px 13px;
    text-decoration: none;
}

.sw-kb-suggestion-open.btn:hover,
.sw-kb-suggestion-open.btn:focus {
    background: #1d4ed8;
    border-color: #1e40af;
    color: #fff !important;
    text-decoration: none;
}

.sw-kb-suggestions-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
}

.sw-kb-reviewed-check {
    align-items: flex-start;
    display: flex;
    gap: 8px;
    margin: 6px 0 0;
    max-width: 560px;
}

.sw-kb-reviewed-check input {
    margin-top: 3px;
}

.sw-kb-reviewed-check span {
    color: #334155;
    font-size: 13px;
    line-height: 1.35;
}

/* SupportWizard v1.3.20 - Issue type notices */
.sw-form-notices {
    display: grid;
    gap: 12px;
    margin: 2px 0 18px;
}
.sw-form-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    border-radius: 12px;
    padding: 14px 16px;
    color: #1e3a8a;
}
.sw-form-notice[hidden],
.sw-form-notices[hidden] {
    display: none !important;
}
.sw-form-notice-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: #2563eb;
}
.sw-form-notice-body strong {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}
.sw-form-notice-body p:last-child {
    margin-bottom: 0;
}
.sw-form-notice-warning,
.sw-form-notice-note {
    border-color: #fde68a;
    background: #fffbeb;
    color: #78350f;
}
.sw-form-notice-warning .sw-form-notice-icon,
.sw-form-notice-note .sw-form-notice-icon {
    background: #fef3c7;
    color: #d97706;
}
.sw-form-notice-danger {
    border-color: #fecaca;
    background: #fef2f2;
    color: #7f1d1d;
}
.sw-form-notice-danger .sw-form-notice-icon {
    background: #fee2e2;
    color: #dc2626;
}
.sw-form-notice-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #14532d;
}
.sw-form-notice-success .sw-form-notice-icon {
    background: #dcfce7;
    color: #16a34a;
}

/* SupportWizard v1.3.25 - payment gate cards */
.sw-payment-gates { margin: 18px 0; }
.sw-payment-gate-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}
.sw-payment-gate-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #fff;
  font-size: 18px;
}
.sw-payment-gate-body h3 { margin: 0 0 8px; font-size: 18px; color: #0f172a; }
.sw-payment-gate-message { margin-bottom: 12px; color: #334155; }
