/* 🌾 Pride of Bihar — Plain-Luxury Modal & Toast Engine
   Aesthetic: Minimalist Royal Vedic Luxury, Ultra-Crisp Typography, Zero Clutter */

/* ── TOAST NOTIFICATIONS ── */
#pob-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
  width: calc(100vw - 48px);
}

.pob-toast {
  pointer-events: auto;
  background: #ffffff;
  border: 1px solid #ebdcd2;
  border-left: 4px solid #d4af37;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(32, 6, 13, 0.12);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Plus Jakarta Sans", sans-serif;
  color: #20060d;
  font-size: 0.9rem;
  font-weight: 600;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.pob-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.pob-toast.toast-success {
  border-left-color: #16a34a;
}
.pob-toast.toast-error {
  border-left-color: #dc2626;
}
.pob-toast.toast-gold {
  border-left-color: #d4af37;
}

.pob-toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.pob-toast-content {
  flex: 1;
  line-height: 1.4;
}

.pob-toast-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.pob-toast-close:hover {
  color: #20060d;
}

/* ── MODAL OVERLAY & CARD ── */
#pob-modal-root {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999990 !important;
  background: rgba(18, 4, 8, 0.72) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  opacity: 0;
  pointer-events: none;
  overflow-y: scroll !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: contain !important;
  touch-action: pan-y !important;
  padding: 24px 14px 100px 14px !important;
  display: block !important;
  text-align: center;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

#pob-modal-root.active {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.pob-modal-card {
  display: inline-block !important;
  text-align: left;
  background: #ffffff !important;
  border-radius: 20px !important;
  border: 1px solid #ebdcd2 !important;
  box-shadow: 0 24px 60px rgba(18, 4, 8, 0.35) !important;
  width: 100% !important;
  max-width: 580px !important;
  margin: 16px auto 40px auto !important;
  position: relative !important;
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  vertical-align: middle;
}

.pob-modal-card form,
#pob-modal-form {
  display: block !important;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}

#pob-modal-root.active .pob-modal-card {
  transform: scale(1) translateY(0) !important;
}

.pob-modal-card.modal-large {
  max-width: 680px !important;
}

.pob-modal-card.modal-danger-border {
  border-top: 4px solid #dc2626;
}

.pob-modal-card.modal-gold-border {
  border-top: 4px solid #d4af37;
}

/* Modal Header */
.pob-modal-header {
  padding: 20px 24px 16px !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 14px !important;
  border-bottom: 1px solid #f1e6de !important;
  position: sticky !important;
  top: -24px !important;
  background: #ffffff !important;
  border-top-left-radius: 20px !important;
  border-top-right-radius: 20px !important;
  z-index: 40 !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03) !important;
}

.pob-modal-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fbf7ec;
  border: 1px solid #ebdcd2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.pob-modal-icon-wrap.danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.pob-modal-header-text {
  flex: 1;
}

.pob-modal-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  color: #20060d;
  margin: 0 0 4px;
  font-weight: 700;
  line-height: 1.25;
}

.pob-modal-subtitle {
  font-size: 0.84rem;
  color: #6b5e62;
  margin: 0;
  line-height: 1.45;
}

.pob-modal-close-btn {
  background: #f8f6f3;
  border: 1px solid #ebdcd2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6b5e62;
  font-size: 1rem;
  transition: all 0.2s;
}

.pob-modal-close-btn:hover {
  background: #20060d;
  color: #ffffff;
  border-color: #20060d;
}

/* Modal Body */
.pob-modal-body {
  padding: 22px 24px !important;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
  font-size: 0.92rem;
  color: #3f393b;
  line-height: 1.6;
}

/* Modal Form Styles */
.pob-modal-form-group {
  margin-bottom: 16px;
}

.pob-modal-form-group:last-child {
  margin-bottom: 0;
}

.pob-modal-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #20060d;
  margin-bottom: 6px;
}

.pob-modal-input,
.pob-modal-select,
.pob-modal-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #ebdcd2;
  border-radius: 10px;
  font-size: 0.92rem;
  background: #fdfcfb;
  color: #20060d;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pob-modal-input:focus,
.pob-modal-select:focus,
.pob-modal-textarea:focus {
  border-color: #d4af37;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.16);
}

.pob-modal-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Modal Actions Footer */
.pob-modal-footer {
  padding: 16px 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  border-top: 1.5px solid #ebdcd2 !important;
  background: #ffffff !important;
  border-bottom-left-radius: 20px !important;
  border-bottom-right-radius: 20px !important;
  position: sticky !important;
  bottom: 0 !important;
  z-index: 40 !important;
  box-shadow: 0 -4px 16px rgba(18, 4, 8, 0.08) !important;
}

.pob-btn-ghost {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1.5px solid #ebdcd2;
  background: #ffffff;
  color: #6b5e62;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.pob-btn-ghost:hover {
  background: #f1e6de;
  color: #20060d;
}

.pob-btn-primary {
  padding: 10px 22px;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: linear-gradient(135deg, #4a0e1c 0%, #20060d 100%);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(32, 6, 13, 0.2);
  transition: all 0.2s;
}

.pob-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(32, 6, 13, 0.28);
  border-color: #d4af37;
}

.pob-btn-danger {
  padding: 10px 22px;
  border-radius: 10px;
  border: 1px solid #ef4444;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.2);
  transition: all 0.2s;
}

.pob-btn-danger:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.3);
}

/* Success Celebration Sheet */
.pob-order-success-card {
  text-align: center;
  padding: 36px 30px;
}

.pob-success-check-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fef3c7 0%, #fde047 100%);
  border: 3px solid #d4af37;
  color: #854d0e;
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.35);
  animation: popIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popIn {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 640px) {
  #pob-toast-container {
    top: auto;
    bottom: 20px;
    right: 16px;
    left: 16px;
    width: auto;
  }
  .pob-modal-grid-2 {
    grid-template-columns: 1fr;
  }
  .pob-modal-card {
    border-radius: 16px;
  }
}
