/*
 * RYME ticket portal skin
 * Keeps Fluent Support functionality intact while making the customer portal
 * visually consistent with RYME dark, light and branded themes.
 */

.ryme-ticket-portal{
  --rt-bg:#080a10;
  --rt-panel:#0d1017;
  --rt-panel-2:#111622;
  --rt-panel-3:#151b29;
  --rt-text:#f7f8fc;
  --rt-muted:#8e98ad;
  --rt-line:#252e42;
  --rt-line-strong:#33405c;
  --rt-accent:#5271ff;
  --rt-accent-2:#7189ff;
  --rt-accent-soft:rgba(82,113,255,.14);
  --rt-success:#44d68b;
  --rt-warning:#ffc76a;
  --rt-danger:#ff7272;
  --rt-shadow:0 28px 80px rgba(0,0,0,.34);
  --rt-radius:24px;
  --rt-radius-sm:13px;
  width:min(100%,1180px)!important;
  max-width:1180px!important;
  margin:34px auto 70px!important;
  padding:0!important;
  border:1px solid var(--rt-line)!important;
  border-radius:var(--rt-radius)!important;
  background:linear-gradient(180deg,rgba(16,20,30,.99),rgba(8,10,16,.99))!important;
  color:var(--rt-text)!important;
  box-shadow:var(--rt-shadow)!important;
  overflow:hidden!important;
  font-family:inherit!important;
  isolation:isolate;
}

html[data-theme="light"] .ryme-ticket-portal{
  --rt-bg:#f6f6f3;
  --rt-panel:#ffffff;
  --rt-panel-2:#f6f7f9;
  --rt-panel-3:#eef1f6;
  --rt-text:#151515;
  --rt-muted:#6c706f;
  --rt-line:#dedfdc;
  --rt-line-strong:#c7cac6;
  --rt-accent:#111111;
  --rt-accent-2:#2b2b2b;
  --rt-accent-soft:rgba(17,17,17,.07);
  --rt-shadow:0 26px 70px rgba(18,24,38,.10);
  background:linear-gradient(180deg,#fff,#fbfbfa)!important;
}

html[data-theme="ryme"] .ryme-ticket-portal{
  --rt-bg:#070910;
  --rt-panel:#0b0e15;
  --rt-panel-2:#101522;
  --rt-panel-3:#151c2d;
  --rt-text:#f7f8ff;
  --rt-muted:#9099b0;
  --rt-line:#263049;
  --rt-line-strong:#37466b;
  --rt-accent:#5271ff;
  --rt-accent-2:#7189ff;
  --rt-accent-soft:rgba(82,113,255,.15);
  --rt-shadow:0 30px 90px rgba(0,0,0,.48),0 0 0 1px rgba(82,113,255,.05);
  background:
    radial-gradient(circle at 90% 0%,rgba(82,113,255,.12),transparent 28%),
    linear-gradient(180deg,#0c0f17,#070910)!important;
}

.ryme-ticket-portal *,
.ryme-ticket-portal *::before,
.ryme-ticket-portal *::after{box-sizing:border-box}

.ryme-ticket-portal a{color:inherit}
.ryme-ticket-portal p{color:var(--rt-muted)}

/* Main portal sections / cards */
.ryme-ticket-portal :is(.fs_dash_table,.fs_tickets_table,.fs_customer_portal_content,.fs_customer_portal_wrapper,.el-card,[class*="ticket-list"],[class*="ticket_list"],[class*="ticket-wrapper"],[class*="ticket_wrapper"]){
  background:transparent!important;
  border-color:var(--rt-line)!important;
  color:var(--rt-text)!important;
  box-shadow:none!important;
}

/* Header / heading area */
.ryme-ticket-portal .ryme-ticket-heading,
.ryme-ticket-portal :is(h1,h2,h3):first-child{
  margin:0!important;
  color:var(--rt-text)!important;
  font-weight:850!important;
  letter-spacing:-.025em!important;
}

.ryme-ticket-portal .ryme-ticket-heading{
  font-size:clamp(20px,2vw,28px)!important;
  line-height:1.15!important;
}

/* Give the first visible content band breathing room without changing markup. */
.ryme-ticket-portal > :first-child,
.ryme-ticket-portal .fs_dash_header,
.ryme-ticket-portal [class*="portal_header"],
.ryme-ticket-portal [class*="portal-header"]{
  border-color:var(--rt-line)!important;
}

/* Primary create-ticket CTA */
.ryme-ticket-portal .ryme-ticket-create,
.ryme-ticket-portal .ryme-ticket-create.el-button{
  min-height:44px!important;
  padding:0 18px!important;
  border:1px solid rgba(255,255,255,.16)!important;
  border-radius:13px!important;
  background:linear-gradient(180deg,var(--rt-accent-2),var(--rt-accent))!important;
  color:#fff!important;
  font-weight:850!important;
  font-size:14px!important;
  line-height:42px!important;
  letter-spacing:-.01em!important;
  box-shadow:0 12px 28px rgba(82,113,255,.25)!important;
  text-decoration:none!important;
  transition:transform .18s ease,box-shadow .18s ease,filter .18s ease!important;
}
html[data-theme="light"] .ryme-ticket-portal .ryme-ticket-create{box-shadow:0 10px 24px rgba(0,0,0,.14)!important}
.ryme-ticket-portal .ryme-ticket-create:hover{
  transform:translateY(-1px)!important;
  filter:brightness(1.06)!important;
  box-shadow:0 16px 34px rgba(82,113,255,.31)!important;
}
.ryme-ticket-portal .ryme-ticket-create:focus-visible{outline:3px solid var(--rt-accent-soft)!important;outline-offset:3px!important}

/* All / Open / Closed filters */
.ryme-ticket-portal .ryme-ticket-filter,
.ryme-ticket-portal .ryme-ticket-filter.el-button{
  min-width:74px!important;
  min-height:38px!important;
  padding:0 15px!important;
  border:1px solid var(--rt-line)!important;
  border-radius:999px!important;
  background:var(--rt-panel-2)!important;
  color:var(--rt-muted)!important;
  font-size:13px!important;
  line-height:36px!important;
  font-weight:800!important;
  box-shadow:none!important;
  transition:border-color .18s ease,background .18s ease,color .18s ease,transform .18s ease!important;
}
.ryme-ticket-portal .ryme-ticket-filter:hover{
  border-color:var(--rt-line-strong)!important;
  color:var(--rt-text)!important;
  transform:translateY(-1px)!important;
}
.ryme-ticket-portal .ryme-ticket-filter:is(.active,.is-active,.selected,[aria-pressed="true"]),
.ryme-ticket-portal .ryme-ticket-filter.ryme-ticket-filter--selected{
  border-color:var(--rt-accent)!important;
  background:var(--rt-accent)!important;
  color:#fff!important;
  box-shadow:0 8px 22px rgba(82,113,255,.22)!important;
}

/* Search, selects and form fields */
.ryme-ticket-portal :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select),
.ryme-ticket-portal :is(.el-input__wrapper,.el-select__wrapper,.el-textarea__inner){
  min-height:44px!important;
  border:1px solid var(--rt-line)!important;
  border-radius:12px!important;
  background:var(--rt-panel-2)!important;
  color:var(--rt-text)!important;
  box-shadow:none!important;
  font:inherit!important;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease!important;
}
.ryme-ticket-portal :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select){padding:10px 13px!important}
.ryme-ticket-portal :is(input,textarea)::placeholder{color:var(--rt-muted)!important;opacity:.86!important}
.ryme-ticket-portal :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select):focus,
.ryme-ticket-portal :is(.el-input__wrapper,.el-select__wrapper):focus-within{
  border-color:var(--rt-accent)!important;
  box-shadow:0 0 0 1px color-mix(in srgb,var(--rt-accent) 78%,transparent)!important;
  outline:none!important;
}
.ryme-ticket-portal .el-input__inner{color:var(--rt-text)!important;background:transparent!important}
.ryme-ticket-portal .el-input__inner::placeholder{color:var(--rt-muted)!important}
.ryme-ticket-portal .ryme-ticket-search{min-width:min(260px,100%)!important}

/* Secondary icon and utility buttons */
.ryme-ticket-portal button:not(.ryme-ticket-create):not(.ryme-ticket-filter),
.ryme-ticket-portal .el-button:not(.ryme-ticket-create):not(.ryme-ticket-filter){
  border-color:var(--rt-line)!important;
  border-radius:11px!important;
}

