/**
 * Jijo Market - Drawer & Modal Stylesheet
 * Faithful reproduction of Drawer.scss & Modal behavior in sabadi-master
 */

/* Backdrop Overlay */
.drawer-backdrop,
.modal-backdrop-custom {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-backdrop.active,
.modal-backdrop-custom.active {
  opacity: 1;
  visibility: visible;
}

/* Slide-Up Drawer (Mobile First) */
.drawer-container {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: var(--fixed-width);
  background-color: var(--white-0);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drawer-container.open {
  transform: translate(-50%, 0);
}

.drawer-drag-handle {
  width: 44px;
  height: 5px;
  background-color: var(--gray-300);
  border-radius: var(--radius-full);
  margin: 10px auto 4px;
  flex-shrink: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
}

.drawer-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
}

.drawer-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--gray-100);
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.drawer-close-btn:hover {
  background-color: var(--gray-200);
  color: var(--gray-900);
}

.drawer-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--gray-100);
  background-color: var(--white-0);
  flex-shrink: 0;
}

/* Center Modal (for Desktop or Confirms) */
.modal-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%) scale(0.95);
  width: calc(100% - 32px);
  max-width: 480px;
  background-color: var(--white-0);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-container.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
}

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

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
}

.modal-body {
  padding: 20px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Auth Modal Specifics */
.auth-logo-box {
  text-align: center;
  margin-bottom: 20px;
}

.auth-logo-box img {
  width: 70px;
  height: 70px;
  margin: 0 auto 10px;
  border-radius: var(--radius-lg);
  background-color: #000000;
  padding: 6px;
}

.auth-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--gray-500);
}

.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 10px;
  direction: ltr;
  margin: 20px 0;
}

.otp-box {
  width: 50px;
  height: 54px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  transition: all var(--transition-fast);
}

.otp-box:focus {
  border-color: var(--primary-main);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
