/* =====================================================
   ERP GGN — Bottom Sheet Component Styles
   File: css/bottom-sheet.css
   ===================================================== */

/* ============ BACKDROP ============ */
.bs-backdrop{
  position:fixed; inset:0;
  z-index:99999;
  background:rgba(10,37,64,0);
  backdrop-filter:blur(0);
  transition:background .25s ease, backdrop-filter .25s ease;
  opacity:0;
  pointer-events:none;
}
.bs-backdrop.visible{
  background:rgba(10,37,64,.55);
  backdrop-filter:blur(4px);
  opacity:1;
  pointer-events:auto;
}

/* ============ SHEET — MOBILE (slide from bottom) ============ */
.bs-sheet.mobile{
  position:absolute;
  left:0; right:0; bottom:0;
  background:#fff;
  border-radius:22px 22px 0 0;
  box-shadow:0 -8px 32px rgba(10,37,64,.25);
  max-height:85vh;
  display:flex; flex-direction:column;
  transform:translateY(100%);
  transition:transform .3s cubic-bezier(.34,1.2,.64,1);
  padding-bottom:env(safe-area-inset-bottom);
  will-change:transform;
}
.bs-backdrop.visible .bs-sheet.mobile{
  transform:translateY(0);
}

/* ============ SHEET — DESKTOP (modal center) ============ */
.bs-sheet.desktop{
  position:absolute;
  top:50%; left:50%;
  transform:translate(-50%,-50%) scale(.95);
  width:calc(100% - 32px);
  max-width:480px;
  background:#fff;
  border-radius:20px;
  box-shadow:0 20px 60px rgba(10,37,64,.3);
  max-height:85vh;
  display:flex; flex-direction:column;
  transition:transform .25s cubic-bezier(.34,1.2,.64,1), opacity .25s ease;
  opacity:0;
}
.bs-backdrop.visible .bs-sheet.desktop{
  transform:translate(-50%,-50%) scale(1);
  opacity:1;
}

/* ============ DRAG HANDLE (mobile) ============ */
.bs-drag-handle{
  padding:10px 0 4px;
  display:flex; justify-content:center;
  cursor:grab;
  touch-action:none;
  flex-shrink:0;
}
.bs-drag-handle:active{ cursor:grabbing; }
.bs-drag-handle-bar{
  width:40px; height:4px;
  background:#CBD5E1;
  border-radius:2px;
  transition:background .2s;
}
.bs-drag-handle:active .bs-drag-handle-bar{
  background:#94A3B8;
}

/* ============ HEADER ============ */
.bs-header{
  padding:8px 20px 16px;
  border-bottom:1px solid #F1F5F9;
  flex-shrink:0;
  touch-action:none;
}
.bs-sheet.desktop .bs-header{
  padding:20px 20px 16px;
}
.bs-title{
  font-size:16px; font-weight:800; color:#0A2540;
  letter-spacing:-.3px;
  line-height:1.3;
}
.bs-subtitle{
  font-size:12px; color:#64748B;
  margin-top:4px;
  line-height:1.4;
}

/* ============ CONTENT ============ */
.bs-content{
  padding:16px 20px;
  overflow-y:auto;
  flex-shrink:0;
}
.bs-message{
  font-size:13px; color:#475569;
  line-height:1.6;
  padding:4px 0 8px;
}

/* ============ ACTIONS ============ */
.bs-actions{
  padding:8px 12px;
  overflow-y:auto;
  flex:1;
  min-height:0;
}
.bs-action{
  width:100%;
  display:flex; align-items:center; gap:14px;
  padding:14px 14px;
  border:none; background:transparent;
  border-radius:14px;
  cursor:pointer;
  font-family:inherit;
  text-align:left;
  transition:background .15s;
  margin-bottom:2px;
}
.bs-action:hover,
.bs-action:active{
  background:#F8FAFC;
}
.bs-action.danger{ color:#991B1B; }
.bs-action.danger:hover{ background:#FEF2F2; }
.bs-action.danger .bs-action-title{ color:#991B1B; }
.bs-action.danger .bs-action-arrow{ stroke:#FCA5A5; }

.bs-action-icon{
  width:42px; height:42px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  font-size:20px; flex-shrink:0;
  background:linear-gradient(135deg,#F1F5F9,#E2E8F0);
}
.bs-action.danger .bs-action-icon{
  background:#FEE2E2;
}

.bs-action-content{ flex:1; min-width:0; }
.bs-action-title{
  font-size:14px; font-weight:700; color:#0A2540;
  letter-spacing:-.2px;
  line-height:1.3;
}
.bs-action-subtitle{
  font-size:11.5px; color:#64748B;
  margin-top:2px;
  line-height:1.35;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.bs-action-arrow{
  width:16px; height:16px; flex-shrink:0;
  stroke:#CBD5E1; fill:none;
  stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round;
  transition:transform .15s, stroke .15s;
}
.bs-action:hover .bs-action-arrow{
  stroke:#3E7CB1;
  transform:translateX(2px);
}

/* ============ CANCEL ============ */
.bs-cancel{
  margin:8px 20px 16px;
  padding:14px;
  border:1.5px solid #E2E8F0;
  background:#fff;
  border-radius:14px;
  font-size:14px; font-weight:800; color:#64748B;
  cursor:pointer; font-family:inherit;
  letter-spacing:-.2px;
  transition:all .15s;
  flex-shrink:0;
}
.bs-sheet.desktop .bs-cancel{
  margin:8px 20px 20px;
}
.bs-cancel:hover{
  background:#F8FAFC;
  border-color:#CBD5E1;
  color:#0A2540;
}
.bs-sheet.mobile .bs-cancel{
  margin-bottom:calc(16px + env(safe-area-inset-bottom));
}

/* ============ MENU ITEM — variant untuk "Lainnya" ============ */
.bs-action.menu-item .bs-action-icon{
  width:46px; height:46px;
  font-size:22px;
  background:#F1F5F9;
}
.bs-action.menu-item .bs-action-title{
  font-size:14.5px;
}

/* ============ SECTION TITLE (opsional di dalam sheet) ============ */
.bs-section-title{
  font-size:10px; font-weight:800; color:#94A3B8;
  text-transform:uppercase; letter-spacing:1px;
  padding:14px 14px 6px;
}

/* Section title (divider grup) */
.bs-section-title{
  font-size:10.5px; font-weight:800;
  color:#94A3B8;
  text-transform:uppercase;
  letter-spacing:1.2px;
  padding:16px 14px 6px;
  position:relative;
}
.bs-section-title:first-child{
  padding-top:8px;
}
/* Garis tipis di bawah section title */
.bs-section-title::after{
  content:''; display:block;
  height:1px; background:#F1F5F9;
  margin-top:6px;
}

/* ============ RESPONSIVE ============ */
@media (max-width:380px){
  .bs-action-title{ font-size:13px; }
  .bs-action-icon{ width:38px; height:38px; font-size:18px; }
}