/* Ticket table */
.ryme-ticket-portal .ryme-ticket-table,
.ryme-ticket-portal table,
.ryme-ticket-portal .el-table{
  width:100%!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  background:transparent!important;
  color:var(--rt-text)!important;
  overflow:hidden!important;
}
.ryme-ticket-portal .el-table::before,
.ryme-ticket-portal .el-table__inner-wrapper::before{display:none!important}
.ryme-ticket-portal :is(thead th,.el-table th.el-table__cell){
  height:48px!important;
  padding:12px 18px!important;
  border:0!important;
  border-bottom:1px solid var(--rt-line)!important;
  background:var(--rt-panel-2)!important;
  color:var(--rt-muted)!important;
  font-size:11px!important;
  font-weight:850!important;
  letter-spacing:.075em!important;
  text-transform:uppercase!important;
}
.ryme-ticket-portal :is(tbody td,.el-table td.el-table__cell){
  min-height:64px!important;
  padding:15px 18px!important;
  border:0!important;
  border-bottom:1px solid var(--rt-line)!important;
  background:transparent!important;
  color:var(--rt-text)!important;
  vertical-align:middle!important;
  font-size:14px!important;
}
.ryme-ticket-portal :is(tbody tr,.el-table__row){background:transparent!important;transition:background .16s ease!important}
.ryme-ticket-portal :is(tbody tr,.el-table__row):hover>td{background:var(--rt-accent-soft)!important}
.ryme-ticket-portal tbody tr:last-child td{border-bottom:0!important}
.ryme-ticket-portal table a{color:var(--rt-text)!important;font-weight:800!important;text-decoration:none!important}
.ryme-ticket-portal table a:hover{color:var(--rt-accent-2)!important}

