/* Portal overrides - keep LokalWP look, prevent overflow */

/* ---- Typography: reduce oversized headings & base font (member portal) ----
   WoDash theme defines very large heading sizes via CSS variables.
   Override them on portal pages so titles don't look "besar sekali". */
body.mawdmp-portal{
  font-size: 14px;
  line-height: 1.6;
  --h1: clamp(1.5rem, 1.15rem + 1.4vw, 2.1rem);
  --h2: clamp(1.35rem, 1.05rem + 1.1vw, 1.8rem);
  --h3: clamp(1.2rem, 0.98rem + 0.8vw, 1.55rem);
  --h4: clamp(1.08rem, 0.95rem + 0.5vw, 1.28rem);
  --h5: clamp(1.0rem, 0.94rem + 0.35vw, 1.12rem);
  --h6: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
}

/* Keep small helper texts readable after base font change */
body.mawdmp-portal .small,
body.mawdmp-portal small{font-size: 12.5px;}

.mawdmp-changelog{
  display:grid;
  gap:18px;
}

.mawdmp-changelog-headline{
  font-weight:800;
  font-size:18px;
  margin:0 0 8px;
  display:flex;
  gap:10px;
  align-items:baseline;
}

.mawdmp-changelog-date{
  font-weight:600;
  color:#64748b;
  font-size:14px;
}

.mawdmp-changelog-list{
  background:#f3f4f6;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:12px 14px 12px 34px;
  margin:0;
  list-style:decimal !important;
}

.mawdmp-changelog-list li{
  margin:0;
  padding:6px 0;
  list-style:decimal !important;
}

.mawdmp-changelog-list li + li{
  border-top:1px solid #e5e7eb;
}

.mawdmp-changelog-item{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:13px;
  line-height:1.35;
}

/* Back button icon align */
a.btn.d-inline-flex iconify-icon{
  display:inline-flex;
  vertical-align:middle;
}


/* Action buttons: keep icon + text inline like LokalWP demo */
.mawdmp-portal a.btn.d-inline-flex,
.mawdmp-portal button.btn.d-inline-flex{
  display:inline-flex !important;
  align-items:center !important;
}
.mawdmp-portal .mawdmp-i{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  line-height:1 !important;
  font-size:18px;
}
.mawdmp-portal a.btn .mawdmp-i{ margin:0 !important; }

