/* PEMPEK GALAXY V2 CHAT — CUSTOMER MOCKUP 1:1 VISUAL */
.pg-chat-entry{position:relative;width:44px;height:44px;flex:0 0 44px;border:0;border-radius:14px;background:#fff3e8;color:#ff850d;display:grid;place-items:center;box-shadow:0 2px 8px rgba(255,133,13,.12)}
.pg-chat-entry[hidden]{display:none!important}
.pg-chat-entry svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pg-chat-entry-badge{position:absolute;right:-5px;top:-5px;min-width:19px;height:19px;padding:0 5px;border:2px solid #fff;border-radius:999px;background:#ff850d;color:#fff;font:700 10px/15px Poppins,system-ui;display:none;place-items:center}
.pg-chat-entry.has-unread .pg-chat-entry-badge{display:grid}
.pg-track-order-detail-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important}

.pg-customer-chat{
  position:fixed;left:0;right:0;top:0;bottom:auto;height:100dvh;max-height:100dvh;z-index:2147483000;
  display:none;flex-direction:column;overflow:hidden;
  background:#fcf8ef;
  color:#102d50;
  font-family:Poppins,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.pg-customer-chat.open{display:flex}

.pg-customer-chat-head{
  min-height:92px;
  padding:max(18px,env(safe-area-inset-top,0px)) 18px 10px;
  background:transparent;
  border-bottom:0;
  display:grid;
  grid-template-columns:50px minmax(0,1fr) 50px;
  align-items:center;
  gap:10px;
}
.pg-customer-chat-back,.pg-customer-chat-menu{
  width:52px;height:52px;border:1px solid #ece8e1;border-radius:50%;
  background:#fff;color:#102d50;
  display:grid;place-items:center;
  box-shadow:0 5px 14px rgba(16,45,80,.07);
}
.pg-customer-chat-back svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:2.45;stroke-linecap:round;stroke-linejoin:round}
.pg-customer-chat-menu svg{width:24px;height:24px;fill:currentColor;stroke:none}
.pg-customer-chat-title{min-width:0;text-align:center}
.pg-customer-chat-title strong{
  display:block;color:#102d50;font-size:20px;line-height:1.18;font-weight:800;
  letter-spacing:-.25px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.pg-customer-chat-title span{
  display:block;margin-top:4px;color:#6f7d8c;font-size:13.5px;line-height:1.2;font-weight:400;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}

.pg-customer-chat-order{
  margin:14px 16px 0;
  min-height:64px;
  padding:0 16px 0 17px;
  border:1px solid #e4e5e6;
  border-radius:14px;
  background:#fff;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  box-shadow:0 2px 8px rgba(16,45,80,.025);
}
.pg-customer-chat-order-main{min-width:0;display:flex;align-items:center;gap:14px}
.pg-customer-chat-order-main>strong{font-size:14px;line-height:1;color:#354d68;font-weight:500;white-space:nowrap}
.pg-customer-chat-status{
  display:none;align-items:center;justify-content:center;
  min-height:30px;padding:0 13px;border-radius:999px;
  background:#eff4f7;color:#607285;font-size:11px;font-weight:700;white-space:nowrap
}
.pg-customer-chat-status.show{display:inline-flex}
.pg-customer-chat-status.is-complete{background:#def7e8;color:#129b57}
.pg-customer-chat-status.is-cancelled{background:#fff0ee;color:#c13c32}
.pg-customer-chat-order-chevron{width:28px;height:34px;display:grid;place-items:center;color:#5c7188}
.pg-customer-chat-order-chevron svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

.pg-customer-chat-body{
  position:relative;flex:1;min-height:0;overflow:auto;
  padding:16px 16px 26px;
  overscroll-behavior:contain;scroll-padding-bottom:22px;
  background-color:#fcf8ef;
  background-image:
    radial-gradient(circle at 14% 22%,rgba(255,153,74,.08) 0 4px,transparent 5px),
    radial-gradient(circle at 83% 62%,rgba(255,153,74,.06) 0 5px,transparent 6px);
}
.pg-customer-chat-body:before{
  content:"";position:absolute;inset:0;pointer-events:none;opacity:.28;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='%23f6b675' stroke-width='2' opacity='.38'%3E%3Cpath d='M24 34c18-9 35 1 36 14-8 8-28 11-41 1 0-6 2-11 5-15Z'/%3E%3Cpath d='M112 32c8 2 14 9 15 18-9-2-16-8-18-16 1-1 2-2 3-2Z'/%3E%3Cpath d='M126 99c20-8 33 2 35 15-12 9-31 8-40-4 0-5 2-8 5-11Z'/%3E%3Cpath d='M50 118c12-10 26-8 33 3-5 11-20 18-32 12-3-5-3-10-1-15Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size:180px 180px;
}
#pgCustomerChatList,.pg-customer-chat-load-old{position:relative;z-index:1}

.pg-customer-chat-load-old{
  display:none;margin:0 auto 13px;border:1px solid #ead9c6;border-radius:999px;
  background:#fff;color:#8b5a20;padding:8px 13px;font-size:11px;font-weight:600
}
.pg-customer-chat-load-old.show{display:block}
.pg-customer-chat-empty,.pg-customer-chat-error{
  position:relative;z-index:1;margin:34px auto;max-width:300px;text-align:center;color:#8a9099;font-size:12px;line-height:1.55
}
.pg-customer-chat-error{color:#a23c2b}

.pg-chat-day{
  width:max-content;max-width:90%;margin:2px auto 20px;padding:7px 16px;
  border-radius:999px;background:#edf1f5;color:#37516d;
  font-size:11.5px;line-height:1;font-weight:500;
}
.pg-chat-row{position:relative;display:flex;align-items:flex-end;gap:9px;margin:0 0 15px}
.pg-chat-row.mine{justify-content:flex-end;padding-left:52px}
.pg-chat-row.other{justify-content:flex-start;padding-right:48px}
.pg-chat-row.system{justify-content:center;margin:11px 0 16px}
.pg-chat-store-icon{
  width:40px;height:40px;flex:0 0 40px;border-radius:13px;
  background:#fff0df;color:#ff7918;display:grid;place-items:center;
}
.pg-chat-store-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}

.pg-chat-bubble{
  max-width:78%;
  padding:11px 14px 8px;
  border:1px solid #e4e6e8;
  border-radius:15px 15px 15px 5px;
  background:#fff;
  box-shadow:0 3px 10px rgba(16,45,80,.035);
  color:#102d50;font-size:15.5px;line-height:1.45;font-weight:500;
  white-space:pre-wrap;overflow-wrap:anywhere
}
.pg-chat-row.mine .pg-chat-bubble{
  background:#fff0dd;border-color:#ffddb7;
  border-radius:15px 15px 5px 15px;
  box-shadow:none
}
.pg-chat-copy{min-width:24px}
.pg-chat-row.system .pg-chat-bubble{
  max-width:92%;padding:7px 12px;border:0;border-radius:999px;
  background:#edf1f5;color:#627186;font-size:10.5px;text-align:center;box-shadow:none
}
.pg-chat-meta{
  display:flex;align-items:center;justify-content:flex-end;gap:5px;
  min-height:14px;margin-top:6px;color:#7f8994;font-size:11px;line-height:1;font-weight:500
}
.pg-chat-ticks{color:#ff7f18;font-size:12px;letter-spacing:-2px;font-weight:800;transform:translateY(-.5px)}

.pg-chat-readonly{
  display:none;padding:9px 14px;background:#fff4df;color:#815516;text-align:center;
  font-size:11px;border-top:1px solid #f1dfbf
}
.pg-chat-readonly.show{display:block}
.pg-customer-chat-fail{
  display:none;margin:8px 12px 0;padding:9px 10px;border-radius:11px;
  background:#fff0ee;color:#9e3329;font-size:11px;align-items:center;justify-content:space-between;gap:8px
}
.pg-customer-chat-fail.show{display:flex}
.pg-customer-chat-fail button{border:0;border-radius:999px;background:#9e3329;color:#fff;padding:6px 10px;font-size:10.5px;font-weight:600}

.pg-customer-chat-compose{
  position:relative;z-index:3;
  width:100%;box-sizing:border-box;
  margin:0;
  padding:8px 0 calc(8px + env(safe-area-inset-bottom,0px));
  background:transparent;border:0;border-radius:0;
  display:grid;grid-template-columns:48px minmax(0,1fr) 56px;align-items:end;gap:8px;
  box-shadow:none
}
.pg-customer-chat-input{
  width:100%;height:52px;min-height:52px;max-height:150px;resize:none;
  overflow-y:hidden;box-sizing:border-box;
  border:1px solid #d7dce3;border-radius:26px;background:#fff;
  padding:14px 18px;outline:none;
  font:500 15px/1.45 Poppins,system-ui;color:#102d50
}
.pg-customer-chat-input::placeholder{color:#8c929a;opacity:1}
.pg-customer-chat-input:focus{border-color:#e8b477;box-shadow:0 0 0 3px rgba(255,133,13,.07)}
.pg-customer-chat-attach{
  width:48px;height:48px;border:1px solid #d9dee5;border-radius:50%;background:#f9fbfd;color:#102d50;
  display:grid;place-items:center;align-self:end
}
.pg-customer-chat-attach svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pg-customer-chat-attach-menu{
  position:absolute;left:0;bottom:calc(100% + 8px);z-index:12;
  min-width:176px;padding:7px;border:1px solid #e1e5ea;border-radius:15px;
  background:#fff;box-shadow:0 12px 28px rgba(16,45,80,.16)
}
.pg-customer-chat-attach-menu[hidden]{display:none!important}
.pg-customer-chat-attach-menu button{
  width:100%;min-height:48px;border:0;border-radius:11px;background:transparent;color:#102d50;
  padding:8px 10px;display:flex;align-items:center;gap:11px;text-align:left;
  font:600 13.5px/1.2 Poppins,system-ui;cursor:pointer
}
.pg-customer-chat-attach-menu button:hover,.pg-customer-chat-attach-menu button:focus-visible{background:#fff4e8;outline:none}
.pg-chat-attach-menu-icon{
  width:34px;height:34px;flex:0 0 34px;border-radius:10px;background:#fff0df;color:#ff730b;
  display:grid;place-items:center
}
.pg-chat-attach-menu-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.pg-customer-chat-send{
  width:56px;height:56px;border:0;border-radius:50%;background:#ff6d00;color:#fff;
  display:grid;place-items:center;align-self:end;box-shadow:0 7px 16px rgba(255,125,8,.23)
}
.pg-customer-chat-send svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pg-customer-chat-send:disabled,.pg-customer-chat-input:disabled,.pg-customer-chat-attach:disabled{opacity:.48}
.pg-chat-bubble.has-image{padding:5px 5px 7px;max-width:min(78%,260px)}
.pg-chat-image-copy{min-width:140px}
.pg-chat-image-btn{display:block;border:0;padding:0;background:transparent;border-radius:12px;overflow:hidden;line-height:0}
.pg-chat-image{display:block;max-width:240px;width:100%;height:auto;min-height:110px;max-height:300px;object-fit:cover;background:#eef1f4;border-radius:11px}
.pg-chat-image.failed{min-height:90px}
.pg-chat-image-viewer{position:fixed;inset:0;z-index:10050;background:rgba(3,16,30,.92);display:flex;align-items:center;justify-content:center;padding:18px}
.pg-chat-image-viewer[hidden]{display:none!important}
.pg-chat-image-viewer img{max-width:100%;max-height:92vh;object-fit:contain;border-radius:12px}
.pg-chat-image-viewer button{position:absolute;top:calc(14px + env(safe-area-inset-top,0px));right:16px;width:42px;height:42px;border:0;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;font-size:30px;line-height:1}
.pg-chat-camera-capture{position:fixed;inset:0;z-index:2147483600;background:#000;display:flex;align-items:center;justify-content:center}
.pg-chat-camera-panel{position:relative;width:100%;height:100%;background:#000;display:flex;flex-direction:column}
.pg-chat-camera-panel video{width:100%;height:100%;object-fit:cover;background:#000}
.pg-chat-camera-actions{position:absolute;left:0;right:0;bottom:0;padding:18px 22px calc(22px + env(safe-area-inset-bottom,0px));display:grid;grid-template-columns:1fr 72px 1fr;align-items:center;background:linear-gradient(transparent,rgba(0,0,0,.72))}
.pg-chat-camera-cancel{grid-column:1;justify-self:start;border:0;border-radius:999px;background:rgba(255,255,255,.16);color:#fff;padding:10px 16px;font:600 14px Poppins,system-ui}
.pg-chat-camera-shot{grid-column:2;width:68px;height:68px;border:5px solid #fff;border-radius:50%;background:#ff6d00;box-shadow:0 0 0 3px rgba(0,0,0,.18)}
body.pg-chat-lock{overflow:hidden!important}

@media(max-width:380px){
  .pg-customer-chat-head{grid-template-columns:46px minmax(0,1fr) 46px;padding-left:12px;padding-right:12px}
  .pg-customer-chat-back,.pg-customer-chat-menu{width:46px;height:46px}
  .pg-customer-chat-title strong{font-size:17px}
  .pg-customer-chat-order{margin-left:13px;margin-right:13px}
  .pg-customer-chat-body{padding-left:13px;padding-right:13px}
  .pg-chat-bubble{font-size:13px}
}
@media(min-width:600px){
  .pg-customer-chat{left:50%;right:auto;width:min(100%,480px);transform:translateX(-50%);box-shadow:0 0 30px rgba(20,38,61,.18)}
}
