/**
 * GoldLedger Modals & Bottom Sheets
 * مجوهرات السعادة
 */

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: flex-end; /* Bottom sheet on mobile */
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  width: 100%;
  max-height: 85vh;
  background: #111827;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-top: 1.5px solid rgba(245, 158, 11, 0.3);
  padding: 20px 20px calc(24px + var(--safe-bottom)) 20px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.modal-backdrop.open .modal-sheet {
  transform: translateY(0);
}

.modal-handle-bar {
  width: 40px;
  height: 4px;
  background: var(--border-muted);
  border-radius: var(--radius-full);
  margin: 0 auto 16px auto;
  flex-shrink: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-muted);
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-muted);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
}

.modal-close-btn:hover {
  color: var(--gold-400);
}

/* Preset Cashier Pills Grid */
.staff-presets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.staff-preset-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-muted);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-primary);
  font-family: var(--font-arabic);
}

.staff-preset-card:hover {
  border-color: var(--gold-500);
  background: var(--bg-card-hover);
}

.staff-preset-card.active {
  border-color: var(--gold-400);
  background: rgba(245, 158, 11, 0.12);
}

.staff-preset-card .staff-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-on-gold);
  flex-shrink: 0;
}

.staff-preset-info {
  display: flex;
  flex-direction: column;
}

.staff-preset-name {
  font-size: 0.9rem;
  font-weight: 700;
}

.staff-preset-role {
  font-size: 0.72rem;
  color: var(--text-muted);
}