/* Status chips added by the companion JS. */
.ryme-ticket-portal .ryme-ticket-status{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:27px!important;
  padding:4px 9px!important;
  border:1px solid var(--rt-line)!important;
  border-radius:999px!important;
  background:var(--rt-panel-2)!important;
  color:var(--rt-muted)!important;
  font-size:11px!important;
  line-height:1!important;
  font-weight:850!important;
  letter-spacing:.02em!important;
  text-transform:capitalize!important;
}
.ryme-ticket-portal .ryme-ticket-status--new,
.ryme-ticket-portal .ryme-ticket-status--open,
.ryme-ticket-portal .ryme-ticket-status--active{
  border-color:rgba(82,113,255,.38)!important;
  background:rgba(82,113,255,.13)!important;
  color:#9fb0ff!important;
}
.ryme-ticket-portal .ryme-ticket-status--closed,
.ryme-ticket-portal .ryme-ticket-status--resolved{
  border-color:rgba(68,214,139,.28)!important;
  background:rgba(68,214,139,.09)!important;
  color:#6ce5a4!important;
}
.ryme-ticket-portal .ryme-ticket-status--pending,
.ryme-ticket-portal .ryme-ticket-status--waiting{
  border-color:rgba(255,199,106,.30)!important;
  background:rgba(255,199,106,.08)!important;
  color:#ffd28b!important;
}
html[data-theme="light"] .ryme-ticket-portal .ryme-ticket-status--new,
html[data-theme="light"] .ryme-ticket-portal .ryme-ticket-status--open,
html[data-theme="light"] .ryme-ticket-portal .ryme-ticket-status--active{color:#3152dc!important}
html[data-theme="light"] .ryme-ticket-portal .ryme-ticket-status--closed,
html[data-theme="light"] .ryme-ticket-portal .ryme-ticket-status--resolved{color:#147544!important}
html[data-theme="light"] .ryme-ticket-portal .ryme-ticket-status--pending,
html[data-theme="light"] .ryme-ticket-portal .ryme-ticket-status--waiting{color:#9a6200!important}

/* Empty state */
.ryme-ticket-portal .ryme-ticket-empty{
  position:relative!important;
  min-height:180px!important;
  padding:98px 18px 30px!important;
  color:var(--rt-muted)!important;
  text-align:center!important;
  font-size:13px!important;
  line-height:1.5!important;
}
.ryme-ticket-portal .ryme-ticket-empty::before{
  content:"";
  position:absolute;
  top:34px;
  left:50%;
  width:48px;
  height:48px;
  transform:translateX(-50%);
  border:1px solid var(--rt-line);
  border-radius:15px;
  background:
    linear-gradient(var(--rt-muted),var(--rt-muted)) 13px 14px/22px 2px no-repeat,
    linear-gradient(var(--rt-muted),var(--rt-muted)) 13px 21px/16px 2px no-repeat,
    linear-gradient(var(--rt-muted),var(--rt-muted)) 13px 28px/12px 2px no-repeat,
    var(--rt-panel-2);
  opacity:.72;
}

/* Ticket creation form / reply screen */
.ryme-ticket-portal form{color:var(--rt-text)!important}
.ryme-ticket-portal label{color:var(--rt-text)!important;font-size:13px!important;font-weight:800!important}
.ryme-ticket-portal textarea{min-height:150px!important;line-height:1.55!important;resize:vertical!important}
.ryme-ticket-portal :is(.el-form-item__label,.el-form-item__content,.el-checkbox__label,.el-radio__label){color:var(--rt-text)!important}
.ryme-ticket-portal :is(.el-upload,.el-upload-dragger){border-color:var(--rt-line)!important;background:var(--rt-panel-2)!important;color:var(--rt-muted)!important;border-radius:14px!important}
.ryme-ticket-portal :is(.el-dialog,.el-drawer,.el-popover){background:var(--rt-panel)!important;color:var(--rt-text)!important;border:1px solid var(--rt-line)!important}
.ryme-ticket-portal :is(.el-dialog__title,.el-drawer__title){color:var(--rt-text)!important}

/* Conversation view */
.ryme-ticket-portal [class*="conversation"],
.ryme-ticket-portal [class*="response"]{border-color:var(--rt-line)!important}
.ryme-ticket-portal [class*="response"] :is(p,li){color:var(--rt-text)}

/* Pagination */
.ryme-ticket-portal :is(.el-pagination,.pagination,[class*="pagination"]){color:var(--rt-muted)!important}
.ryme-ticket-portal :is(.el-pagination button,.el-pager li){border-color:var(--rt-line)!important;background:var(--rt-panel-2)!important;color:var(--rt-muted)!important;border-radius:9px!important}
.ryme-ticket-portal :is(.el-pager li.is-active,.el-pager li.active){background:var(--rt-accent)!important;color:#fff!important}

/* Older Fluent Support portal structure compatibility. */
.ryme-ticket-portal.fs_dash_wrapper{
  padding:0!important;
}
.ryme-ticket-portal .fs_dash_table{
  border:0!important;
  border-radius:0!important;
}
.ryme-ticket-portal .fs_dash_table :is(th,td){border-color:var(--rt-line)!important}

/* Mobile: intentionally redesigned, not just squeezed. */
@media(max-width:767.98px){
  .ryme-ticket-portal{
    width:calc(100% - 24px)!important;
    margin:18px auto 48px!important;
    border-radius:19px!important;
  }
  .ryme-ticket-portal .ryme-ticket-heading{font-size:21px!important}
  .ryme-ticket-portal .ryme-ticket-create{
    width:100%!important;
    min-height:48px!important;
    justify-content:center!important;
    text-align:center!important;
  }
  .ryme-ticket-portal .ryme-ticket-filter{
    min-width:0!important;
    min-height:42px!important;
    flex:1 1 0!important;
    padding:0 12px!important;
  }
  .ryme-ticket-portal .ryme-ticket-search{width:100%!important;min-width:0!important}

  /* Convert the classic 3-column ticket table into touch-friendly cards. */
  .ryme-ticket-portal .ryme-ticket-table thead,
  .ryme-ticket-portal table.ryme-ticket-table thead{display:none!important}
  .ryme-ticket-portal table.ryme-ticket-table,
  .ryme-ticket-portal table.ryme-ticket-table tbody,
  .ryme-ticket-portal table.ryme-ticket-table tr,
  .ryme-ticket-portal table.ryme-ticket-table td{display:block!important;width:100%!important}
  .ryme-ticket-portal table.ryme-ticket-table tbody{padding:10px!important}
  .ryme-ticket-portal table.ryme-ticket-table tr{
    margin:0 0 10px!important;
    padding:7px 12px!important;
    border:1px solid var(--rt-line)!important;
    border-radius:14px!important;
    background:var(--rt-panel-2)!important;
  }
  .ryme-ticket-portal table.ryme-ticket-table tr:last-child{margin-bottom:0!important}
  .ryme-ticket-portal table.ryme-ticket-table td{
    min-height:0!important;
    padding:9px 0!important;
    border:0!important;
    background:transparent!important;
  }
  .ryme-ticket-portal table.ryme-ticket-table td:not(:first-child){
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:12px!important;
    border-top:1px solid var(--rt-line)!important;
    font-size:12px!important;
    color:var(--rt-muted)!important;
  }
  .ryme-ticket-portal table.ryme-ticket-table td:nth-child(2)::before{content:"Date";font-weight:800;color:var(--rt-muted)}
  .ryme-ticket-portal table.ryme-ticket-table td:nth-child(3)::before{content:"Status";font-weight:800;color:var(--rt-muted)}
  .ryme-ticket-portal .ryme-ticket-empty{min-height:170px!important;padding-top:92px!important}
  .ryme-ticket-portal :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select,.el-input__wrapper,.el-select__wrapper){font-size:16px!important}
}

@media(max-width:380px){
  .ryme-ticket-portal{width:calc(100% - 16px)!important;margin-top:12px!important;border-radius:16px!important}
  .ryme-ticket-portal .ryme-ticket-filter{font-size:12px!important;padding:0 8px!important}
}

@media(orientation:landscape) and (max-height:520px) and (max-width:900px){
  .ryme-ticket-portal{margin-top:12px!important;margin-bottom:28px!important}
  .ryme-ticket-portal .ryme-ticket-empty{min-height:132px!important;padding-top:76px!important}
  .ryme-ticket-portal .ryme-ticket-empty::before{top:20px!important}
}

@media(prefers-reduced-motion:reduce){
  .ryme-ticket-portal *{transition:none!important;scroll-behavior:auto!important}
}


/* v1.12.12 — keep the entire Fluent Support shell in sync with the active RYME theme. */
body.ryme-ticket-portal-active{
  background:var(--bg)!important;
}

.ryme-ticket-shell{
  background:transparent!important;
  color:inherit!important;
}

/* Fluent Support can paint its outer Vue/Element containers white. Force those
   surfaces to inherit the portal palette instead of staying permanently white. */
.ryme-ticket-portal,
.ryme-ticket-portal :is(
  .fs_dash_wrapper,
  .fs_dash_content,
  .fs_dash_header,
  .fs_dash_body,
  .fs_dash_table,
  .fs_tickets_table,
  .fs_customer_portal_wrapper,
  .fs_customer_portal_content,
  .fluent_support_widget_container,
  .el-card,
  .el-card__body,
  .el-table,
  .el-table__inner-wrapper,
  .el-table__header-wrapper,
  .el-table__body-wrapper,
  .el-table__empty-block
){
  background-color:var(--rt-panel)!important;
  color:var(--rt-text)!important;
}

.ryme-ticket-portal :is(.el-table__body,.el-table__header,tbody,thead){
  background:transparent!important;
}

.ryme-ticket-portal .el-table__empty-text{
  color:var(--rt-muted)!important;
}

/* Dark theme */
html[data-theme="dark"] .ryme-ticket-shell,
html[data-theme="dark"] .ryme-ticket-portal{
  background:#0b0e15!important;
  border-color:#252e42!important;
}

/* RYME theme */
html[data-theme="ryme"] .ryme-ticket-shell,
html[data-theme="ryme"] .ryme-ticket-portal{
  background:
    radial-gradient(circle at 90% 0%,rgba(82,113,255,.12),transparent 30%),
    linear-gradient(180deg,#0c0f17,#070910)!important;
  border-color:#263049!important;
}

/* Light theme is the only mode that intentionally uses white surfaces. */
html[data-theme="light"] .ryme-ticket-shell{
  background:transparent!important;
}
html[data-theme="light"] .ryme-ticket-portal,
html[data-theme="light"] .ryme-ticket-portal :is(
  .fs_dash_wrapper,
  .fs_dash_content,
  .fs_dash_header,
  .fs_dash_body,
  .fs_dash_table,
  .fs_tickets_table,
  .fs_customer_portal_wrapper,
  .fs_customer_portal_content,
  .fluent_support_widget_container,
  .el-card,
  .el-card__body,
  .el-table,
  .el-table__inner-wrapper,
  .el-table__header-wrapper,
  .el-table__body-wrapper,
  .el-table__empty-block
){
  background-color:#fff!important;
  color:#151515!important;
}

/* The empty state should render once, not as repeated placeholder icons. */
.ryme-ticket-portal .ryme-ticket-empty{
  min-height:180px!important;
}
.ryme-ticket-portal .ryme-ticket-empty .ryme-ticket-empty::before{
  display:none!important;
}


/* v1.12.15 — theme Fluent Support's teleported Create Ticket UI too.
   Element Plus dialogs/dropdowns are often appended directly to <body>, so
   selectors scoped only inside .ryme-ticket-portal cannot reach them. */
body.ryme-ticket-portal-active{
  --rt-global-bg:#080a10;
  --rt-global-panel:#0d1017;
  --rt-global-panel-2:#111622;
  --rt-global-text:#f7f8fc;
  --rt-global-muted:#8e98ad;
  --rt-global-line:#252e42;
  --rt-global-accent:#5271ff;
  --el-color-primary:#5271ff;
  --el-bg-color:#0d1017;
  --el-bg-color-overlay:#111622;
  --el-fill-color-blank:#0d1017;
  --el-fill-color-light:#111622;
  --el-fill-color-lighter:#151b29;
  --el-fill-color-extra-light:#151b29;
  --el-text-color-primary:#f7f8fc;
  --el-text-color-regular:#d5daE5;
  --el-text-color-secondary:#8e98ad;
  --el-text-color-placeholder:#778096;
  --el-border-color:#252e42;
  --el-border-color-light:#252e42;
  --el-border-color-lighter:#20283a;
  --el-mask-color:rgba(0,0,0,.68);
}
html[data-theme="ryme"] body.ryme-ticket-portal-active{
  --rt-global-bg:#05060a;
  --rt-global-panel:#0b0d14;
  --rt-global-panel-2:#101522;
  --rt-global-text:#f7f8ff;
  --rt-global-muted:#9aa5bd;
  --rt-global-line:#2d3852;
  --rt-global-accent:#5271ff;
  --el-bg-color:#0b0d14;
  --el-bg-color-overlay:#101522;
  --el-fill-color-blank:#0b0d14;
  --el-fill-color-light:#101522;
  --el-fill-color-lighter:#151b29;
  --el-fill-color-extra-light:#151b29;
  --el-text-color-primary:#f7f8ff;
  --el-text-color-regular:#dfe5ff;
  --el-text-color-secondary:#9aa5bd;
  --el-text-color-placeholder:#7f8aa5;
  --el-border-color:#2d3852;
  --el-border-color-light:#2d3852;
  --el-border-color-lighter:#232d44;
  --el-mask-color:rgba(3,5,11,.76);
}
html[data-theme="light"] body.ryme-ticket-portal-active{
  --rt-global-bg:#f6f6f3;
  --rt-global-panel:#fff;
  --rt-global-panel-2:#f6f7f9;
  --rt-global-text:#151515;
  --rt-global-muted:#6c706f;
  --rt-global-line:#dedfdc;
  --rt-global-accent:#111;
  --el-color-primary:#111;
  --el-bg-color:#fff;
  --el-bg-color-overlay:#fff;
  --el-fill-color-blank:#fff;
  --el-fill-color-light:#f6f7f9;
  --el-fill-color-lighter:#f1f3f5;
  --el-fill-color-extra-light:#f7f8fa;
  --el-text-color-primary:#151515;
  --el-text-color-regular:#303133;
  --el-text-color-secondary:#6c706f;
  --el-text-color-placeholder:#909399;
  --el-border-color:#dedfdc;
  --el-border-color-light:#e4e7ed;
  --el-border-color-lighter:#ebeef5;
  --el-mask-color:rgba(0,0,0,.42);
}

/* Modal/drawer/popover nodes created outside the portal root. */
body.ryme-ticket-portal-active :is(
  .el-dialog,.el-drawer,.el-message-box,.el-popover,.el-popper,
  .el-select-dropdown,.el-dropdown-menu,.el-picker-panel,.el-cascader-panel,
  .el-upload-dragger
){
  background:var(--rt-global-panel)!important;
  color:var(--rt-global-text)!important;
  border-color:var(--rt-global-line)!important;
  box-shadow:0 26px 80px rgba(0,0,0,.38)!important;
}
body.ryme-ticket-portal-active :is(.el-dialog__header,.el-dialog__body,.el-dialog__footer,.el-drawer__header,.el-drawer__body,.el-drawer__footer,.el-message-box__header,.el-message-box__content){
  background:transparent!important;
  color:var(--rt-global-text)!important;
  border-color:var(--rt-global-line)!important;
}
body.ryme-ticket-portal-active :is(.el-dialog__title,.el-message-box__title,.el-form-item__label,.el-checkbox__label,.el-radio__label,.el-select-dropdown__item,.el-dropdown-menu__item){
  color:var(--rt-global-text)!important;
}
body.ryme-ticket-portal-active :is(.el-input__wrapper,.el-textarea__inner,.el-select__wrapper,input:not([type="checkbox"]):not([type="radio"]),textarea,select){
  background:var(--rt-global-panel-2)!important;
  color:var(--rt-global-text)!important;
  border-color:var(--rt-global-line)!important;
  box-shadow:none!important;
}
body.ryme-ticket-portal-active :is(.el-input__inner,.el-textarea__inner){color:var(--rt-global-text)!important;background:transparent!important}
body.ryme-ticket-portal-active :is(input,textarea,.el-input__inner,.el-textarea__inner)::placeholder{color:var(--rt-global-muted)!important;opacity:.9!important}
body.ryme-ticket-portal-active :is(.el-input__wrapper,.el-select__wrapper):focus-within,
body.ryme-ticket-portal-active :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select):focus{
  border-color:var(--rt-global-accent)!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--rt-global-accent) 18%,transparent)!important;
  outline:none!important;
}
body.ryme-ticket-portal-active .el-overlay{background:rgba(0,0,0,.66)!important;backdrop-!important;color:var(--rt-global-text)!important}
body.ryme-ticket-portal-active :is(.el-select-dropdown__item.is-selected,.el-dropdown-menu__item.is-active){color:var(--rt-global-accent)!important;font-weight:800!important}
body.ryme-ticket-portal-active :is(.el-dialog__close,.el-drawer__close-btn,.el-message-box__close){color:var(--rt-global-muted)!important}
body.ryme-ticket-portal-active :is(.el-dialog__close,.el-drawer__close-btn,.el-message-box__close):hover{color:var(--rt-global-text)!important}

/* Some Fluent Support builds use their own modal/card classes instead of Element Plus. */
body.ryme-ticket-portal-active :is([class*="fluent_support"] [class*="modal"],[class*="fluent-support"] [class*="modal"],[class*="fs_"][class*="modal"],[class*="ticket"][class*="modal"],[class*="ticket"][class*="form"]){
  background-color:var(--rt-global-panel)!important;
  color:var(--rt-global-text)!important;
  border-color:var(--rt-global-line)!important;
}


/* v1.12.20 — remove the unwanted white editor-toolbar overlay in Dark/RYME. */
html[data-theme="dark"] body.ryme-ticket-portal-active :is(
  .ryme-ticket-editor-toolbar,
  .ryme-ticket-editor-toolbar-shell
),
html[data-theme="ryme"] body.ryme-ticket-portal-active :is(
  .ryme-ticket-editor-toolbar,
  .ryme-ticket-editor-toolbar-shell
){
  border-color:transparent!important;
  border-width:0!important;
  outline:0!important;
  box-shadow:none!important;
}

html[data-theme="dark"] body.ryme-ticket-portal-active :is(
  .ryme-ticket-editor-toolbar,
  .ryme-ticket-editor-toolbar-shell
)::before,
html[data-theme="dark"] body.ryme-ticket-portal-active :is(
  .ryme-ticket-editor-toolbar,
  .ryme-ticket-editor-toolbar-shell
)::after,
html[data-theme="ryme"] body.ryme-ticket-portal-active :is(
  .ryme-ticket-editor-toolbar,
  .ryme-ticket-editor-toolbar-shell
)::before,
html[data-theme="ryme"] body.ryme-ticket-portal-active :is(
  .ryme-ticket-editor-toolbar,
  .ryme-ticket-editor-toolbar-shell
)::after{
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
}

/* Known rich-editor toolbar implementations used by support portals. */
html[data-theme="dark"] body.ryme-ticket-portal-active :is(
  .ql-toolbar,
  .mce-toolbar-grp,
  .mce-toolbar,
  .tox-toolbar,
  .tox-toolbar__primary,
  [role="toolbar"]
),
html[data-theme="ryme"] body.ryme-ticket-portal-active :is(
  .ql-toolbar,
  .mce-toolbar-grp,
  .mce-toolbar,
  .tox-toolbar,
  .tox-toolbar__primary,
  [role="toolbar"]
){
  border-color:transparent!important;
  outline:0!important;
  box-shadow:none!important;
}


/* v1.12.21 — remove white pill/border from editor mode toggles and format dropdown */
html[data-theme="dark"] body.ryme-ticket-portal-active :is(
  .wp-editor-tabs,
  .quicktags-toolbar,
  .mce-toolbar-grp,
  .mce-top-part,
  .mce-container-body,
  .mce-flow-layout,
  .mce-panel,
  .wp-editor-container,
  .wp-editor-wrap,
  .wp-switch-editor,
  .switch-tmce,
  .switch-html,
  .mce-btn,
  .mce-menubtn,
  .mce-menubtn button,
  .mce-menubtn .mce-txt,
  .mce-listbox,
  .mce-listbox button,
  .mce-caret,
  .mce-toolbar .mce-btn-group,
  .mce-toolbar .mce-btn-group > div,
  select.wp-editor-format,
  .ql-picker,
  .ql-picker-label,
  .ql-toolbar,
  [class*="editor-toolbar"],
  [class*="toolbar"],
  [class*="switch-"]
),
html[data-theme="ryme"] body.ryme-ticket-portal-active :is(
  .wp-editor-tabs,
  .quicktags-toolbar,
  .mce-toolbar-grp,
  .mce-top-part,
  .mce-container-body,
  .mce-flow-layout,
  .mce-panel,
  .wp-editor-container,
  .wp-editor-wrap,
  .wp-switch-editor,
  .switch-tmce,
  .switch-html,
  .mce-btn,
  .mce-menubtn,
  .mce-menubtn button,
  .mce-menubtn .mce-txt,
  .mce-listbox,
  .mce-listbox button,
  .mce-caret,
  .mce-toolbar .mce-btn-group,
  .mce-toolbar .mce-btn-group > div,
  select.wp-editor-format,
  .ql-picker,
  .ql-picker-label,
  .ql-toolbar,
  [class*="editor-toolbar"],
  [class*="toolbar"],
  [class*="switch-"]
){
  background:var(--rt-global-panel-2)!important;
  color:var(--rt-global-text)!important;
  -webkit-text-fill-color:var(--rt-global-text)!important;
  border-color:var(--rt-global-line)!important;
  box-shadow:none!important;
  outline:0!important;
}

html[data-theme="dark"] body.ryme-ticket-portal-active :is(
  .wp-switch-editor,
  .switch-tmce,
  .switch-html,
  .mce-btn,
  .mce-menubtn,
  .mce-listbox,
  .ql-picker-label,
  .ql-picker
),
html[data-theme="ryme"] body.ryme-ticket-portal-active :is(
  .wp-switch-editor,
  .switch-tmce,
  .switch-html,
  .mce-btn,
  .mce-menubtn,
  .mce-listbox,
  .ql-picker-label,
  .ql-picker
){
  border-radius:10px!important;
}

html[data-theme="dark"] body.ryme-ticket-portal-active :is(
  .wp-switch-editor::before,
  .wp-switch-editor::after,
  .switch-tmce::before,
  .switch-tmce::after,
  .switch-html::before,
  .switch-html::after,
  .mce-btn::before,
  .mce-btn::after,
  .mce-menubtn::before,
  .mce-menubtn::after,
  .mce-listbox::before,
  .mce-listbox::after,
  .ql-picker-label::before,
  .ql-picker-label::after
),
html[data-theme="ryme"] body.ryme-ticket-portal-active :is(
  .wp-switch-editor::before,
  .wp-switch-editor::after,
  .switch-tmce::before,
  .switch-tmce::after,
  .switch-html::before,
  .switch-html::after,
  .mce-btn::before,
  .mce-btn::after,
  .mce-menubtn::before,
  .mce-menubtn::after,
  .mce-listbox::before,
  .mce-listbox::after,
  .ql-picker-label::before,
  .ql-picker-label::after
){
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}

html[data-theme="dark"] body.ryme-ticket-portal-active :is(.mce-btn button,.mce-menubtn button,.ql-picker-label,.mce-txt,select.wp-editor-format),
html[data-theme="ryme"] body.ryme-ticket-portal-active :is(.mce-btn button,.mce-menubtn button,.ql-picker-label,.mce-txt,select.wp-editor-format){
  background:transparent!important;
  color:var(--rt-global-text)!important;
  -webkit-text-fill-color:var(--rt-global-text)!important;
  border:0!important;
  box-shadow:none!important;
}

html[data-theme="dark"] body.ryme-ticket-portal-active .wp-editor-wrap.tmce-active .switch-tmce,
html[data-theme="dark"] body.ryme-ticket-portal-active .wp-editor-wrap.html-active .switch-html,
html[data-theme="ryme"] body.ryme-ticket-portal-active .wp-editor-wrap.tmce-active .switch-tmce,
html[data-theme="ryme"] body.ryme-ticket-portal-active .wp-editor-wrap.html-active .switch-html{
  background:var(--rt-global-accent)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  border-color:var(--rt-global-accent)!important;
}


/* v1.12.22 — remove the remaining overlay on the "Normal"/format dropdown */
html[data-theme="dark"] body.ryme-ticket-portal-active :is(
  .mce-listbox,
  .mce-listbox button,
  .mce-menubtn,
  .mce-menubtn button,
  .mce-menubtn .mce-open,
  .mce-menubtn .mce-caret,
  .mce-menubtn .mce-txt,
  select.wp-editor-format,
  [class*="editor-toolbar"] select,
  [class*="toolbar"] select,
  .ql-picker,
  .ql-picker-label,
  .ql-picker-options
),
html[data-theme="ryme"] body.ryme-ticket-portal-active :is(
  .mce-listbox,
  .mce-listbox button,
  .mce-menubtn,
  .mce-menubtn button,
  .mce-menubtn .mce-open,
  .mce-menubtn .mce-caret,
  .mce-menubtn .mce-txt,
  select.wp-editor-format,
  [class*="editor-toolbar"] select,
  [class*="toolbar"] select,
  .ql-picker,
  .ql-picker-label,
  .ql-picker-options
){
  background:var(--rt-global-panel-2)!important;
  color:var(--rt-global-text)!important;
  -webkit-text-fill-color:var(--rt-global-text)!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  text-shadow:none!important;
}

html[data-theme="dark"] body.ryme-ticket-portal-active :is(
  .mce-listbox,
  .mce-menubtn,
  .ql-picker
),
html[data-theme="ryme"] body.ryme-ticket-portal-active :is(
  .mce-listbox,
  .mce-menubtn,
  .ql-picker
){
  box-shadow:inset 0 0 0 1px var(--rt-global-line)!important;
}

html[data-theme="dark"] body.ryme-ticket-portal-active :is(
  .mce-listbox::before,
  .mce-listbox::after,
  .mce-menubtn::before,
  .mce-menubtn::after,
  .mce-menubtn button::before,
  .mce-menubtn button::after,
  .ql-picker::before,
  .ql-picker::after,
  .ql-picker-label::before,
  .ql-picker-label::after
),
html[data-theme="ryme"] body.ryme-ticket-portal-active :is(
  .mce-listbox::before,
  .mce-listbox::after,
  .mce-menubtn::before,
  .mce-menubtn::after,
  .mce-menubtn button::before,
  .mce-menubtn button::after,
  .ql-picker::before,
  .ql-picker::after,
  .ql-picker-label::before,
  .ql-picker-label::after
){
  background:transparent!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
}

html[data-theme="dark"] body.ryme-ticket-portal-active :is(.mce-menubtn:hover,.mce-listbox:hover,.ql-picker:hover),
html[data-theme="ryme"] body.ryme-ticket-portal-active :is(.mce-menubtn:hover,.mce-listbox:hover,.ql-picker:hover){
  box-shadow:inset 0 0 0 1px var(--rt-global-accent)!important;
}


/* v1.12.23 — fit the focus/active red outline tightly around ticket inputs */
.ryme-ticket-portal :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select):focus,
.ryme-ticket-portal :is(.el-input__wrapper,.el-select__wrapper,.el-textarea__inner):focus-within,
body.ryme-ticket-portal-active :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select):focus,
body.ryme-ticket-portal-active :is(.el-input__wrapper,.el-select__wrapper,.el-textarea__inner):focus-within{
  border-color:var(--rt-accent)!important;
  outline:0!important;
  box-shadow:0 0 0 1px color-mix(in srgb,var(--rt-accent) 78%,transparent)!important;
}

