/* WOO - Project Chat (Frontend) */
.wcpc-wrap,
.wcpc-wrap * {
  box-sizing: border-box;
}

.wcpc-wrap {
  border: 1px solid #e5e5e5;
  background: #fff;
  padding: 16px;
  border-radius: 14px;
  margin-top: 16px;
  width: 100%;
  position: relative;
}

.wcpc-title {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.3;
}

/* Pinned note */
.wcpc-pinned {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  margin-bottom: 12px;
  text-align: center;
}
.wcpc-pinned-label {
  font-weight: 700;
  margin-bottom: 6px;
}

/* Mobile: keep the "Notice" label centered even when using styled presets */
@media (max-width: 640px){
  .wcpc-pinned-label{ text-align:center; }
}
.wcpc-pinned-body p { margin: 0; }


html[dir="rtl"] .wcpc-pinned,
body.rtl .wcpc-pinned {
  text-align: right;
}
html[dir="rtl"] .wcpc-pinned-label,
body.rtl .wcpc-pinned-label,
html[dir="rtl"] .wcpc-pinned.wcpc-pinned--styled,
body.rtl .wcpc-pinned.wcpc-pinned--styled {
  text-align: right;
}


/* Pinned notice style presets (applied via editor) */
.wcpc-pinned.wcpc-pinned--styled {
  text-align: left;
}
.wcpc-pinned.wcpc-pinned--styled .wcpc-pinned-body {
  text-align: inherit;
}
/* If the content includes an inner wrapper (wcpc-pin), make it transparent so the outer box is the only box */
.wcpc-pinned.wcpc-pinned--styled .wcpc-pin {
  padding: 0;
  border: 0;
  background: transparent;
}

.wcpc-pinned.wcpc-pin--default {
  border-color: #e5e7eb;
  background: #f9fafb;
}
.wcpc-pinned.wcpc-pin--warning {
  border-color: #f59e0b;
  background: #fffbeb;
}
.wcpc-pinned.wcpc-pin--info {
  border-color: #60a5fa;
  background: #eff6ff;
}
.wcpc-pinned.wcpc-pin--success {
  border-color: #6ee7b7;
  background: #ecfdf5;
}

.wcpc-pinned.wcpc-pin--danger {
  border-color: #fecaca;
  background: #fef2f2;
}

.wcpc-pinned.wcpc-pin--special {
  border-color: #c4b5fd;
  background: #f5f3ff;
}

/* Thread */
.wcpc-thread {
  width: 100%;
  max-height: 520px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  /* Ensure overlays (swipe hint / load-older) position inside the chat thread, not the whole page */
  position: relative;
  /* Customer thread border: keep original neutral color, slightly thicker for better separation */
  border: 2px solid #eee;
  border-radius: 14px;
  background: #fafafa;
}

/* Customer: Load older messages button appears inside the thread, above the oldest visible message */
.wcpc-load-older-wrap{
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  justify-content: center;
  padding: 2px 0 0;
  background: transparent;
  border: 0;
}
.wcpc-load-older{
  padding: 8px 12px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  margin: 4px 0 6px;
}

.wcpc-empty {
  padding: 12px;
  border: 1px dashed #ddd;
  border-radius: 14px;
  background: #fff;
  opacity: .85;
}

/* When the onboarding card is injected into the empty-state box, keep it fully opaque
   and hide the (separate) upload-info overlay to avoid layered rectangles. */
.wcpc-empty.wcpc-empty--onboard{opacity:1;}
.wcpc-empty.wcpc-empty--onboard .wcpc-empty-info{display:none !important;}
/* When onboarding card is shown inside the empty-state box, hide the default empty text completely
   (no reserved space). It will be restored when the onboarding card is dismissed. */
.wcpc-empty.wcpc-empty--onboard .wcpc-empty-title,
.wcpc-empty.wcpc-empty--onboard .wcpc-empty-sub{display:none !important;}

/* Inline card when injected into empty-state: always fill container (and remove any top gap)
   NOTE: the base inline onboarding styles add a margin-top; override it here so the card
   truly fills the empty box without extra space above. */
.wcpc-onboard-card.wcpc-onboard-card--inline{
  max-width:100% !important;
  width:100% !important;
  box-shadow:none;
  margin-top:0 !important;
}

