/* Reset & Container Defaults */
.pickuppt-modal-box * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

/* Overlay */
.pu-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw !important;
  height: 100vh !important;
  padding: 1.5rem 1rem;
  /* No backdrop-filter here: a live blur over a full-screen scrolling overlay is
     re-rendered on every caret blink / keystroke and makes typing lag.
     A slightly darker flat tint keeps the dimmed look without the cost. */
  background: rgba(15, 23, 42, 0.6);
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  z-index: 9999;
}

/* Modal Card */
.pickuppt-modal-box {
  background: #ffffff;
  width: 100%;
  max-width: 540px;
  border-radius: 16px;
  padding: 2rem;
  margin: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(226, 232, 240, 0.8);
  animation: pickupptModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Header */
.pu-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.pu-modal-header h3 {
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pu-modal-close {
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.pu-modal-close:hover {
  color: #0f172a;
  background-color: #f1f5f9;
}

/* Messages */
.pickuppt-modal-msg-wrapper {
  margin-bottom: 1rem;
}

.pickuppt-modal-msg {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
}

.pickuppt-modal-msg.success {
  color: #15803d;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.pickuppt-modal-msg.danger {
  color: #b91c1c;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
}

/* Form Table Layout */
.pickuppt-modal-box table.pickuppt-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.85rem;
  margin-top: 0;
}

.pickuppt-modal-box table tr {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.5rem;
}

.pickuppt-modal-box table th {
  display: block;
  border: none !important;
  text-align: left !important;
  padding: 0 0 0.35rem 0 !important;
  background-color: transparent !important;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 500;
}

.pickuppt-modal-box table td {
  display: block;
  border: none !important;
  padding: 0 !important;
  background-color: transparent !important;
  width: 100%;
}

/* Form Elements Styling */
.pickuppt-modal-box table input:not([type="hidden"]),
.pickuppt-modal-box table textarea,
.pickuppt-modal-box table select {
  width: 100%;
  outline: none !important;
  border: 1px solid #cbd5e1 !important;
  background-color: #f8fafc;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.925rem;
  color: #0f172a;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.pickuppt-modal-box table input:focus,
.pickuppt-modal-box table textarea:focus,
.pickuppt-modal-box table select:focus {
  border-color: #2563eb !important;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.pickuppt-modal-box table textarea {
  min-height: 80px;
  resize: vertical;
}

/* Footer Buttons */
.pu-modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.pickuppt-btn-cancel,
.pickuppt-btn-confirm {
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pickuppt-btn-cancel {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

.pickuppt-btn-cancel:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

.pickuppt-btn-confirm {
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.pickuppt-btn-confirm:hover {
  background: #1d4ed8 !important;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.25);
}

/* Spinner Overlay */
.pickuppt-loader {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
}

.pickuppt-loader-inner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: pickupptSpin 0.8s linear infinite;
}

.pac-container {
  z-index: 9999999 !important;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  font-family: inherit;
}

/* Animations */
@keyframes pickupptModalPop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes pickupptSpin {
  to {
    transform: rotate(360deg);
  }
}