/* ═══════════════════════════════════════════════
   DHL PICKUP MODULE — Styles
   Consistent with dhl-modal.css design system
   ═══════════════════════════════════════════════ */

/* ── Overlay ── */
.pkp-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 22, 40, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10002;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease;
  padding: 20px;
}
.pkp-overlay.active { opacity: 1; }

/* ── Main Card ── */
.pkp-card {
  background: white;
  border-radius: 20px;
  width: 560px; max-width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0,0,0,.03);
  animation: pkpSlideUp 0.4s var(--ease, cubic-bezier(.22,1,.36,1)) both;
}
@keyframes pkpSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Header ── */
.pkp-header {
  display: flex; align-items: center; gap: 14px;
  padding: 24px 24px 0;
}
.pkp-header-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pkp-title {
  margin: 0; font-size: 1.15rem; font-weight: 800;
  color: var(--navy-800, #0a1628);
}
.pkp-subtitle {
  margin: 2px 0 0; font-size: 0.82rem;
  color: var(--g500, #64748b);
}
.pkp-close {
  margin-left: auto; width: 32px; height: 32px;
  border-radius: 8px; border: none; background: var(--g100, #f1f5f9);
  color: var(--g500, #64748b); font-size: 1rem;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.pkp-close:hover { background: var(--g200, #e2e8f0); color: var(--g800, #1e293b); }

/* ── Sections ── */
.pkp-section {
  padding: 16px 24px;
  border-top: 1px solid var(--g100, #f1f5f9);
}
.pkp-section:first-of-type { margin-top: 16px; }
.pkp-section-title {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--navy-600, #1e4d78);
  margin-bottom: 12px;
}

/* ── Address Display ── */
.pkp-address {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--navy-50, #eff6ff), rgba(234,243,251,.4));
  border: 1px solid var(--navy-100, #dbeafe);
  border-radius: 12px;
}
.pkp-addr-icon { font-size: 1.2rem; line-height: 1.5; }
.pkp-addr-detail {
  display: flex; flex-direction: column; gap: 2px;
}
.pkp-addr-detail strong {
  font-size: 0.9rem; color: var(--navy-800, #0a1628);
}
.pkp-addr-detail span {
  font-size: 0.8rem; color: var(--g600, #475569);
  line-height: 1.4;
}

/* ── Form Elements ── */
.pkp-form-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.pkp-field { display: flex; flex-direction: column; }
.pkp-label {
  font-size: 0.78rem; font-weight: 700;
  color: var(--navy-600, #1e4d78);
  margin-bottom: 6px; letter-spacing: 0.02em;
}
.pkp-input, .pkp-select {
  width: 100%; padding: 10px 14px;
  font-size: 0.88rem; font-weight: 500;
  color: var(--g800, #1e293b);
  background: var(--g50, #f8fafc);
  border: 1.5px solid var(--g200, #e2e8f0);
  border-radius: 10px;
  font-family: var(--font, inherit);
  transition: all 0.25s ease;
}
.pkp-select {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 36px;
}
.pkp-input:focus, .pkp-select:focus {
  border-color: var(--navy-400, #2a6da8);
  background: white;
  box-shadow: 0 0 0 3px rgba(42,109,168,0.08);
  outline: none;
}
.pkp-input::placeholder { color: var(--g400, #94a3b8); font-weight: 400; }

/* ── Actions Bar ── */
.pkp-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 20px 24px;
  border-top: 1px solid var(--g100, #f1f5f9);
}
.pkp-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 10px;
  font-size: 0.88rem; font-weight: 700;
  font-family: var(--font, inherit);
  cursor: pointer; border: none;
  transition: all 0.25s var(--ease, ease);
}
.pkp-btn-ghost {
  background: var(--g100, #f1f5f9);
  color: var(--g600, #475569);
}
.pkp-btn-ghost:hover {
  background: var(--g200, #e2e8f0);
  transform: translateY(-1px);
}
.pkp-btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 4px 14px rgba(245,158,11,0.25);
}
.pkp-btn-primary:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,158,11,0.3);
}
.pkp-btn-primary:disabled {
  opacity: 0.6; cursor: not-allowed;
  transform: none; box-shadow: none;
}

/* ── Success Card ── */
.pkp-success-card {
  background: white;
  border-radius: 20px;
  padding: 32px;
  width: 440px; max-width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: pkpSlideUp 0.4s var(--ease, cubic-bezier(.22,1,.36,1)) both;
}
.pkp-success-icon { margin-bottom: 16px; }
.pkp-success-title {
  margin: 0 0 4px; font-size: 1.25rem; font-weight: 800;
  color: var(--navy-800, #0a1628);
}
.pkp-success-sub {
  margin: 0 0 20px; font-size: 0.9rem;
  color: var(--g500, #64748b);
}
.pkp-success-details {
  background: var(--g50, #f8fafc);
  border: 1px solid var(--g100, #f1f5f9);
  border-radius: 12px;
  padding: 16px; text-align: left;
  margin-bottom: 16px;
}
.pkp-success-row {
  display: flex; justify-content: space-between;
  padding: 6px 0; font-size: 0.85rem;
}
.pkp-success-row:not(:last-child) {
  border-bottom: 1px solid var(--g100, #f1f5f9);
}
.pkp-success-label { color: var(--g500, #64748b); }
.pkp-success-val { color: var(--navy-800, #0a1628); font-weight: 600; }
.pkp-success-notice {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 12px 14px;
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 10px; font-size: 0.8rem;
  color: #92400e; text-align: left; line-height: 1.4;
}

/* ── Spinner (reuse from dhl-module) ── */
.pkp-btn .btn-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: cpspin 0.6s linear infinite;
}

/* ═══ DARK MODE ═══ */
:root.dark-mode .pkp-card,
:root.dark-mode .pkp-success-card {
  background: #1f2937;
}
:root.dark-mode .pkp-title,
:root.dark-mode .pkp-success-title { color: #f3f4f6; }
:root.dark-mode .pkp-subtitle,
:root.dark-mode .pkp-success-sub { color: #9ca3af; }
:root.dark-mode .pkp-close { background: #374151; color: #9ca3af; }
:root.dark-mode .pkp-close:hover { background: #4b5563; color: #f3f4f6; }
:root.dark-mode .pkp-section { border-top-color: #374151; }
:root.dark-mode .pkp-section-title { color: #93c5fd; }
:root.dark-mode .pkp-address { background: rgba(37,99,235,.08); border-color: #374151; }
:root.dark-mode .pkp-addr-detail strong { color: #f3f4f6; }
:root.dark-mode .pkp-addr-detail span { color: #9ca3af; }
:root.dark-mode .pkp-input, :root.dark-mode .pkp-select {
  background: #374151; border-color: #4b5563;
  color: #f3f4f6;
}
:root.dark-mode .pkp-input:focus, :root.dark-mode .pkp-select:focus {
  border-color: #60a5fa; background: #1f2937;
  box-shadow: 0 0 0 3px rgba(96,165,250,.1);
}
:root.dark-mode .pkp-actions { border-top-color: #374151; }
:root.dark-mode .pkp-btn-ghost { background: #374151; color: #d1d5db; }
:root.dark-mode .pkp-btn-ghost:hover { background: #4b5563; }
:root.dark-mode .pkp-success-details { background: #111827; border-color: #374151; }
:root.dark-mode .pkp-success-row:not(:last-child) { border-bottom-color: #374151; }
:root.dark-mode .pkp-success-label { color: #9ca3af; }
:root.dark-mode .pkp-success-val { color: #f3f4f6; }
:root.dark-mode .pkp-success-notice { background: rgba(254,252,232,.08); border-color: #a16207; color: #fbbf24; }

/* ── Time Window Section ── */
.pkp-time-label {
  font-size: 0.82rem; font-weight: 600;
  color: var(--navy-700, #1e4d78);
  margin-bottom: 10px;
}
.pkp-time-hint {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 8px 12px;
  background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 0.75rem; font-weight: 500;
  color: var(--navy-600, #1e4d78); line-height: 1.4;
}
:root.dark-mode .pkp-time-label { color: #93c5fd; }
:root.dark-mode .pkp-time-hint { background: rgba(37,99,235,.08); border-color: #1e3a5f; color: #93c5fd; }

/* ─────────────────────────────────────────────
   GUIDE-OF-THE-DAY MANDATORY DROPDOWN (create)
───────────────────────────────────────────── */
.pkp-guide-select {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.86rem !important;
  font-weight: 600;
  border: 1.5px solid #f59e0b !important;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%) !important;
  color: #78350f !important;
  box-shadow: 0 1px 0 rgba(245,158,11,.18), inset 0 0 0 1px rgba(255,255,255,.4);
}
.pkp-guide-select:focus {
  border-color: #d97706 !important;
  box-shadow: 0 0 0 3px rgba(245,158,11,.18) !important;
}
.pkp-guide-select.pkp-guide-empty {
  border-color: #fca5a5 !important;
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%) !important;
  color: #991b1b !important;
  cursor: not-allowed;
}

.pkp-guide-info {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 0.78rem; font-weight: 600;
  line-height: 1.4;
}
.pkp-guide-info-ok {
  background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534;
}
.pkp-guide-info-empty {
  background: #fef2f2; border: 1px solid #fecaca; color: #991b1b;
}

/* Locked guide display in edit mode */
.pkp-guide-locked {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  font-family: var(--mono, ui-monospace, monospace);
  flex-wrap: wrap;
}
.pkp-guide-locked-icon { font-size: 1.1rem; }
.pkp-guide-locked-num {
  font-size: 0.92rem; font-weight: 800;
  color: var(--navy-800, #0a1628);
  letter-spacing: 0.02em;
}
.pkp-guide-locked-hint {
  margin-left: auto;
  font-family: var(--font, inherit);
  font-size: 0.74rem; font-weight: 600;
  color: #64748b;
}

/* Dark mode variants */
:root.dark-mode .pkp-guide-select {
  background: linear-gradient(180deg, rgba(245,158,11,.18) 0%, rgba(180,83,9,.22) 100%) !important;
  color: #fde68a !important;
  border-color: #b45309 !important;
}
:root.dark-mode .pkp-guide-select.pkp-guide-empty {
  background: linear-gradient(180deg, rgba(220,38,38,.18) 0%, rgba(127,29,29,.22) 100%) !important;
  color: #fca5a5 !important;
  border-color: #7f1d1d !important;
}
:root.dark-mode .pkp-guide-info-ok {
  background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.35); color: #86efac;
}
:root.dark-mode .pkp-guide-info-empty {
  background: rgba(220,38,38,.12); border-color: rgba(220,38,38,.35); color: #fca5a5;
}
:root.dark-mode .pkp-guide-locked {
  background: rgba(30,41,59,.6);
  border-color: #475569;
}
:root.dark-mode .pkp-guide-locked-num { color: #f3f4f6; }
:root.dark-mode .pkp-guide-locked-hint { color: #9ca3af; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 600px) {
  .pkp-card { border-radius: 16px; }
  .pkp-header { padding: 20px 20px 0; }
  .pkp-section { padding: 14px 20px; }
  .pkp-actions { padding: 16px 20px; }
  .pkp-form-grid { grid-template-columns: 1fr; }
  .pkp-success-card { padding: 24px; }
  .pkp-guide-locked-hint { margin-left: 0; width: 100%; }
}