/* Empty-state info overlay (customer) */
.wcpc-empty.has-info{position:relative; overflow:hidden;}
.wcpc-empty.has-info .wcpc-empty-title,
.wcpc-empty.has-info .wcpc-empty-sub{
  /* Hide text visually but KEEP its layout space.
     This prevents the empty box from shrinking when the info overlay is shown. */
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
.wcpc-empty.has-info .wcpc-empty-info{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  margin:0;
  border:0;
  background: transparent;
}
.wcpc-info-pop--customer--empty{display:none !important;}

/* Message bubble */
.wcpc-msg {
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #eee;
}

/* ✅ Admin message (clear look) */
.wcpc-msg.is-admin {
  border-left: 4px solid #2271b1;
  background: #f0f6fc;
}

/* ✅ Customer message (clear look) */
.wcpc-msg.is-customer {
  border-left: 4px solid #00a32a;
  background: #f0fdf4;
}

/* ✅ System message (neutral) */
.wcpc-msg.is-system{
  border-left: 4px solid #2271b1;
  background: #f0f6fc;
}


/* RTL: move message sidebar color strip to the right without changing anything else */
html[dir="rtl"] .wcpc-msg.is-admin,
body.rtl .wcpc-msg.is-admin {
  border-left: 1px solid #eee;
  border-right: 4px solid #2271b1;
}
html[dir="rtl"] .wcpc-msg.is-customer,
body.rtl .wcpc-msg.is-customer {
  border-left: 1px solid #eee;
  border-right: 4px solid #00a32a;
}
html[dir="rtl"] .wcpc-msg.is-system,
body.rtl .wcpc-msg.is-system {
  border-left: 1px solid #eee;
  border-right: 4px solid #2271b1;
}

.wcpc-meta {
  opacity: .88;
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.wcpc-dot { opacity: .7; }

.wcpc-links-btn{
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.85);
  font-size: 12px;
  line-height: 1;
}
.wcpc-links-btn:hover{ background: rgba(255,255,255,1); border-color: rgba(0,0,0,0.18); }
.wcpc-links-count{ font-weight: 700; opacity: .8; }
.wcpc-links-btn:hover{ background: rgba(255,255,255,1); }
.wcpc-links-btn .wcpc-links-count{
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(0,0,0,0.06);
  font-size: 11px;
  padding: 0 6px;
}

.wcpc-body {
  margin-top: 4px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.wcpc-thread[data-viewer="customer"] .wcpc-body {
  white-space: pre-wrap;
}
.wcpc-body p { margin: 0 0 8px; font-size: 13px !important; font-weight: 600 !important; line-height: 1.5 !important; }
.wcpc-body p:last-child { margin-bottom: 0; }

/* Customer meta name size */
.wcpc-thread[data-viewer="customer"] .wcpc-meta strong,
.wcpc-thread[data-viewer="customer"] .wcpc-meta .wcpc-author-name { font-size: 14px; font-weight: 700 !important; }

/* Files */
.wcpc-files {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wcpc-file {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px dashed #ddd;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
}

.wcpc-file-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.wcpc-file-title {
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
  font-size: 13px;
}

.wcpc-file-meta small { opacity: .75; }

.wcpc-file-btn {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  text-decoration: none !important;
  white-space: nowrap;
}

.wcpc-file-btn:hover{
  background: #f1f5f9;
}

/* Per-action button styling */
.wcpc-file-btn.is-download{
  border-color:#0f172a;
  background:#fff;
  color:#0f172a;
}
.wcpc-file-btn.is-download:hover{
  background: #f1f5f9;
  border-color:#0f172a;
}

.wcpc-file-btn.is-view{
  border-color:#0f172a;
}

/* ✅ If you have View + Download buttons */
.wcpc-file-actions{
  position:relative;
  overflow:hidden;
  display:flex;
  gap:4px;
  flex-wrap:wrap;
}
.wcpc-file-actions .wcpc-file-btn{
  text-align:center;
}

/* Compact right column for attachments (customer) */
.wcpc-file-right{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:center;
  gap:4px;
}

/* Icon-only buttons */
.wcpc-file-actions .wcpc-file-btn{
  width:28px;
  height:28px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
}
.wcpc-file-actions .wcpc-file-btn span{font-size:14px;line-height:1;}

.wcpc-file-info--right{
  text-align:right;
  opacity:.85;
}
.wcpc-file-info--right small{
  display:block;
  margin-top:0;
  font-size:11px;
}

/* Mobile: file meta on the left of the icons */
@media (max-width: 680px) {
  .wcpc-file-right{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    width:100%;
  }
  .wcpc-file-info--right{order:1;text-align:left;}
  .wcpc-file-actions{order:2;}
}

/* Compose (make it same width + inside card style) */
.wcpc-compose {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #eee;
  border-radius: 14px;
  background: #fff;
  width: 100%;
}

.wcpc-compose h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

/* textarea - prevent theme styles breaking width */
#wcpc-message {
  width: 100% !important;
  max-width: 100% !important;
  display: block;
  min-height: 120px;
  border-radius: 14px;
  border: 1px solid #ddd;
  padding: 10px 12px;
  resize: vertical;
}

/* Upload */
.wcpc-upload {
  margin-top: 10px;
}

.wcpc-upload-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

/* Upload head (label + info button) */
.wcpc-upload-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
  position: relative;
}

.wcpc-upload-label .wcpc-attach-ico{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-right:6px;
  line-height:1;
}

/* Info button / card (customer) */
.wcpc-info-btn{
  width:20px;
  min-width:20px;
  height:20px;
  border-radius:50%;
  padding:0;
  border:1px solid #cbd5e1;
  background:#f3f4f6;
  color:#111827;
  font-weight:800;
  font-size:12px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  flex:0 0 auto;
}
.wcpc-info-btn:hover{background:#f9fafb;}

/* Info popover base (customer) */
.wcpc-info-pop{
  display:none;
}
.wcpc-info-pop.is-open{
  display:block;
}

/* Backdrop used when the info card is shown as a modal (empty thread) */
.wcpc-info-backdrop{
  display:none;
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.18);
  z-index:99998;
  border-radius:18px;
}
.wcpc-info-backdrop.is-open{display:block;}

/* Mobile scroll tip overlay (customer) */
.wcpc-scroll-tip{
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.wcpc-scroll-tip__box{
  background: #fff;
  border-radius: 14px;
  max-width: 420px;
  width: 100%;
  padding: 16px 16px 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
}
.wcpc-scroll-tip__title{
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.wcpc-scroll-tip__text{
  font-size: 13px;
  line-height: 1.45;
  opacity: .9;
}
.wcpc-scroll-tip__btn{
  margin-top: 12px;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}
.wcpc-info-pop--customer{
  position:fixed;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  z-index:99999;
  width:min(380px, calc(100vw - 40px));
  background:#ffffff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  box-shadow:0 18px 55px rgba(0,0,0,.15);
  padding:10px 12px;
  max-height:70vh;
  overflow:auto;
  font-size:13px;
  line-height:1.55;
}

.wcpc-info-pop--customer .ttl{
  font-size:14px;
  font-weight:800;
  margin:0;
}

.wcpc-info-pop--customer .row strong{font-weight:700;}

/* Make the close button sit at the top-right corner (customer popover) */
.wcpc-info-pop--customer .wcpc-info-head{position:relative;padding-right:42px;}
.wcpc-info-pop--customer .wcpc-info-close{position:absolute;top:2px;right:2px;}

/* Strong override (themes sometimes restyle buttons/links) */
.wcpc-wrap .wcpc-info-btn{
  background:#f3f4f6 !important;
  color:#111827 !important;
  border-color:#cbd5e1 !important;
}
.wcpc-wrap .wcpc-info-pop .wcpc-info-close{
  border:0;
  background:transparent;
  color:#111827;
  border-radius:0;
  width:auto;
  height:auto;
  font-size:20px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  padding:0;
}
.wcpc-info-pop .wcpc-info-close:hover{color:#000;}
.wcpc-info-pop code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:11px;}
.wcpc-info-pop .row{margin:4px 0;}

.wcpc-upload input[type="file"] {
  width: 100%;
  max-width: 100%;
  display: block;
}

#wcpc-file-labels {
  margin-top: 8px;
}

.wcpc-filelabel-row {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.wcpc-filelabel-row strong {
  font-size: 12px;
  opacity: .85;
}

.wcpc-filelabel-row input {
  min-width: 240px;
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid #ddd;
  padding: 8px 10px;
}

.wcpc-hint {
  display: block;
  margin-top: 6px;
  opacity: .75;
}

/* Alerts */
.wcpc-alert {
  padding: 10px 12px;
  border: 1px solid #f2c200;
  background: #fff8dd;
  border-radius: 12px;
  margin-bottom: 10px;
}

/* Send button */
.wcpc-send-btn,
#wcpc-send {
  margin-top: 10px;
  border-radius: 12px;
  padding: 10px 16px;
}

/* Mobile */
@media (max-width: 680px) {
  .wcpc-wrap { padding: 12px; }
  .wcpc-thread { padding: 10px; }
  .wcpc-compose { padding: 12px; }
  .wcpc-file { flex-direction: column; align-items: stretch; }
  .wcpc-file-btn { text-align: center; }
  .wcpc-filelabel-row input { width: 100%; min-width: 0; }
}


/* File queue UI */

.wcpc-filelabel-row{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px dashed #ddd;padding:10px 12px;border-radius:12px;background:#fff;margin-top:8px}
.wcpc-filelabel-left{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.wcpc-filelabel-name{word-break:break-word;font-size:12px;line-height:1.3;}
.wcpc-filelabel{width:100%;max-width:520px;border:1px solid #ddd;border-radius:12px;padding:8px 10px}
.wcpc-file-remove{border:0;background:transparent;font-size:22px;line-height:1;cursor:pointer;border-radius:8px;width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;opacity:.75color:#b91c1c;}
.wcpc-file-remove:hover{opacity:1;background:#fef2f2}


/* Override: make remove icon clear and consistent for customers */

.wcpc-selected-file{
	position: relative;
	display:flex;
	align-items:center;
	gap:12px;
}

.wcpc-file-remove{
	position:absolute;
	right:10px;
	top:50%;
	transform:translateY(-50%);
	border:none !important;
	background:transparent !important;
	box-shadow:none !important;
	padding:0 !important;
	line-height:1 !important;
	font-size:18px;
	cursor:pointer;
	color:#111; /* ثابت */
	opacity:.85;
}

.wcpc-file-remove:hover{
	color:#111;     /* لا يتغير */
	opacity:.85;    /* لا يتغير */
}

/* ===== Selected files queue (Frontend) ===== */

.wcpc-selected-files{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
}

.wcpc-selected-file{
  position:relative;
  border:1px dashed #ddd;
  border-radius:12px;
  background:#fff;
  padding:12px 12px;
  padding-right:46px; /* مساحة لزر X */
}

.wcpc-selected-file.is-invalid{
  border-style:solid;
  border-color:#dc2626;
  background:#fef2f2;
  box-shadow:0 0 0 1px rgba(220,38,38,.45);
}

.wcpc-file-meta{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.wcpc-file-top{
  display:flex;
  align-items:flex-start;
  gap:10px;
}

.wcpc-file-icon{
  width:28px;
  height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  border:1px solid #eee;
  background:#fafafa;
  font-size:18px;
  flex:0 0 auto;
}

.wcpc-selected-file.is-invalid .wcpc-file-icon{
  border-color:#fecaca;
  background:#fff1f2;
}

.wcpc-file-titlewrap{
  min-width:0;
  flex:1;
}

.wcpc-file-name{
  line-height:1.25;
  word-break:break-word;
  font-size:12px;
}

.wcpc-file-info small{
  display:block;
  margin-top:4px;
  opacity:.75;
}

.wcpc-file-ext{
  font-weight:700;
}

.wcpc-file-size{
  opacity:.9;
}

.wcpc-file-badges{
  margin-top:4px;
  display:flex;
  align-items:center;
  gap:4px;
  flex-wrap:wrap;
  opacity:.85;
}

.wcpc-file-type-label,
.wcpc-file-size-label{
  opacity:.85;
  font-weight:600;
}

.wcpc-file-controls{
  display:flex;
  flex-direction:column;
  gap:8px;
}

/* حقل الوصف: عرض ثابت + موحد */
.wcpc-file-label{
  width:420px;
  max-width:100%;
  border-radius:12px;
  border:1px solid #ddd;
  padding:10px 12px;
}

/* إن كان الملف invalid */
.wcpc-selected-file.is-invalid .wcpc-file-label{
  border-color:#ef4444;
  background:#fff;
  opacity:.9;
}

.wcpc-file-reason{
  font-size:13px;
  color:#b91c1c;
  line-height:1.35;
}
.wcpc-file-reason{
  margin-top:6px;
  font-size:12px;
  opacity:.9;
  color:#b91c1c;
}

/* زر الإزالة X */
.wcpc-file-remove{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  width:30px;
  height:30px;
  border:none !important;
  background:transparent !important;
  box-shadow:none !important;
  padding:0 !important;
  line-height:1 !important;
  font-size:18px;
  cursor:pointer;
  color:#111;
  opacity:.85;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
}

.wcpc-file-remove:hover{
  color:#111;
  opacity:.85;
  background:transparent;
}

/* إذا الملف غير مدعوم: نخلي زر الحذف أوضح */
.wcpc-selected-file.is-invalid .wcpc-file-remove{
  color:#b91c1c;
  opacity:1;
}

/* Mobile tweaks */
@media (max-width: 680px) {
  .wcpc-selected-file{
    padding-right:42px;
  }
  .wcpc-file-label{
    width:100%;
  }
}


/* اجعل منطقة عنوان الملف لا تؤثر على عرض حقل الوصف */
.wcpc-file-titlewrap,
.wcpc-file-name{
  min-width:0;
}

.wcpc-file-controls{
  width:100%;
}

/* حقل الوصف ثابت */
.wcpc-file-label{
  width: 90% !important;
  max-width: 520px !important;
  min-width: 320px;
  display:block;
}

/* موبايل */
@media (max-width: 680px){
  .wcpc-file-label{
    width:100% !important;
    min-width:0;
  }
}

/* strong invalid highlight */
.wcpc-wrap #wcpc-file-labels .wcpc-selected-file.is-invalid{
  border: 1px solid #ef4444 !important;
  background:#fff7f7 !important;
}
.wcpc-wrap #wcpc-file-labels .wcpc-selected-file.is-invalid .wcpc-file-remove{
  color:#b91c1c !important;
}
.wcpc-wrap #wcpc-file-labels .wcpc-selected-file.is-invalid .wcpc-file-label{
  border-color:#ef4444 !important;
}


/* Fix: long lock/alert message breaks mobile layout */
.wcpc-alert,
.wcpc-toast-item,
.wcpc-files-lock-alert{
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}



.wcpc-toasts{
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.wcpc-toast-item{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid transparent;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  opacity:0;
  transform: translateY(10px);
  transition: .2s ease;
  font-size: 14px;
  cursor: pointer;
}

.wcpc-toast-text{
  flex:1;
  min-width:0;
}

.wcpc-toast-close{
  flex:0 0 auto;
  border:0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color:inherit;
  padding:0;
  width:auto;
  height:auto;
  border-radius:0 !important;
  font-size:18px;
  font-weight:800;
  line-height:1;
  opacity:.85;
  cursor:pointer;
}

.wcpc-toast-close:hover{
  opacity:1;
  background: transparent;
}

/* Sent attachment icon */
.wcpc-file-ico{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  border-radius:999px;
  margin-inline-end:6px;
  background: #f1f5f9;
  border:1px solid #e2e8f0;
  font-size:14px;
}

/* Selected attachments layout (before sending) */
.wcpc-wrap #wcpc-file-labels .wcpc-file-info small{
  opacity:.8;
}

/* WooCommerce billing address: prevent overflow on mobile (minimal, safe) */
@media (max-width: 480px){
  .woocommerce-MyAccount-content .woocommerce-customer-details,
  .woocommerce-MyAccount-content .woocommerce-customer-details *{
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .woocommerce-MyAccount-content .woocommerce-customer-details address{
    padding: 10px 12px;
  }
}

.wcpc-toast-item.is-show{
  opacity:1;
  transform: translateY(0);
}

/* Nicer, softer, but clear colors */
.wcpc-toast-item.is-error{
  background:#fff1f2;
  color:#9f1239;
  border-color:#fecdd3;
  border-left:6px solid #fb7185;
}

.wcpc-toast-item.is-warn{
  background:#fffbeb;
  color:#92400e;
  border-color:#fde68a;
  border-left:6px solid #f59e0b;
}

.wcpc-toast-item.is-ok{
  background:#ecfdf5;
  color:#065f46;
  border-color:#a7f3d0;
  border-left:6px solid #10b981;
}

/* Force file meta labels visible (avoid theme conflicts) */
.wcpc-file-type-label,
.wcpc-file-size-label,
.wcpc-file-size{
  display:inline !important;
}

/* WooCommerce mobile width hardening (fix rare order details overflow) */
.woocommerce-view-order .woocommerce-table--order-details,
.woocommerce-view-order .woocommerce-order-details,
.woocommerce-view-order .woocommerce-customer-details,
.woocommerce-view-order .woocommerce-customer-details address{
  max-width: 100%;
}
.woocommerce-view-order .woocommerce-table--order-details td,
.woocommerce-view-order .woocommerce-table--order-details th,
.woocommerce-view-order .woocommerce-order-details *{
  overflow-wrap: anywhere;
  word-break: break-word;
}
.woocommerce-view-order .woocommerce-table--order-details{
  width: 100%;
  table-layout: fixed;
}
.woocommerce-view-order .woocommerce-table--order-details td,
.woocommerce-view-order .woocommerce-table--order-details th{
  min-width: 0;
}


/* Scrollable thread + numbering */
.wcpc-thread{
  max-height: 70vh;
  overflow: auto;
}
.wcpc-meta .wcpc-no{
  font-weight: 700;
  margin-right: 8px;
  opacity: .65;
}





/* Highlight newly loaded/unread messages (customer) */
.wcpc-msg.wcpc-new{
  position:relative;
  animation: wcpc-border-flash 1.2s ease-in-out 3;
}

@keyframes wcpc-border-flash{
  0%{box-shadow:0 0 0 0 rgba(34,197,94,.0);}
  20%{box-shadow:0 0 0 2px rgba(34,197,94,.35);}
  50%{box-shadow:0 0 0 0 rgba(34,197,94,.0);}
  80%{box-shadow:0 0 0 2px rgba(34,197,94,.35);}
  100%{box-shadow:0 0 0 0 rgba(34,197,94,.0);}
}

/* Admin side border color */
.wcpc-msg.is-admin.wcpc-new{
  border-color:#1d4ed8;
  box-shadow:0 0 0 1px rgba(37,99,235,.25);
}

/* Customer side border color */
.wcpc-msg.is-customer.wcpc-new{
  border-color:#16a34a;
  box-shadow:0 0 0 1px rgba(22,163,74,.25);
}

/* Icon before name (uses meta line) */
.wcpc-msg.wcpc-new .wcpc-meta{
  position:relative;
  padding-left:18px;
}

.wcpc-msg.wcpc-new .wcpc-meta::before{
  content:"";
  position:absolute;
  top:50%;
  left:0;
  width:10px;
  height:10px;
  margin-top:-5px;
  border-radius:999px;
  background:#22c55e;
  box-shadow:0 0 0 0 rgba(34,197,94,.9);
  animation:wcpc-new-pulse 1s infinite;
}

/* Pulse animation */
@keyframes wcpc-new-pulse{
  0%{transform:scale(.9);opacity:1;}
  70%{transform:scale(1.6);opacity:0;}
  100%{transform:scale(.9);opacity:0;}
}


.wcpc-selected-file.is-invalid .wcpc-file-name strong{
  color:#b91c1c;
}


/* Loading indicator on send button */
#wcpc-send.is-loading{
  position:relative;
  opacity:.85;
}
#wcpc-send.is-loading::after{
  /* Removed spinning icon per requirement */
  content:"";
  display:none;
}
@keyframes wcpc-spin{
  to{transform:rotate(360deg);}
}

.wcpc-toast-item.is-info{
  background:#eff6ff;
  border-color:#3b82f6;
  color:#1e3a8a;
}


/* Upload toast keeps its spinner */
.wcpc-toast-item.has-spinner{
  position:relative;
  padding-left:38px;
}
.wcpc-toast-item.has-spinner::before{
  content:"";
  position:absolute;
  left:14px;
  top:50%;
  width:16px;
  height:16px;
  margin-top:-8px;
  border-radius:50%;
  border:2px solid currentColor;
  border-right-color:transparent;
  animation: wcpc-spin 0.9s linear infinite;
}
#wcpc-send.wcpc-disabled{opacity:.6; cursor:not-allowed;}


.wcpc-toast-item::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:6px;
  background:rgba(0,0,0,.08);
}
.wcpc-toast-item.is-ok::before{background:rgba(16,185,129,.35);}
.wcpc-toast-item.is-warn::before{background:rgba(245,158,11,.35);}
.wcpc-toast-item.is-error::before{background:rgba(220,38,38,.35);}
.wcpc-toast-item.is-info::before{background:rgba(59,130,246,.35);}
.wcpc-toast-item.is-upload::before{background:rgba(124,58,237,.40);}



.wcpc-toast-item.is-upload{
  background:#f5f3ff;
  color:#4c1d95;
  border-color:#ddd6fe;
  border-left:6px solid #7c3aed;
}

/* (Duplicated section) ensure spinner remains enabled */
.wcpc-toast-item.has-spinner{
  position:relative;
  padding-left:38px;
}
.wcpc-toast-item.has-spinner::before{
  content:"";
  position:absolute;
  left:14px;
  top:50%;
  width:16px;
  height:16px;
  margin-top:-8px;
  border-radius:50%;
  border:2px solid currentColor;
  border-right-color:transparent;
  animation: wcpc-spin 0.9s linear infinite;
}
@keyframes wcpc-spin{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}


/* Override: keep the left stripe only for upload toast */
.wcpc-toast-item.is-ok::before,
.wcpc-toast-item.is-warn::before,
.wcpc-toast-item.is-error::before,
.wcpc-toast-item.is-info::before{
  display:none !important;
}


.wcpc-filelabel-row.is-too-large{ border:2px solid #d63031; padding:8px; border-radius:8px; }


/* WCPC onboarding (customer empty chat coach)
   Use a light fixed overlay so it always appears in a good place on desktop and mobile. */
.wcpc-onboard{display:none; position:fixed; inset:0; z-index:9999; pointer-events:none;}
.wcpc-onboard.is-active{display:flex; align-items:center; justify-content:center;}
.wcpc-onboard::before{content:""; position:absolute; inset:0; background:rgba(255,255,255,.55); backdrop-filter: blur(1px);}
.wcpc-onboard-card{pointer-events:auto; position:relative; margin:0; max-width:560px; width:calc(100% - 32px); background:#fff; border:2px solid rgba(var(--wcpc-onboard-r,185),var(--wcpc-onboard-g,159),var(--wcpc-onboard-b,128),.28); border-radius:14px; box-shadow:0 10px 24px rgba(0,0,0,.12); padding:14px 16px;}
.wcpc-onboard-head{font-weight:700; margin-bottom:6px;}
.wcpc-onboard-steps{margin:0 0 10px 18px; padding:0;}
.wcpc-onboard-steps li{margin:6px 0; line-height:1.4;}
.wcpc-onboard-nav{display:flex;gap:8px;align-items:center;justify-content:flex-start;margin-top:0;}
.wcpc-onboard-nav-btn{display:inline-flex;align-items:center;justify-content:center;width:34px;height:28px;border:1px solid rgba(0,0,0,.12) !important;background:rgba(var(--wcpc-onboard-r,185),var(--wcpc-onboard-g,159),var(--wcpc-onboard-b,128),.14) !important;color:#111 !important;border-radius:10px;font-size:14px;line-height:1;cursor:pointer;transition:transform .12s ease, background .12s ease;}
.wcpc-onboard-nav-btn:hover{background:rgba(var(--wcpc-onboard-r,185),var(--wcpc-onboard-g,159),var(--wcpc-onboard-b,128),.22) !important;transform:translateY(-1px);}
.wcpc-onboard-nav-btn:active{transform:translateY(0);}
.wcpc-onboard-steps li.is-active{font-weight:600;color:#111;background:rgba(var(--wcpc-onboard-r,185),var(--wcpc-onboard-g,159),var(--wcpc-onboard-b,128),.10);padding:6px 8px;border-radius:10px;}
.wcpc-onboard-steps li.is-active::marker{color:rgba(var(--wcpc-onboard-r,185),var(--wcpc-onboard-g,159),var(--wcpc-onboard-b,128),1);}

.wcpc-onboard-ico{display:inline-block; width:22px; text-align:center; margin-right:6px;}
.wcpc-onboard-footer{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:10px;}
.wcpc-onboard-dismiss{float:none;}
.wcpc-onboard-hint{position:fixed; z-index:10000; font-size:12px; background:rgba(30,30,30,.92); color:#fff; padding:6px 10px; border-radius:10px; white-space:nowrap; pointer-events:none;}
.wcpc-onboard-num{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;margin-right:6px;border-radius:999px;background:rgba(var(--wcpc-onboard-r,185),var(--wcpc-onboard-g,159),var(--wcpc-onboard-b,128),.95);color:#fff;font-weight:700;font-size:11px;line-height:1;}
[dir="rtl"] .wcpc-onboard-num{margin-right:0;margin-left:6px;}
[dir="rtl"] .wcpc-onboard-arrow{margin-right:0;margin-left:6px;}
[dir="rtl"] .wcpc-onboard-ico{margin-right:0;margin-left:6px;}
[dir="rtl"] .wcpc-onboard-steps{margin:0 18px 10px 0;}

.wcpc-onboard-hint.is-centered{transform:translateX(-50%);} 
.wcpc-onboard-arrow{display:inline-block; margin-right:6px; animation:wcpcBop var(--wcpc-onboard-bop,1.8s) infinite;}
@keyframes wcpcBop{0%,100%{transform:translateY(0);}50%{transform:translateY(-3px);}}
.wcpc-onboard-target{outline:3px solid rgba(var(--wcpc-onboard-r,185),var(--wcpc-onboard-g,159),var(--wcpc-onboard-b,128),.70); outline-offset:2px; border-radius:12px; box-shadow:0 0 0 8px rgba(var(--wcpc-onboard-r,185),var(--wcpc-onboard-g,159),var(--wcpc-onboard-b,128),.16); animation:wcpcPulse var(--wcpc-onboard-pulse,2.4s) ease-in-out 0s var(--wcpc-onboard-cycles,3);}
@keyframes wcpcPulse{0%{box-shadow:0 0 0 6px rgba(var(--wcpc-onboard-r,185),var(--wcpc-onboard-g,159),var(--wcpc-onboard-b,128),.10);}50%{box-shadow:0 0 0 12px rgba(var(--wcpc-onboard-r,185),var(--wcpc-onboard-g,159),var(--wcpc-onboard-b,128),.22);}100%{box-shadow:0 0 0 6px rgba(var(--wcpc-onboard-r,185),var(--wcpc-onboard-g,159),var(--wcpc-onboard-b,128),.10);}}

/* Inline onboarding mode (card is injected into the empty-state box instead of covering the composer). */
.wcpc-onboard.wcpc-onboard--inline{position:static; inset:auto; display:none; align-items:initial; justify-content:initial; pointer-events:auto;}
.wcpc-onboard.wcpc-onboard--inline::before{display:none;}
.wcpc-onboard.wcpc-onboard--inline.is-active{display:block;}
.wcpc-onboard.wcpc-onboard--inline .wcpc-onboard-card{max-width:100%; width:100%; box-shadow:none; margin-top:14px;}
@media (max-width: 640px){
  .wcpc-onboard-card{width:calc(100% - 22px);} 
  .wcpc-onboard-hint{font-size:11px;}
}

/* ------------------------------------------------------------
   Mobile swipe hint (chat-only)
------------------------------------------------------------ */
.wcpc-swipe-hint{
  position:absolute;
  top:6px;
  left:6px;
  right:6px;
  display:flex;
  align-items:center;
  justify-content:center;
  /* Less foggy: lower opacity and minimal blur */
  background:rgba(255,255,255,0.60);
  border:1px solid rgba(0,0,0,0.07);
  border-radius:inherit;
  z-index:999;
  backdrop-filter: blur(0.6px);
  pointer-events:auto;
  box-shadow: 0 14px 34px rgba(0,0,0,0.18);
}

/* Centered, message-like hint (matches chat bubble style) */
.wcpc-swipe-hint__stage{
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:18px;
  padding:18px 12px;
}

.wcpc-swipe-hint__arrow{
  width:52px;
  height:52px;
  border-radius:999px;
  background:rgba(0,0,0,0.06);
  position:relative;
}
.wcpc-swipe-hint__arrow::before{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:0;
  height:0;
  border-left:10px solid transparent;
  border-right:10px solid transparent;
  transform:translate(-50%,-50%);
}
.wcpc-swipe-hint__arrow--up::before{ border-bottom:14px solid rgba(0,0,0,0.55); margin-top:-2px; }
.wcpc-swipe-hint__arrow--down::before{ border-top:14px solid rgba(0,0,0,0.55); margin-top:2px; }

.wcpc-swipe-hint__msg{
  width:min(92%, 340px);
  border-radius:14px;
  /* Start with a calm green, then morph to WP admin blue */
  background:#f6fffa;
  border:1px solid #e9f7ef;
  border-left:4px solid #1d8f3a;
  padding:14px 16px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.14);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  color:rgba(0,0,0,0.72);
  font-weight:600;
  line-height:1;
  min-height:64px;
  user-select:none;
  /* Calmer motion + smoother color morph.
     Slightly longer color cycle so each color is visible a bit longer. */
  animation: wcpcSwipeMsg 1.6s ease-in-out infinite, wcpcSwipeColor 8s ease-in-out infinite;
}

.wcpc-swipe-hint__text{
  font-size:14px;
  line-height:1.2;
  letter-spacing:0.2px;
  text-transform:none;
  white-space:nowrap;
  opacity:0.90;
}



@keyframes wcpcSwipeMsg{
  0%{ transform: translateY(0); }
  50%{ transform: translateY(-14px); }
  100%{ transform: translateY(0); }
}

/* Alternate the bubble accent between green and WP admin blue.
   Duration is 4x the movement animation (1.6s), so the color flips calmly over multiple moves. */
@keyframes wcpcSwipeColor{
  /* Seamless loop: 0% and 100% must match to avoid a visible jump.
     Keep BLUE visible longer than GREEN.
     - Quick ease from green -> blue
     - Hold blue for most of the cycle
     - Smoothly ease back to green at the end */

  /* Green (hold a bit longer) */
  0%, 20%, 100%{
    background:#f6fffa;
    border-color:#e9f7ef;
    border-left-color:#1d8f3a;
  }

  /* Transition to blue */
  30%{
    background:#f3fbff;
    border-color:#e8f2f8;
    border-left-color:#1f7aa6;
  }

  /* Blue (long hold) */
  78%{
    background:#f3fbff;
    border-color:#e8f2f8;
    border-left-color:#1f7aa6;
  }

  /* Transition back to green */
  90%{
    background:#f6fffa;
    border-color:#e9f7ef;
    border-left-color:#1d8f3a;
  }
}


/* Revision/Update badge (customer) */
.wcpc-rev-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  line-height:1;
  margin-left:4px;
}
/* Frame styles are controlled by a class (customer settings) */
.wcpc-rev-badge.wcpc-rev-framed{
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,0.12);
  background:rgba(0,0,0,0.04);
}
.wcpc-rev-badge.wcpc-rev-unframed{
  padding:0;
  border:0;
  background:transparent;
  border-radius:0;
}
/* Tag colors */
.wcpc-rev-badge.wcpc-rev-framed[data-tag="revision"]{ border-color:rgba(5,150,105,0.35); background:rgba(5,150,105,0.08); }
.wcpc-rev-badge.wcpc-rev-framed[data-tag="update"]{ border-color:rgba(37,99,235,0.35); background:rgba(37,99,235,0.08); }
.wcpc-rev-badge .wcpc-rev-txt{ font-weight:600; }

/* Icon + text mode (customer setting) */
.wcpc-rev-badge-text .wcpc-rev-txt{ display:inline; }


/* Icon-only badges (show text on hover/click via tooltip/popover) */
.wcpc-rev-badge-icon .wcpc-rev-txt{ display:none; }
.wcpc-rev-badge-icon{ cursor:pointer; user-select:none; }

.wcpc-badge-popover{
	position:absolute;
	z-index:999999;
	max-width:260px;
	background:#fff;
	border:1px solid rgba(0,0,0,0.12);
	border-radius:10px;
	box-shadow:0 8px 26px rgba(0,0,0,0.12);
	padding:10px 12px;
	font-size:12px;
	line-height:1.35;
}
.wcpc-badge-popover .wcpc-badge-popover-title{ font-weight:700; margin:0 0 6px 0; }
.wcpc-badge-popover .wcpc-badge-popover-desc{ margin:0; color:#374151; }

/* Make author names stand out (especially in loaded older messages) */
.wcpc-author-name{ font-weight: 700 !important; color: #111827 !important; }


/* Customer: icon-only badge without frame + closer to message number */
.wcpc-rev-badge.wcpc-rev-badge-icon{
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  border-radius:0 !important;
  gap:0 !important;
  margin-left:2px !important;
}
.wcpc-rev-badge.wcpc-rev-badge-icon .wcpc-rev-ico{ margin:0 !important; }

/* Auto-direction for message bodies (detected per-message by content) */
.wcpc-body.wcpc-msg-rtl{direction:rtl;text-align:right;unicode-bidi:plaintext;}
.wcpc-body.wcpc-msg-ltr{direction:ltr;text-align:left;unicode-bidi:plaintext;}

/* Attachment validation */
.wcpc-file-item.is-invalid{
  border:1px solid #d63638;
  background:#fff5f5;
}
.wcpc-file-item.is-invalid .wcpc-file-reason{
  display:block;
  margin-top:4px;
  font-size:12px;
  color:#d63638;
}

/* === Product Fulfillment (shipping status) === */
.wcpc-fulfillment-front{
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  padding:10px 12px;
  margin:10px 0;
  background:#fff;
}
.wcpc-fulfillment-title{
  font-size:13px;
  font-weight:700;
  margin:0 0 6px;
}
.wcpc-fulfillment-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.wcpc-fulfillment-current{
  font-size:13px;
  opacity:.8;
}
.wcpc-fulfillment-list{
  margin:0;
  padding-inline-start:16px;
}
.wcpc-fulfillment-item{
  margin:6px 0;
  font-size:13px;
}
.wcpc-fulfillment-badge{
  display:inline-flex;
  align-items:center;
  border:1px solid rgba(0,0,0,.14);
  border-radius:999px;
  padding:4px 10px;
  font-size:12px;
  font-weight:700;
  line-height:1.3;
  background:rgba(0,0,0,.02);
}
.wcpc-fulfillment-at{
  font-size:12px;
  opacity:.75;
  margin-inline-start:4px;
  white-space:nowrap;
}

/* Add-ons (top-up orders) */
.wcpc-addons{
  margin-top:14px;
  padding:14px;
  border:1px solid #eee;
  border-radius:14px;
  background:#fff;
}
.wcpc-addons-head{margin-bottom:10px;}
.wcpc-addons-title{font-size:16px;font-weight:800;margin:0 0 4px;}
.wcpc-addons-sub{opacity:.75;font-size:13px;}
.wcpc-addons-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.wcpc-addons-grid.is-carousel{
  display:flex;
  overflow-x:auto;
  overflow-y:hidden;
  gap:10px;
  padding-bottom:6px;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
}
.wcpc-addons-grid.is-carousel .wcpc-addon{
  min-width: 260px;
  flex: 0 0 auto;
  scroll-snap-align:start;
}
.wcpc-addon{border:1px solid #eee;border-radius:12px;padding:12px;background:#fff;}
.wcpc-addon-row{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;}
.wcpc-addon-name{font-weight:800;}
.wcpc-addon-price{white-space:nowrap;opacity:.9;}
.wcpc-addon-desc{margin-top:6px;opacity:.75;font-size:13px;}
.wcpc-addon-actions{margin-top:10px;display:flex;flex-direction:column;gap:10px;}
.wcpc-addon-actions select{width:100%;max-width:100%;}

/* Compact "Buy" button for add-ons (avoid inheriting theme button styles) */
.wcpc-addon-buy{
  appearance:none !important;
  border:0 !important;
  background: #b8a89a !important;
  color:#ffffff !important;
  padding:8px 10px !important;
  border-radius:10px !important;
  font-weight:800 !important;
  font-size:13px !important;
  cursor:pointer !important;
  width:fit-content;
}
.wcpc-addon-buy:hover{
  background:#a99686 !important;
}
.wcpc-addon-buy:disabled{
  opacity:.55 !important;
  cursor:not-allowed !important;
}
.wcpc-addon-actions{margin-top:10px;display:flex;justify-content:flex-end;align-items:center;gap:8px;}

/* Add-ons quantity row (extra revisions) */
.wcpc-addon-qtyrow{display:flex;align-items:center;gap:8px;margin-right:auto;}
.wcpc-addon-qtyrow label{font-size:12px;opacity:.75;white-space:nowrap;}
.wcpc-addon-qty{width:92px;max-width:100%;padding:6px 8px;border-radius:10px;border:1px solid rgba(0,0,0,.12);}
.wcpc-addon-badge{display:inline-block;padding:6px 10px;border-radius:999px;background:#f1f5f9;font-size:12px;font-weight:700;}
@media (max-width: 680px){
  .wcpc-addons-grid{grid-template-columns:1fr;}
  .wcpc-addons-grid.is-carousel{padding-bottom:8px;}
}


/* Add-ons target selector */
.wcpc-addon-target-wrap{margin:10px 0 8px;display:flex;flex-direction:column;gap:6px;}
.wcpc-addon-target-label{font-size:12px;opacity:.8;}
.wcpc-addon-target{width:100%;max-width:100%;padding:8px 10px;border:1px solid rgba(0,0,0,.15);border-radius:10px;background:#fff;}


/* WCPC Add-ons modal */
.wcpc-addons-modal{
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0,0,0,.45);
  padding: 16px;
  overflow: auto;
}
.wcpc-addons-modal[aria-hidden="true"]{display:none !important;}
.wcpc-addons-btn{
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  font: inherit !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.wcpc-addons-btn-ico{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  flex:0 0 18px;
}
.wcpc-addons-btn-ico svg{display:block;}
.wcpc-addons-btn:hover{
  text-decoration: none !important;
}
.wcpc-addons-btn:focus{
  outline: 2px solid rgba(30, 88, 190, .35) !important;
  outline-offset: 2px;
}

.wcpc-addons-btn,
button.wcpc-addons-btn,
a.wcpc-addons-btn{
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  max-width: 100%;
  white-space: normal;
}
[dir="rtl"] .wcpc-addons-btn,
.rtl .wcpc-addons-btn,
body.rtl .wcpc-addons-btn{
  flex-direction: row;
}
.wcpc-addons .wcpc-addon-target,
.wcpc-addons .wcpc-addon-package{
  display: block;
  width: 100%;
  max-width: 100%;
}
.wcpc-addons-modal-inner{background:#fff;max-width:720px;margin:8vh auto;max-height:84vh;overflow:auto;border-radius:14px;padding:16px;position:relative;box-shadow:0 10px 40px rgba(0,0,0,.25);}
.wcpc-addons-close{position:absolute;top:10px;right:10px;border:0;background:transparent;font-size:22px;line-height:1;cursor:pointer;}

/* Links modal (overlay) */
.wcpc-modal{position:fixed;inset:0;z-index:1000000;display:flex;align-items:center;justify-content:center;}
.wcpc-modal[aria-hidden="true"]{display:none;}
.wcpc-modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.55);}
.wcpc-modal-dialog{position:relative;background:#fff;border-radius:14px;box-shadow:0 10px 40px rgba(0,0,0,.25);width:min(560px,calc(100vw - 24px));max-height:calc(100vh - 48px);overflow:auto;padding:16px;z-index:1;}
.wcpc-modal-title{margin:0 0 10px;font-size:18px;}
.wcpc-modal-close{position:absolute;top:10px;right:10px;border:0;background:transparent;padding:6px 8px;cursor:pointer;font-size:16px;line-height:1;}
/* ------------------------------
 * Links modal
 * Keep styling independent from theme (colors/fonts/buttons)
 * ------------------------------ */
#wcpcLinksModal .wcpc-modal-dialog {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#wcpcLinksModal .wcpc-modal-close {
  background: transparent !important;
  border: 0 !important;
  padding: 6px 8px !important;
  line-height: 1 !important;
  font-size: 18px !important;
  cursor: pointer;
}

#wcpcLinksModal .wcpc-links-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff !important;
  border-radius: 12px !important;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

#wcpcLinksModal .wcpc-links-item:hover {
  background: rgba(209, 191, 163, 0.18) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.12) !important;
}

#wcpcLinksModal .wcpc-links-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.04);
  color: #111827 !important;
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}

#wcpcLinksModal .wcpc-links-main {
  flex: 1;
  color: #b08d57 !important;
  text-decoration: none !important;
  word-break: break-word;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#wcpcLinksModal .wcpc-links-title{
  font-weight: 900;
  font-size: 13px;
  line-height: 1.2;
}

#wcpcLinksModal .wcpc-links-url{
  font-size: 12px;
  opacity: .75;
  word-break: break-all;
  color: #111 !important;
}

#wcpcLinksModal .wcpc-links-main:hover {
  color: #9a7a48 !important;
  text-decoration: underline !important;
}

#wcpcLinksModal .wcpc-links-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(209, 191, 163, 0.22);
  color: #6b4f2a !important;
  text-decoration: none !important;
  transition: transform .12s ease, background .12s ease;
}

#wcpcLinksModal .wcpc-links-go:hover {
  background: rgba(209, 191, 163, 0.35);
  transform: translateY(-1px);
}

/* WCPC: system messages neutral style override */
/* Service badge (system messages) */
.wcpc-badge-service{display:inline-block;margin-inline-start:6px;padding:2px 6px;border-radius:999px;font-size:12px;line-height:1;background:#e5e7eb;color:#374151;}

/* Add-on base order link (customer) */
.wcpc-addon-base-wrap{display:inline-flex;gap:6px;align-items:baseline;flex-wrap:wrap;}
.wcpc-addon-base-label{font-size:12px;font-weight:500;opacity:.85;}
.wcpc-addon-base-link{padding:0!important;margin:0!important;border:0!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;display:inline!important;line-height:inherit!important;color:#b8a89a!important;text-decoration:underline;}


/* Customer UI cleanup: never show system seen icon in customer view */
.wcpc-thread[data-viewer="customer"] .wcpc-system-seen-btn{
  display:none !important;
}

/* Customer message meta: keep reply number and date equal + slightly smaller */
.wcpc-thread[data-viewer="customer"] .wcpc-meta .wcpc-no,
.wcpc-thread[data-viewer="customer"] .wcpc-meta .wcpc-time,
.wcpc-thread[data-viewer="customer"] .wcpc-meta small{
  font-size: 12px !important;
  line-height: 1.2 !important;
}

.wcpc-thread[data-viewer="customer"] .wcpc-meta .wcpc-no{
  font-size: 13px !important;
  font-weight: 600;
  opacity: .72;
  margin-right: 6px;
}


.wcpc-estimate{display:block;width:100%;}
[dir="rtl"] .wcpc-estimate,
.rtl .wcpc-estimate,
body.rtl .wcpc-estimate{direction:rtl;text-align:right;}


/* WCPC 2.18.4: notification preferences shortcode/account page RTL alignment */
html[dir="rtl"] .wcpc-account-notify,
body.rtl .wcpc-account-notify{direction:rtl;text-align:right;}
html[dir="rtl"] .wcpc-account-notify form,
body.rtl .wcpc-account-notify form,
html[dir="rtl"] .wcpc-account-notify .wcpc-notify-current,
body.rtl .wcpc-account-notify .wcpc-notify-current{direction:rtl;text-align:right;}
html[dir="rtl"] .wcpc-account-notify input[type="radio"],
body.rtl .wcpc-account-notify input[type="radio"]{margin-right:0;margin-left:6px;}
html[dir="rtl"] #wcpc-instant-freq-wrap,
body.rtl #wcpc-instant-freq-wrap{margin-right:0 !important;margin-left:0 !important;}
html[dir="rtl"] .wcpc-account-notify p > span[style*="display:block"],
body.rtl .wcpc-account-notify p > span[style*="display:block"]{margin-bottom:8px;}
html[dir="rtl"] .wcpc-account-notify p,
body.rtl .wcpc-account-notify p{margin-bottom:12px !important;}