/* Single Product Tabs - LokalWP-like boxed tabs */
.mawdmp-tabbar .nav-tabs{
  border-bottom: 1px solid #e5e7eb;
  gap: 8px;
  padding-left: 0;
  margin-bottom: 0;
  flex-wrap: wrap;
}
.mawdmp-tabbar .nav-tabs .nav-link{
  border: 1px solid #e5e7eb;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  padding: 10px 16px;
  background: #ffffff;
  color: #667085;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}
.mawdmp-tabbar .nav-tabs .nav-link:hover{
  background: #f8fafc;
  color: #475467;
}
.mawdmp-tabbar .nav-tabs .nav-link.active{
  background: #ffffff;
  color: #101828;
  border-color: #e5e7eb;
}

/* Make the active tab visually connect to the panel body */
.mawdmp-tabbar .nav-tabs .nav-link.active{
  position: relative;
  z-index: 2;
}

/* Mobile single product header + tabs like LokalWP */
.mawdmp-tabs-mobile{display:none;}

@media (max-width: 768px){
  /* Header badges go under title (LokalWP mobile) */
  .mawdmp-head{flex-direction:column; align-items:flex-start !important;}
  .mawdmp-badges{margin-top:10px !important; display:flex; flex-wrap:wrap; gap:10px;}

  /* Tabs become a dropdown + action circles */
  .mawdmp-tabbar .nav-tabs{display:none;}
  .mawdmp-tabs-mobile{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:8px; width:100%;}
  .mawdmp-tabs-mobile-left{flex:1; min-width:0;}
  .mawdmp-tabselect{
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    font-weight: 700;
    color: #111827;
  }
  .mawdmp-tabs-mobile-icons{display:flex; gap:12px; align-items:center;}
  .mawdmp-circle{
    width: 44px; height: 44px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    display:inline-flex; align-items:center; justify-content:center;
    color:#6b7280;
  }
  .mawdmp-circle:active{transform: scale(0.98);}

  /* Actions buttons on mobile: 2 columns like LokalWP */
  .mawdmp-actions{margin-top: 14px;}
  .mawdmp-actions-left{display:grid; grid-template-columns: 1fr 1fr; gap:12px; width:100%;}
  .mawdmp-actions-left .btn{width:100%; justify-content:center; padding-top: 14px; padding-bottom: 14px; font-weight: 700;}
}


/* FIX: FAQ mobile icon alignment (LokalWP-like) */
.mawdmp-faq, .mawdmp-faq *{box-sizing:border-box;}
.mawdmp-faq .accordion-button{
  display:flex !important;
  align-items:center !important;
  gap:12px;
  min-width:0;
  white-space:normal !important;
  word-break:break-word;
}
.mawdmp-faq .accordion .accordion-button::after{
  background-image:none !important;
  position:static !important;
  transform:none !important;
  margin:0 0 0 auto !important;
  content:"+";
  width:32px;
  height:32px;
  border-radius:999px;
  border:2px solid #3b82f6;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  font-weight:900;
  line-height:1;
  color:#3b82f6;
  flex:0 0 auto;
}
.mawdmp-faq .accordion .accordion-button[aria-expanded=true]::after{content:"–";}



/* FIX: Wowdash bordered-table should not force horizontal scroll */
.mawdmp-wd-table-wrap .bordered-table{min-width:0 !important; width:100% !important; table-layout:fixed !important;}
.mawdmp-wd-table-wrap .bordered-table td{overflow-wrap:anywhere;}


/* WP Media Modal typography fix (portal)
   Keep WP media modal headings reasonable if opened from portal pages. */
body.mawdmp-portal .media-frame-title h1{
  font-size:22px !important;
  line-height:1.2 !important;
  margin:0 !important;
}
body.mawdmp-portal .media-modal .upload-ui .upload-instructions,
body.mawdmp-portal .media-modal .upload-ui .drop-instructions{
  font-size:20px !important;
  line-height:1.3 !important;
}
body.mawdmp-portal .media-modal .upload-ui .max-upload-size{
  font-size:13px !important;
}

/* ===== Topbar user dropdown (LokalWP-like) ===== */
.mawdmp-user-dropdown{position:relative;}
.mawdmp-user-btn{
  width:40px !important;
  height:40px !important;
  flex:0 0 auto;
  line-height:0;
  border-radius:999px;
  border:0;
  padding:0;
  background:#e5e7eb;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.mawdmp-user-btn:focus{outline:0 !important; box-shadow:none !important;}
.mawdmp-user-avatar{width:40px !important;height:40px !important;object-fit:cover;border-radius:999px;display:block;}
.mawdmp-user-avatar-sm{width:44px !important;height:44px !important;aspect-ratio:1/1;object-fit:cover;border-radius:999px;display:block;}

/* Prevent avatar from looking squashed in the dropdown header */
.mawdmp-avatar-trigger{
  position:relative;
  border:0;
  background:transparent;
  padding:0;
  border-radius:999px;
  line-height:0;
  cursor:pointer;
  width:44px;
  height:44px;
  flex:0 0 44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.mawdmp-avatar-trigger img{
  width:44px !important;
  height:44px !important;
  aspect-ratio:1/1;
  object-fit:cover;
  border-radius:999px;
  display:block;
}
.mawdmp-user-menu-head .d-flex{flex-wrap:nowrap;}
.mawdmp-avatar-trigger:focus{outline:0;box-shadow:0 0 0 3px rgba(59,130,246,.18);} 
.mawdmp-avatar-badge{position:absolute;right:-2px;bottom:-2px;width:18px;height:18px;border-radius:999px;background:#fff;border:1px solid rgba(0,0,0,.08);box-shadow:0 8px 20px rgba(0,0,0,.12);display:flex;align-items:center;justify-content:center;font-size:12px;color:#0f172a;}
.mawdmp-avatar-trigger.is-uploading{opacity:.65;pointer-events:none;}
.mawdmp-user-menu{
  min-width:340px;
  padding:0;
  border-radius:16px;
  border:1px solid rgba(0,0,0,.08);
  box-shadow:0 24px 60px rgba(0,0,0,.14);
  overflow:hidden;
}
.mawdmp-user-menu-head{
  background:#eaf3ff;
  padding:16px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.mawdmp-user-name{font-weight:800;font-size:16px;line-height:1.2;color:#0f172a;}
.mawdmp-user-role{font-weight:600;font-size:12px;color:#64748b;margin-top:2px;}
.mawdmp-user-close{
  border:0;
  background:transparent;
  width:36px;
  height:36px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#334155;
}
.mawdmp-user-close:hover{background:rgba(15,23,42,.06);}

.mawdmp-user-menu-body{padding:10px;}
.mawdmp-user-item{
  display:flex;
  font-size:14px;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  color:#0f172a;
  text-decoration:none;
  font-weight:600;
}
.mawdmp-user-item .icon{font-size:20px;color:#475569;}
.mawdmp-user-item:hover{background:rgba(15,23,42,.05);}
.mawdmp-user-divider{height:1px;background:rgba(15,23,42,.08);margin:8px 0;}
.mawdmp-user-item-logout{color:#b91c1c;}
.mawdmp-user-item-logout .icon{color:#b91c1c;}

/* ===== Profile page (View Profile) ===== */
.mawdmp-profile-cover{
  height:140px;
  border-top-left-radius:16px;
  border-top-right-radius:16px;
  background:linear-gradient(90deg, rgba(59,130,246,.15), rgba(168,85,247,.18));
}
.mawdmp-profile-avatar-wrap{
  margin-top:-70px;
  display:flex;
  justify-content:center;
}
.mawdmp-profile-avatar-wrap img{
  width:140px;
  height:140px;
  border-radius:999px;
  object-fit:cover;
  border:6px solid #fff;
  box-shadow:0 18px 40px rgba(0,0,0,.12);
}
.mawdmp-kv{display:flex;gap:10px;font-size:14px;}
.mawdmp-kv .k{min-width:110px;color:#475569;font-weight:700;}
.mawdmp-kv .v{color:#0f172a;font-weight:700;}
.mawdmp-kv .sep{color:#94a3b8;}



/* Tab badge (count) */
.mawdmp-tab-badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#e5f0ff;color:#2563eb;font-weight:800;font-size:12px;line-height:20px;margin-left:6px;}

/* ===== Support Tickets (chat-like thread) ===== */
.mawdmp-ticket-thread{
  background:#f8fafc;
  border:1px solid rgba(15,23,42,.08);
  border-radius:16px;
  padding:14px;
  max-height:520px;
  overflow:auto;
}
.mawdmp-chat-avatar{
  width:34px;
  height:34px;
  border-radius:999px;
  object-fit:cover;
  border:2px solid #fff;
  box-shadow:0 6px 18px rgba(0,0,0,.08);
  margin-top:18px;
}
.mawdmp-bubble{
  max-width:72%;
  background:#fff;
  border:1px solid rgba(15,23,42,.10);
  border-radius:16px;
  padding:10px 12px;
  margin:0 10px;
  box-shadow:0 10px 22px rgba(0,0,0,.06);
}
.mawdmp-bubble.me{
  background:#2563eb;
  border-color:#2563eb;
  color:#fff;
}
.mawdmp-bubble.me .mawdmp-bubble-meta{color:rgba(255,255,255,.85);}
.mawdmp-bubble-meta{
  font-size:12px;
  font-weight:700;
  color:#64748b;
  margin-bottom:6px;
}
.mawdmp-bubble-text{
  font-size:14px;
  line-height:1.55;
}
.mawdmp-bubble-text p{margin:0 0 8px;}
.mawdmp-bubble-text p:last-child{margin:0;}

@media (max-width: 575.98px){
  .mawdmp-ticket-thread{max-height:60vh;}
  .mawdmp-bubble{max-width:86%;}
}

/* --- Ticket composer (Member) --- */
#mawdmp-ticket-composer .mawdmp-composer-footer{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
  margin-top:10px;
}
#mawdmp-ticket-composer .mawdmp-icon-btn{
  border:1px solid rgba(79,70,229,0.35);
  background:#fff;
  border-radius:12px;
  padding:10px 14px;
  line-height:1;
  cursor:pointer;
  touch-action:manipulation;
  user-select:none;
}
#mawdmp-ticket-composer .mawdmp-icon-btn:active{ transform:scale(0.98); }
#mawdmp-ticket-composer .mawdmp-send-btn{
  border-radius:12px;
  padding:10px 18px;
}
#mawdmp-ticket-composer .mawdmp-file-input{
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
  opacity:0;
}
#mawdmp-ticket-composer .mawdmp-file-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
#mawdmp-ticket-composer .mawdmp-file-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border:1px solid rgba(0,0,0,0.08);
  border-radius:999px;
  background:#f8fafc;
  font-size:13px;
}
#mawdmp-ticket-composer .mawdmp-emoji-item{
  border:0;
  background:#f1f5f9;
  border-radius:10px;
  padding:8px 10px;
  cursor:pointer;
}

@media (max-width: 576px){
  #mawdmp-ticket-composer .mawdmp-composer-footer{ gap:12px; }
  #mawdmp-ticket-composer .mawdmp-icon-btn{ padding:10px 12px; }
}


/* --- Ticket composer (Member) --- */
#mawdmp-ticket-composer .mawdmp-composer-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:10px;
}
#mawdmp-ticket-composer .mawdmp-icon-btn{
  border:1px solid rgba(79,70,229,0.35);
  background:#fff;
  border-radius:12px;
  padding:10px 14px;
  line-height:1;
  cursor:pointer;
  touch-action:manipulation;
}
#mawdmp-ticket-composer .mawdmp-file-input{
  /* keep in DOM for iOS click reliability, but visually hidden */
  position:absolute !important;
  left:-9999px !important;
  width:1px !important;
  height:1px !important;
  opacity:0 !important;
}
#mawdmp-ticket-composer .mawdmp-send-btn{
  border-radius:14px;
  padding:10px 18px;
}
#mawdmp-ticket-composer .mawdmp-file-list{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
#mawdmp-ticket-composer .mawdmp-file-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(79,70,229,0.08);
  font-size:13px;
}
#mawdmp-ticket-composer .mawdmp-emoji-item{
  border:0;
  background:transparent;
  font-size:20px;
  padding:6px;
  cursor:pointer;
}


#mawdmp-ticket-composer .mawdmp-center-tools{
  display:flex;
  align-items:center;
  gap:12px;
}
#mawdmp-ticket-composer .mawdmp-send-btn{
  margin-left:auto;
}
#mawdmp-ticket-composer input#mawdmp_reply_files{
  position:absolute !important;
  left:-9999px !important;
  width:1px !important;
  height:1px !important;
  opacity:0 !important;
  pointer-events:none !important;
}
#mawdmp-ticket-composer .mawdmp-icon-btn{
  position:relative;
  z-index:5;
  pointer-events:auto;
}
#mawdmp-ticket-composer .mawdmp-emoji-popover{
  position:absolute;
  bottom:56px;
  left:0;
  width:auto;
  max-width:260px;
  background:#fff;
  border:1px solid rgba(0,0,0,0.08);
  border-radius:14px;
  padding:10px;
  box-shadow:0 10px 30px rgba(0,0,0,0.10);
  z-index:9999;
}
#mawdmp-ticket-composer .mawdmp-emoji-popover .mawdmp-emoji-item{
  border:0;
  background:transparent;
  font-size:20px;
  padding:6px;
  cursor:pointer;
}
#mawdmp-ticket-composer .mawdmp-file-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(79,70,229,0.08);
  margin:6px 6px 0 0;
  font-size:13px;
}


/* Member ticket composer: hide native file input but keep it clickable via label */
#mawdmp-ticket-composer .mawdmp-file-input-visually-hidden{
  position:absolute !important;
  left:-9999px !important;
  width:1px !important;
  height:1px !important;
  opacity:0 !important;
}

#mawdmp-ticket-composer .mawdmp-file-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:1px solid rgba(79,70,229,0.18);
  border-radius:999px;
  background:#f8fafc;
  font-size:13px;
}

#mawdmp-ticket-composer .mawdmp-file-icon{opacity:0.8;}


/* Ticket composer (member) */
#mawdmp-ticket-composer .mawdmp-left-tools{display:flex; align-items:center; gap:12px;}
#mawdmp-ticket-composer .mawdmp-send-btn{margin-left:auto;}