/* Subject field wrapper should align perfectly with its input corners in Dark/RYME. */
.ryme-ticket-portal :is(.el-input__wrapper,.el-select__wrapper,.el-textarea__inner),
body.ryme-ticket-portal-active :is(.el-input__wrapper,.el-select__wrapper,.el-textarea__inner){
  overflow:hidden!important;
  background-clip:padding-box!important;
}


/* v1.12.24 — polished ticket editor controls + navigation buttons */

/* Back to All Tickets */
.ryme-ticket-portal :is(
  a[href*="ticket"],
  a[href*="support"]
).ryme-ticket-back,
.ryme-ticket-portal .ryme-ticket-back,
body.ryme-ticket-portal-active .ryme-ticket-back{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  min-height:36px!important;
  padding:0 13px!important;
  margin:0 0 14px!important;
  border:1px solid color-mix(in srgb,var(--rt-accent) 56%,var(--rt-line))!important;
  border-radius:10px!important;
  background:color-mix(in srgb,var(--rt-accent) 13%,var(--rt-panel-2))!important;
  color:var(--rt-text)!important;
  -webkit-text-fill-color:var(--rt-text)!important;
  font-size:13px!important;
  font-weight:700!important;
  line-height:1!important;
  text-decoration:none!important;
  box-shadow:none!important;
  transition:background .18s ease,border-color .18s ease,transform .18s ease!important;
}
.ryme-ticket-portal .ryme-ticket-back:hover,
body.ryme-ticket-portal-active .ryme-ticket-back:hover{
  background:color-mix(in srgb,var(--rt-accent) 20%,var(--rt-panel-2))!important;
  border-color:var(--rt-accent)!important;
  transform:translateY(-1px)!important;
}

