/* ==========================================================
   Custom style untuk halaman Order - stylewp1
   ========================================================== */

/* ===== Link dan ikon umum ===== */
.wa-link { 
  color: green; 
  font-weight: bold; 
}
.icon-btn { 
  margin-right: 5px; 
}

/* ===== Header tabel (sortable) ===== */
th.sortable { 
  cursor: pointer; 
  position: relative;
  user-select: none;
  color: #333;
  font-weight: 600;
}
th.sortable:hover {
  color: #0d6efd;
}

/* Panah sort default */
th.sortable:after { 
  content: " ⇅"; 
  font-size: 0.8em; 
  color: #888; 
}

/* Teks rata tengah */
tbody, td, tfoot, th, thead, tr { 
  text-align: center;
}

/* ==========================================================
   TABEL GAYA STYLEWP1
   ========================================================== */
.table.wp1-style tbody tr {
  transition: background-color 0.25s ease-in-out, transform 0.15s ease;
}

/* Pewarnaan baris ganjil & genap */
.table.wp1-style tbody tr:nth-child(odd) {
  background-color: #f9fbff; /* biru-putih lembut */
}
.table.wp1-style tbody tr:nth-child(even) {
  background-color: #f5f7fa; /* abu lembut */
}

/* Hover lembut */
.table.wp1-style tbody tr:hover {
  background-color: #e9f2ff; /* biru muda */
  transform: scale(1.01);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Efek animasi lembut saat baris muncul */
@keyframes fadeInUpSoft {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.table.wp1-style tbody tr {
  animation: fadeInUpSoft 0.4s ease both;
}

/* Supaya animasi sedikit berurutan antar baris */
.table.wp1-style tbody tr:nth-child(1) { animation-delay: 0.05s; }
.table.wp1-style tbody tr:nth-child(2) { animation-delay: 0.1s; }
.table.wp1-style tbody tr:nth-child(3) { animation-delay: 0.15s; }
.table.wp1-style tbody tr:nth-child(4) { animation-delay: 0.2s; }
.table.wp1-style tbody tr:nth-child(5) { animation-delay: 0.25s; }
.table.wp1-style tbody tr:nth-child(6) { animation-delay: 0.3s; }
.table.wp1-style tbody tr:nth-child(7) { animation-delay: 0.35s; }
.table.wp1-style tbody tr:nth-child(8) { animation-delay: 0.4s; }
.table.wp1-style tbody tr:nth-child(9) { animation-delay: 0.45s; }
.table.wp1-style tbody tr:nth-child(10) { animation-delay: 0.5s; }
.table.wp1-style tbody tr:nth-child(11) { animation-delay: 0.55s; }
.table.wp1-style tbody tr:nth-child(12) { animation-delay: 0.6s; }
.table.wp1-style tbody tr:nth-child(13) { animation-delay: 0.65s; }
.table.wp1-style tbody tr:nth-child(14) { animation-delay: 0.7s; }
.table.wp1-style tbody tr:nth-child(15) { animation-delay: 0.75s; }
.table.wp1-style tbody tr:nth-child(16) { animation-delay: 0.8s; }
.table.wp1-style tbody tr:nth-child(17) { animation-delay: 0.85s; }
.table.wp1-style tbody tr:nth-child(18) { animation-delay: 0.9s; }
.table.wp1-style tbody tr:nth-child(19) { animation-delay: 0.95s; }
.table.wp1-style tbody tr:nth-child(20) { animation-delay: 1s; }

/* ==========================================================
   RESPONSIVE MODE (Tablet & Mobile)
   ========================================================== */
@media (max-width: 768px) {
  /* Hilangkan border default */
  table.responsive-table.wp1-style {
    border: 0;
  }

  /* Sembunyikan header di tampilan mobile */
  table.responsive-table.wp1-style thead {
    display: none;
  }

  /* Setiap baris jadi "card" vertikal */
  table.responsive-table.wp1-style tr {
    display: block;
    margin-bottom: 1rem;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
  }

  /* Pewarnaan sama seperti desktop */
  table.responsive-table.wp1-style tr:nth-child(odd) {
    background-color: #f9fbff !important;
  }
  table.responsive-table.wp1-style tr:nth-child(even) {
    background-color: #f5f7fa !important;
  }

  /* Hover di mobile (ringan) */
  table.responsive-table.wp1-style tr:hover {
    background-color: #e9f2ff !important;
  }

  /* Sel jadi fleksibel vertikal */
  table.responsive-table.wp1-style td {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border: none;
    border-bottom: 1px solid #eee;
    font-size: 14px;
  }

  /* Label kolom */
  table.responsive-table.wp1-style td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #444;
  }

  table.responsive-table.wp1-style td:last-child {
    border-bottom: none;
  }
}

.badge.bg-secondary { 
  background-color: #a0a0a0 !important; 
}

.badge.status-terkirim { 
  background-color: #3ac37a !important; /* hijau lembut */
}

.badge.status-sedang { 
  background-color: rgba(var(--bs-warning-rgb),var(--bs-bg-opacity)) !important;
  color: rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important;/* kuning lembut */
}

.badge.status-batal { 
  background-color: #e95c5c !important; /* merah lembut */
}

/* === Modal Styling untuk konsistensi stylewp1 === */
#orderModal .modal-content {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

#orderModal .modal-header {
  background: linear-gradient(90deg, #2563eb, #1e3a8a);
  color: #fff;
}

#orderModal .modal-body label {
  color: #374151;
}

#orderModal .input-group-text {
  border-right: none;
}

#orderModal .form-control {
  border-left: none;
}

#orderModal .form-control:focus {
  box-shadow: 0 0 0 0.15rem rgba(37,99,235,0.25);
  border-color: #2563eb;
}
#modalEditPinjaman .modal-header {
  background: linear-gradient(90deg, #facc15, #eab308);
  color: #000;
}

#modalEditPinjaman .form-label {
  color: #374151;
}

#userSearchResults {
  border-radius: 6px;
  overflow: hidden;
  animation: fadeIn 0.2s ease-in-out;
}
#userSearchResults .list-group-item {
  cursor: pointer;
}
#userSearchResults .list-group-item:hover {
  background-color: #e0e7ff;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.leaflet-popup-content .btn {
  font-size: 12px;
  padding: 3px 6px;
  border-radius: 6px;
}
.leaflet-popup-content .btn i {
  margin-right: 4px;
}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
    bottom: 12px !important;
}