/* Visual / Code tabs */
body.ryme-ticket-portal-active :is(
  .wp-editor-tabs,
  .ryme-ticket-editor-tabs
){
  display:inline-flex!important;
  align-items:center!important;
  gap:4px!important;
  padding:4px!important;
  border:1px solid var(--rt-global-line)!important;
  border-radius:11px!important;
  background:var(--rt-global-panel-2)!important;
  box-shadow:none!important;
}

body.ryme-ticket-portal-active :is(
  .wp-switch-editor,
  .switch-tmce,
  .switch-html
){
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:30px!important;
  padding:0 11px!important;
  margin:0!important;
  border:0!important;
  border-radius:8px!important;
  background:transparent!important;
  color:var(--rt-global-muted)!important;
  -webkit-text-fill-color:var(--rt-global-muted)!important;
  font-size:12px!important;
  font-weight:750!important;
  line-height:1!important;
  box-shadow:none!important;
  transition:background .16s ease,color .16s ease!important;
}

body.ryme-ticket-portal-active :is(
  .wp-editor-wrap.tmce-active .switch-tmce,
  .wp-editor-wrap.html-active .switch-html
){
  background:var(--rt-global-accent)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

/* Rich-text toolbar shell */
body.ryme-ticket-portal-active :is(
  .mce-toolbar-grp,
  .mce-toolbar,
  .tox-toolbar,
  .tox-toolbar__primary,
  .ql-toolbar,
  [role="toolbar"]
){
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:5px!important;
  min-height:44px!important;
  padding:6px 8px!important;
  border:1px solid var(--rt-global-line)!important;
  border-radius:12px!important;
  background:var(--rt-global-panel-2)!important;
  box-shadow:none!important;
}

/* Toolbar buttons */
body.ryme-ticket-portal-active :is(
  .mce-btn,
  .tox-tbtn,
  .ql-toolbar button
){
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:30px!important;
  min-width:30px!important;
  height:30px!important;
  min-height:30px!important;
  padding:0!important;
  margin:0!important;
  border:1px solid transparent!important;
  border-radius:8px!important;
  background:transparent!important;
  color:var(--rt-global-text)!important;
  -webkit-text-fill-color:var(--rt-global-text)!important;
  box-shadow:none!important;
  opacity:1!important;
  transition:background .15s ease,border-color .15s ease,transform .15s ease!important;
}

body.ryme-ticket-portal-active :is(
  .mce-btn:hover,
  .tox-tbtn:hover,
  .ql-toolbar button:hover
){
  background:color-mix(in srgb,var(--rt-global-accent) 13%,var(--rt-global-panel-2))!important;
  border-color:color-mix(in srgb,var(--rt-global-accent) 34%,var(--rt-global-line))!important;
}

body.ryme-ticket-portal-active :is(
  .mce-btn.mce-active,
  .tox-tbtn--enabled,
  .ql-toolbar button.ql-active
){
  background:var(--rt-global-accent)!important;
  border-color:var(--rt-global-accent)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

body.ryme-ticket-portal-active :is(
  .mce-btn button,
  .tox-tbtn,
  .ql-toolbar button
){
  color:inherit!important;
  -webkit-text-fill-color:inherit!important;
}

/* Paragraph / Normal dropdown */
body.ryme-ticket-portal-active :is(
  .mce-menubtn,
  .mce-listbox,
  .tox-tbtn--select,
  .ql-picker
){
  width:auto!important;
  min-width:110px!important;
  height:30px!important;
  min-height:30px!important;
  margin:0!important;
  border:1px solid var(--rt-global-line)!important;
  border-radius:8px!important;
  background:var(--rt-global-panel)!important;
  color:var(--rt-global-text)!important;
  -webkit-text-fill-color:var(--rt-global-text)!important;
  box-shadow:none!important;
}

body.ryme-ticket-portal-active :is(
  .mce-menubtn button,
  .mce-listbox button,
  .tox-tbtn--select,
  .ql-picker-label
){
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  width:100%!important;
  height:100%!important;
  padding:0 10px!important;
  border:0!important;
  border-radius:8px!important;
  background:transparent!important;
  color:var(--rt-global-text)!important;
  -webkit-text-fill-color:var(--rt-global-text)!important;
  font-size:12px!important;
  font-weight:650!important;
  box-shadow:none!important;
}

/* TinyMCE icon consistency */
body.ryme-ticket-portal-active :is(
  .mce-ico,
  .tox-icon,
  .ql-stroke,
  .ql-fill
){
  color:inherit!important;
  stroke:currentColor!important;
}

/* Mobile: keep controls tap-friendly without becoming oversized */
@media (max-width:767px){
  body.ryme-ticket-portal-active :is(
    .mce-toolbar-grp,
    .mce-toolbar,
    .tox-toolbar,
    .tox-toolbar__primary,
    .ql-toolbar,
    [role="toolbar"]
  ){
    gap:6px!important;
    padding:7px!important;
  }

  body.ryme-ticket-portal-active :is(
    .mce-btn,
    .tox-tbtn,
    .ql-toolbar button
  ){
    width:34px!important;
    min-width:34px!important;
    height:34px!important;
    min-height:34px!important;
  }

  body.ryme-ticket-portal-active :is(
    .mce-menubtn,
    .mce-listbox,
    .tox-tbtn--select,
    .ql-picker
  ){
    min-width:118px!important;
    height:34px!important;
    min-height:34px!important;
  }
}


/* v1.12.25 — customer ticket editor uses Visual mode only.
   Hide the raw HTML/Code tab because this portal is for normal customers. */
body.ryme-ticket-portal-active :is(
  .switch-html,
  .wp-switch-editor.switch-html,
  [data-mode="html"],
  [data-editor-mode="code"],
  [aria-label="Code"],
  [title="Code"]
){
  display:none!important;
}

/* When only Visual remains, make it look like one clean compact mode chip. */
body.ryme-ticket-portal-active .wp-editor-tabs{
  padding:3px!important;
  gap:0!important;
}

body.ryme-ticket-portal-active :is(
  .switch-tmce,
  .wp-switch-editor.switch-tmce
){
  margin:0!important;
  border-radius:8px!important;
}


/* v1.12.28 — themed ticket detail screen + one-message-at-a-time customer flow */
.ryme-ticket-portal.ryme-ticket-detail-view{
  background:var(--rt-panel)!important;
  color:var(--rt-text)!important;
}

.ryme-ticket-detail-view .ryme-ticket-theme-surface,
.ryme-ticket-detail-view :is(
  [class*="ticket-detail"],
  [class*="ticket_detail"],
  [class*="ticket-view"],
  [class*="ticket_view"],
  [class*="conversation"],
  [class*="responses"],
  [class*="response-list"],
  [class*="thread"],
  [class*="activity"],
  .el-card,
  .el-card__body
){
  background:transparent!important;
  background-color:transparent!important;
  color:var(--rt-text)!important;
  border-color:var(--rt-line)!important;
  box-shadow:none!important;
  min-height:0!important;
}

.ryme-ticket-detail-view :is(h1,h2,h3,h4,h5,h6,strong,b){
  color:var(--rt-text)!important;
}

.ryme-ticket-detail-view .ryme-ticket-private-notice{
  margin:14px 16px!important;
  padding:11px 13px!important;
  border:1px solid color-mix(in srgb,var(--rt-accent) 28%,var(--rt-line))!important;
  border-radius:11px!important;
  background:var(--rt-accent-soft)!important;
  color:var(--rt-text)!important;
  box-shadow:none!important;
}
.ryme-ticket-detail-view .ryme-ticket-private-notice *{
  color:var(--rt-text)!important;
}

.ryme-ticket-detail-view .ryme-ticket-reply-input{
  width:100%!important;
  min-height:92px!important;
  padding:13px 14px!important;
  border:1px solid var(--rt-line)!important;
  border-radius:13px!important;
  background:var(--rt-panel-2)!important;
  color:var(--rt-text)!important;
  box-shadow:none!important;
}

/* Customer cannot stack multiple messages while support is still waiting. */
.ryme-ticket-detail-view.ryme-ticket-customer-waiting .ryme-ticket-reply-block,
.ryme-ticket-detail-view.ryme-ticket-customer-waiting .ryme-ticket-reply-input,
.ryme-ticket-detail-view.ryme-ticket-customer-waiting .ryme-ticket-reply-label,
.ryme-ticket-detail-view.ryme-ticket-customer-waiting .wp-editor-wrap,
.ryme-ticket-detail-view.ryme-ticket-customer-closed .ryme-ticket-reply-block,
.ryme-ticket-detail-view.ryme-ticket-customer-closed .ryme-ticket-reply-input,
.ryme-ticket-detail-view.ryme-ticket-customer-closed .ryme-ticket-reply-label,
.ryme-ticket-detail-view.ryme-ticket-customer-closed .wp-editor-wrap{
  display:none!important;
}

.ryme-ticket-waiting-panel{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  margin:16px!important;
  padding:15px 16px!important;
  border:1px solid color-mix(in srgb,var(--rt-accent) 34%,var(--rt-line))!important;
  border-radius:14px!important;
  background:color-mix(in srgb,var(--rt-accent) 9%,var(--rt-panel-2))!important;
  color:var(--rt-text)!important;
  box-shadow:none!important;
}

.ryme-ticket-waiting-copy{
  min-width:0!important;
}
.ryme-ticket-waiting-copy strong{
  display:block!important;
  margin-bottom:4px!important;
  color:var(--rt-text)!important;
  font-size:14px!important;
  font-weight:850!important;
}
.ryme-ticket-waiting-copy p{
  margin:0!important;
  color:var(--rt-muted)!important;
  font-size:13px!important;
  line-height:1.45!important;
}

.ryme-ticket-cancel-button{
  flex:0 0 auto!important;
  min-height:38px!important;
  padding:0 14px!important;
  border:1px solid color-mix(in srgb,var(--rt-danger) 48%,var(--rt-line))!important;
  border-radius:11px!important;
  background:color-mix(in srgb,var(--rt-danger) 10%,var(--rt-panel-2))!important;
  color:var(--rt-danger)!important;
  -webkit-text-fill-color:var(--rt-danger)!important;
  font-size:13px!important;
  font-weight:800!important;
  box-shadow:none!important;
  cursor:pointer!important;
}
.ryme-ticket-cancel-button:hover{
  background:color-mix(in srgb,var(--rt-danger) 16%,var(--rt-panel-2))!important;
  border-color:var(--rt-danger)!important;
}
.ryme-ticket-cancel-button:disabled{
  opacity:.55!important;
  cursor:wait!important;
}

@media(max-width:767.98px){
  .ryme-ticket-waiting-panel{
    align-items:stretch!important;
    flex-direction:column!important;
    margin:12px!important;
  }
  .ryme-ticket-cancel-button{
    width:100%!important;
    min-height:44px!important;
  }
}


/* v1.12.29 — fix low-contrast conversation meta / reply-type text in ticket detail */
.ryme-ticket-detail-view :is(
  [class*="conversation"],
  [class*="response"],
  [class*="thread"],
  [class*="message"],
  [class*="activity"]
) :is(
  small,
  time,
  em,
  [class*="meta"],
  [class*="date"],
  [class*="time"],
  [class*="author"],
  [class*="byline"],
  [class*="desc"],
  [class*="excerpt"]
){
  color:var(--rt-muted)!important;
  -webkit-text-fill-color:var(--rt-muted)!important;
  opacity:1!important;
}

.ryme-ticket-detail-view :is(
  [class*="conversation"],
  [class*="response"],
  [class*="thread"],
  [class*="message"],
  [class*="activity"]
) :is(
  [class*="tag"],
  [class*="pill"],
  [class*="badge"],
  [class*="label"],
  [class*="type"],
  [class*="status"],
  [class*="public"],
  [class*="private"]
):not(.ryme-ticket-private-notice):not(.ryme-ticket-close):not(.ryme-ticket-refresh):not(.ryme-ticket-back){
  background:color-mix(in srgb,var(--rt-accent) 10%,var(--rt-panel-2))!important;
  color:var(--rt-text)!important;
  -webkit-text-fill-color:var(--rt-text)!important;
  border:1px solid color-mix(in srgb,var(--rt-accent) 26%,var(--rt-line))!important;
  box-shadow:none!important;
  opacity:1!important;
}

/* Explicit fallback for plain-text reply type labels like “Public Reply”. */
.ryme-ticket-detail-view :is(
  [class*="conversation"],
  [class*="response"],
  [class*="thread"],
  [class*="message"],
  [class*="activity"]
) :is(span,div,p,strong,b,small)
{
  text-shadow:none!important;
}

.ryme-ticket-detail-view :is(
  [class*="conversation"],
  [class*="response"],
  [class*="thread"],
  [class*="message"],
  [class*="activity"]
) :is(span,div,p,strong,b,small):not(.ryme-ticket-private-notice *){
  color:inherit;
}

/* Common colored helper text should stay readable in dark/RYME. */
html[data-theme="dark"] .ryme-ticket-detail-view :is(.text-primary,.text-info,.text-muted,.text-secondary,.text-blue),
html[data-theme="ryme"] .ryme-ticket-detail-view :is(.text-primary,.text-info,.text-muted,.text-secondary,.text-blue){
  color:var(--rt-text)!important;
  -webkit-text-fill-color:var(--rt-text)!important;
}


/* v1.12.31 — polish ticket detail action buttons (Refresh / Close Ticket) */
.ryme-ticket-detail-view .ryme-ticket-refresh,
.ryme-ticket-detail-view .ryme-ticket-close,
body.ryme-ticket-portal-active .ryme-ticket-refresh,
body.ryme-ticket-portal-active .ryme-ticket-close{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  min-height:40px!important;
  padding:0 15px!important;
  border-radius:12px!important;
  font-size:13px!important;
  font-weight:800!important;
  line-height:1!important;
  text-decoration:none!important;
  box-shadow:none!important;
  transition:transform .18s ease,background .18s ease,border-color .18s ease,color .18s ease!important;
}

.ryme-ticket-detail-view .ryme-ticket-refresh,
body.ryme-ticket-portal-active .ryme-ticket-refresh{
  border:1px solid color-mix(in srgb,var(--rt-accent) 26%,var(--rt-line))!important;
  background:color-mix(in srgb,var(--rt-accent) 9%,var(--rt-panel-2))!important;
  color:var(--rt-text)!important;
  -webkit-text-fill-color:var(--rt-text)!important;
}
.ryme-ticket-detail-view .ryme-ticket-refresh:hover,
body.ryme-ticket-portal-active .ryme-ticket-refresh:hover{
  border-color:color-mix(in srgb,var(--rt-accent) 58%,var(--rt-line))!important;
  background:color-mix(in srgb,var(--rt-accent) 16%,var(--rt-panel-2))!important;
  transform:translateY(-1px)!important;
}

.ryme-ticket-detail-view .ryme-ticket-close,
body.ryme-ticket-portal-active .ryme-ticket-close{
  border:1px solid color-mix(in srgb,var(--rt-danger) 42%,var(--rt-line))!important;
  background:linear-gradient(180deg,
    color-mix(in srgb,var(--rt-danger) 15%,var(--rt-panel-2)),
    color-mix(in srgb,var(--rt-danger) 9%,var(--rt-panel-2))
  )!important;
  color:color-mix(in srgb,var(--rt-danger) 76%,#fff)!important;
  -webkit-text-fill-color:color-mix(in srgb,var(--rt-danger) 76%,#fff)!important;
}
.ryme-ticket-detail-view .ryme-ticket-close:hover,
body.ryme-ticket-portal-active .ryme-ticket-close:hover{
  border-color:color-mix(in srgb,var(--rt-danger) 70%,var(--rt-line))!important;
  background:linear-gradient(180deg,
    color-mix(in srgb,var(--rt-danger) 20%,var(--rt-panel-2)),
    color-mix(in srgb,var(--rt-danger) 13%,var(--rt-panel-2))
  )!important;
  transform:translateY(-1px)!important;
}

.ryme-ticket-detail-view .ryme-ticket-refresh:focus-visible,
.ryme-ticket-detail-view .ryme-ticket-close:focus-visible,
body.ryme-ticket-portal-active .ryme-ticket-refresh:focus-visible,
body.ryme-ticket-portal-active .ryme-ticket-close:focus-visible{
  outline:3px solid color-mix(in srgb,var(--rt-accent) 35%,transparent)!important;
  outline-offset:2px!important;
}

@media (max-width:767px){
  .ryme-ticket-detail-view .ryme-ticket-refresh,
  .ryme-ticket-detail-view .ryme-ticket-close,
  body.ryme-ticket-portal-active .ryme-ticket-refresh,
  body.ryme-ticket-portal-active .ryme-ticket-close{
    min-height:42px!important;
    padding:0 14px!important;
    border-radius:11px!important;
  }
}


/* v1.12.32 — closed customer tickets vanish from the conversation view */
.ryme-ticket-detail-view.ryme-ticket-customer-closed > :not(.ryme-ticket-waiting-panel){
  visibility:hidden!important;
}
.ryme-ticket-detail-view.ryme-ticket-customer-closed .ryme-ticket-waiting-panel{
  min-height:92px!important;
}


/* ==========================================================================
   RYME v1.12.75.8 — Ticket portal visual polish
   ========================================================================== */

.ryme-ticket-portal{
  --rt-radius:22px;
  margin-top:28px!important;
  border-color:color-mix(in srgb,var(--rt-line) 84%,transparent)!important;
  box-shadow:0 26px 70px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.025)!important;
}

.ryme-ticket-portal .ryme-ticket-topbar,
.ryme-ticket-portal :is(.fs_dash_header,.el-card__header,[class*="portal-header"],[class*="portal_header"]){
  min-height:84px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:20px 22px!important;
  border:0!important;
  border-bottom:1px solid var(--rt-line)!important;
  background:
    linear-gradient(180deg,color-mix(in srgb,var(--rt-panel-2) 94%,transparent),var(--rt-panel))!important;
  color:var(--rt-text)!important;
}

.ryme-ticket-portal .ryme-ticket-heading{
  color:var(--rt-text)!important;
  font-size:19px!important;
  font-weight:900!important;
  letter-spacing:-.02em!important;
}

.ryme-ticket-portal .ryme-ticket-create,
.ryme-ticket-portal .ryme-ticket-create.el-button{
  min-height:44px!important;
  padding:0 18px!important;
  border-radius:12px!important;
  border:1px solid rgba(255,255,255,.13)!important;
  box-shadow:0 10px 25px rgba(82,113,255,.24)!important;
}

.ryme-ticket-portal .ryme-ticket-toolbar{
  min-height:68px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  padding:12px 20px!important;
  border-bottom:1px solid var(--rt-line)!important;
  background:var(--rt-panel)!important;
}

.ryme-ticket-portal .ryme-ticket-toolbar>*{
  margin-top:0!important;
  margin-bottom:0!important;
}

.ryme-ticket-portal .ryme-ticket-filter,
.ryme-ticket-portal .ryme-ticket-filter.el-button{
  min-width:72px!important;
  min-height:38px!important;
  padding:0 15px!important;
  border-radius:999px!important;
  background:var(--rt-panel-2)!important;
}

.ryme-ticket-portal .ryme-ticket-filter.ryme-ticket-filter--selected,
.ryme-ticket-portal .ryme-ticket-filter:is(.active,.is-active,.selected,[aria-pressed="true"]){
  background:linear-gradient(180deg,var(--rt-accent-2),var(--rt-accent))!important;
  border-color:rgba(255,255,255,.11)!important;
  color:#fff!important;
  box-shadow:0 7px 18px rgba(82,113,255,.24)!important;
}

.ryme-ticket-portal .ryme-ticket-search-wrap{
  margin-left:auto!important;
  width:min(260px,38vw)!important;
}

.ryme-ticket-portal .ryme-ticket-search{
  width:100%!important;
  min-width:0!important;
  height:42px!important;
  border-radius:12px!important;
  background:var(--rt-panel-2)!important;
}

.ryme-ticket-portal .ryme-ticket-table-shell{
  padding:18px!important;
  border:0!important;
  background:transparent!important;
}

.ryme-ticket-portal .ryme-ticket-table,
.ryme-ticket-portal .el-table{
  border:1px solid var(--rt-line)!important;
  border-radius:15px!important;
  overflow:hidden!important;
  background:var(--rt-panel-2)!important;
}

.ryme-ticket-portal :is(thead,.el-table__header-wrapper){
  background:var(--rt-panel-3)!important;
}

.ryme-ticket-portal :is(thead th,.el-table th.el-table__cell){
  height:46px!important;
  padding:12px 18px!important;
  background:var(--rt-panel-3)!important;
  color:color-mix(in srgb,var(--rt-muted) 90%,var(--rt-text) 10%)!important;
  border-bottom:1px solid var(--rt-line)!important;
  font-size:10px!important;
  letter-spacing:.12em!important;
}

.ryme-ticket-portal :is(tbody,.el-table__body-wrapper,.el-table__empty-block){
  background:var(--rt-panel-2)!important;
}

.ryme-ticket-portal :is(tbody td,.el-table td.el-table__cell){
  background:transparent!important;
  border-bottom:1px solid color-mix(in srgb,var(--rt-line) 86%,transparent)!important;
}

.ryme-ticket-portal .ryme-ticket-empty{
  min-height:190px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:12px!important;
  padding:72px 20px 28px!important;
  color:var(--rt-muted)!important;
  text-align:center!important;
  background:transparent!important;
}

.ryme-ticket-portal .ryme-ticket-empty::before{
  top:32px!important;
  width:48px!important;
  height:48px!important;
  border:1px solid var(--rt-line)!important;
  border-radius:15px!important;
  background:
    linear-gradient(var(--rt-muted),var(--rt-muted)) 50% 16px/18px 1.5px no-repeat,
    linear-gradient(var(--rt-muted),var(--rt-muted)) 50% 23px/18px 1.5px no-repeat,
    linear-gradient(var(--rt-muted),var(--rt-muted)) 50% 30px/12px 1.5px no-repeat,
    var(--rt-panel-3)!important;
  opacity:.9!important;
  box-shadow:0 10px 24px rgba(0,0,0,.12)!important;
}

/* Neutralise plugin white chrome in dark / RYME modes. */
html[data-theme="dark"] .ryme-ticket-portal :is(
  .el-card__header,.el-card__body,.fs_dash_header,.fs_dash_body,.fs_dash_content,
  .fs_dash_table,.fs_tickets_table,.el-table__header-wrapper,.el-table__body-wrapper,
  .el-table__empty-block,[class*="filter-wrap"],[class*="filter_wrap"],
  [class*="ticket-filter"],[class*="ticket_filter"]
),
html[data-theme="ryme"] .ryme-ticket-portal :is(
  .el-card__header,.el-card__body,.fs_dash_header,.fs_dash_body,.fs_dash_content,
  .fs_dash_table,.fs_tickets_table,.el-table__header-wrapper,.el-table__body-wrapper,
  .el-table__empty-block,[class*="filter-wrap"],[class*="filter_wrap"],
  [class*="ticket-filter"],[class*="ticket_filter"]
){
  color:var(--rt-text)!important;
  border-color:var(--rt-line)!important;
}

html[data-theme="dark"] .ryme-ticket-portal :is(.el-card__header,.fs_dash_header,[class*="filter-wrap"],[class*="filter_wrap"]),
html[data-theme="ryme"] .ryme-ticket-portal :is(.el-card__header,.fs_dash_header,[class*="filter-wrap"],[class*="filter_wrap"]){
  background:var(--rt-panel)!important;
}

html[data-theme="dark"] .ryme-ticket-portal :is(.el-card__body,.fs_dash_body,.fs_dash_content,.fs_dash_table,.fs_tickets_table),
html[data-theme="ryme"] .ryme-ticket-portal :is(.el-card__body,.fs_dash_body,.fs_dash_content,.fs_dash_table,.fs_tickets_table){
  background:transparent!important;
}

html[data-theme="light"] .ryme-ticket-portal .ryme-ticket-topbar{
  background:linear-gradient(180deg,#fff,#fafbfc)!important;
}
html[data-theme="light"] .ryme-ticket-portal .ryme-ticket-toolbar{
  background:#fff!important;
}
html[data-theme="light"] .ryme-ticket-portal .ryme-ticket-table,
html[data-theme="light"] .ryme-ticket-portal .el-table{
  background:#fff!important;
}
html[data-theme="light"] .ryme-ticket-portal :is(thead th,.el-table th.el-table__cell){
  background:#f3f5f8!important;
}

@media(max-width:760px){
  .ryme-ticket-portal .ryme-ticket-topbar,
  .ryme-ticket-portal :is(.fs_dash_header,.el-card__header,[class*="portal-header"],[class*="portal_header"]){
    min-height:0!important;
    align-items:stretch!important;
    flex-direction:column!important;
    padding:16px!important;
  }

  .ryme-ticket-portal .ryme-ticket-toolbar{
    align-items:stretch!important;
    flex-wrap:wrap!important;
    padding:12px 14px!important;
  }

  .ryme-ticket-portal .ryme-ticket-search-wrap{
    width:100%!important;
    margin-left:0!important;
  }

  .ryme-ticket-portal .ryme-ticket-table-shell{
    padding:12px!important;
  }
}


/* RYME v1.12.75.9 — ticket portal background + control glitch fix */

.ryme-ticket-portal,
.ryme-ticket-portal * {
  box-sizing:border-box;
}

.ryme-ticket-portal {
  background:var(--rt-panel)!important;
  color:var(--rt-text)!important;
}

.ryme-ticket-portal :is(.el-card,.el-card__body,.fs_dash_body,.fs_dash_content,.fs_tickets_table,.fs_dash_table) {
  background:var(--rt-panel)!important;
  color:var(--rt-text)!important;
}

.ryme-ticket-portal .ryme-ticket-toolbar {
  background:linear-gradient(180deg,var(--rt-panel-2),var(--rt-panel))!important;
  border-radius:16px!important;
  margin:14px 18px!important;
  border:1px solid var(--rt-line)!important;
}

.ryme-ticket-portal button,
.ryme-ticket-portal .el-button {
  appearance:none!important;
  -webkit-appearance:none!important;
  font-family:inherit!important;
  cursor:pointer!important;
  opacity:1!important;
  transform:none!important;
}

.ryme-ticket-portal .el-button span,
.ryme-ticket-portal button span {
  color:inherit!important;
}

.ryme-ticket-portal .ryme-ticket-create {
  background:linear-gradient(180deg,var(--rt-accent-2),var(--rt-accent))!important;
  color:#fff!important;
  border:none!important;
}

.ryme-ticket-portal :is(.ryme-ticket-filter,.el-button--default) {
  background:#111827!important;
  border:1px solid var(--rt-line)!important;
  color:var(--rt-text)!important;
}

.ryme-ticket-portal :is(.ryme-ticket-filter.active,.ryme-ticket-filter.selected,.el-button--primary) {
  background:linear-gradient(180deg,var(--rt-accent-2),var(--rt-accent))!important;
  color:#fff!important;
}

.ryme-ticket-portal input,
.ryme-ticket-portal .el-input__inner {
  background:#0c1220!important;
  color:var(--rt-text)!important;
  border:1px solid var(--rt-line)!important;
}

.ryme-ticket-portal .el-input__inner::placeholder {
  color:var(--rt-muted)!important;
}

.ryme-ticket-portal :is(.pagination,.el-pagination) button {
  background:#101827!important;
  color:var(--rt-text)!important;
  border:1px solid var(--rt-line)!important;
  border-radius:10px!important;
}

.ryme-ticket-portal :is(.pagination,.el-pagination) .active {
  background:var(--rt-accent)!important;
  color:#fff!important;
}

html[data-theme="light"] .ryme-ticket-portal,
html[data-theme="light"] .ryme-ticket-portal :is(.el-card,.el-card__body) {
  background:#fff!important;
}

@media(max-width:700px){
  .ryme-ticket-portal .ryme-ticket-toolbar{
    margin:10px!important;
  }
}


/* RYME ticket portal final glitch cleanup */
.ryme-ticket-portal,
.ryme-ticket-portal * {
  box-sizing: border-box;
}

.ryme-ticket-portal {
  background: #090d18 !important;
  color: #f7f8ff !important;
  overflow: hidden;
}

.ryme-ticket-portal input,
.ryme-ticket-portal select,
.ryme-ticket-portal button {
  font-family: inherit !important;
}

.ryme-ticket-portal input {
  background: #101627 !important;
  color: #fff !important;
  border: 1px solid #28334d !important;
  border-radius: 14px !important;
  height: 42px !important;
  padding: 0 16px !important;
}

.ryme-ticket-portal button {
  min-height: 40px !important;
  border-radius: 12px !important;
  border: 1px solid #293652 !important;
  background: #11182a !important;
  color: #fff !important;
  font-weight: 700 !important;
  cursor: pointer;
}

.ryme-ticket-portal button:hover {
  border-color: #5875ff !important;
}

.ryme-ticket-portal .active,
.ryme-ticket-portal .selected,
.ryme-ticket-portal [aria-current="page"] {
  background: linear-gradient(135deg,#5875ff,#435ee8) !important;
  color:#fff !important;
  border-color:#6d86ff !important;
}

.ryme-ticket-portal .pagination,
.ryme-ticket-portal [class*="pagination"] {
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
}

.ryme-ticket-portal .pagination button,
.ryme-ticket-portal [class*="page"] button {
  width:38px !important;
  height:38px !important;
  padding:0 !important;
}

.ryme-ticket-portal select {
  background:#101627 !important;
  color:#fff !important;
  border:1px solid #293652 !important;
  border-radius:12px !important;
  min-height:42px !important;
}

.ryme-ticket-portal .search,
.ryme-ticket-portal [class*="search"] {
  display:flex !important;
  align-items:center !important;
}

.ryme-ticket-portal [class*="status"] {
  color:#fff !important;
}

.ryme-ticket-portal [class*="avatar"],
.ryme-ticket-portal [class*="icon"] {
  opacity:1 !important;
  filter:none !important;
}

.ryme-ticket-portal table,
.ryme-ticket-portal tr,
.ryme-ticket-portal td {
  background:transparent !important;
  color:#dce4ff !important;
}

.ryme-ticket-portal .empty,
.ryme-ticket-portal [class*="empty"] {
  color:#8d9aba !important;
}
