/* Speisekarte PDF — Modal + Header-Icon (Schwarz/Gold wie Restaurant-Modals) */

.ps-icon-speisekarte-pdf {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: no-repeat center / contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M7 2h7l5 5v15a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z' stroke='%23ffffff' stroke-width='1.5'/%3E%3Cpath d='M14 2v5h5' stroke='%23ffffff' stroke-width='1.5'/%3E%3Cpath d='M8 12h8M8 15h8M8 18h5' stroke='%23c9a96e' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

body.ps-hdr-compact #top-bar .header-speisekarte-pdf-item > a,
body.ps-hdr-compact .ps-hdr-drawer-icons .header-speisekarte-pdf-item > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
}

.ps-sk-pdf-modal {
  --ps-sk-gold: #c9a96e;
  --ps-sk-gold-dim: rgba(201, 169, 110, 0.72);
  --ps-sk-bg: #141210;
  --ps-sk-border: rgba(201, 169, 110, 0.28);
  --ps-sk-text: #f5f0e8;
  --ps-sk-muted: rgba(255, 255, 255, 0.45);
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.ps-sk-pdf-modal.is-open {
  display: flex;
}

.ps-sk-pdf-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.ps-sk-pdf-modal__panel {
  position: relative;
  z-index: 1;
  width: min(340px, 100%);
  max-height: min(88vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--ps-sk-bg);
  border: 1px solid var(--ps-sk-border);
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
  color: var(--ps-sk-text);
  pointer-events: auto;
  -webkit-overflow-scrolling: touch;
  color-scheme: dark;
}

.ps-sk-pdf-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 10px 8px 12px;
  border-bottom: 1px solid var(--ps-sk-border);
  flex-shrink: 0;
}

.ps-sk-pdf-modal__body {
  padding: 10px 12px 12px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.ps-sk-pdf-modal__close {
  position: static;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--ps-sk-muted);
  padding: 0;
  margin: 0;
}

.ps-sk-pdf-modal__close:hover {
  color: var(--ps-sk-gold);
}

.ps-sk-pdf-modal__title {
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--ps-sk-gold);
  font-weight: 600;
  flex: 1 1 auto;
  min-width: 0;
}

.ps-sk-pdf-modal__section {
  margin-bottom: 10px;
}

.ps-sk-pdf-modal__section--preise {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ps-sk-border);
  border-radius: 6px;
}

.ps-sk-pdf-modal__section--preise h3 {
  margin: 0 0 4px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ps-sk-gold-dim);
}

.ps-sk-pdf-kategorien {
  margin: 0;
}

.ps-sk-pdf-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(52vh, 320px);
  overflow-y: auto;
  border: 1px solid var(--ps-sk-border);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
}

.ps-sk-pdf-list__item {
  border-bottom: 1px solid rgba(201, 169, 110, 0.12);
}

.ps-sk-pdf-list__item:last-child {
  border-bottom: 0;
}

.ps-sk-pdf-list__item--all {
  background: rgba(201, 169, 110, 0.1);
}

.ps-sk-pdf-list__item[data-ps-sk-pdf-row] {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  margin: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  color: var(--ps-sk-text) !important;
}

.ps-sk-pdf-list__item--all[data-ps-sk-pdf-row] {
  font-weight: 600;
  color: var(--ps-sk-gold) !important;
}

.ps-sk-pdf-list__item[data-ps-sk-pdf-row]:hover {
  background: rgba(201, 169, 110, 0.08);
}

.ps-sk-pdf-box {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1px solid var(--ps-sk-gold);
  border-radius: 2px;
  box-sizing: border-box;
  position: relative;
  background: transparent;
}

.ps-sk-pdf-list__item.is-selected .ps-sk-pdf-box {
  background: var(--ps-sk-gold);
}

.ps-sk-pdf-list__item.is-selected .ps-sk-pdf-box::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #141210;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ps-sk-pdf-label {
  flex: 1 1 auto;
  font-size: 0.8rem;
  line-height: 1.2;
  color: var(--ps-sk-text) !important;
}

.ps-sk-pdf-list__item--all .ps-sk-pdf-label {
  color: var(--ps-sk-gold) !important;
}

.ps-sk-pdf-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 10px;
  min-height: 0;
  font-size: 0.8rem;
  line-height: 1.2;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  color: var(--ps-sk-text) !important;
}

.ps-sk-pdf-check span {
  color: var(--ps-sk-text) !important;
  flex: 1 1 auto;
}

.ps-sk-pdf-list__item--all .ps-sk-pdf-check {
  font-weight: 600;
  color: var(--ps-sk-gold) !important;
}

.ps-sk-pdf-list__item--all .ps-sk-pdf-check span {
  color: var(--ps-sk-gold) !important;
}

.ps-sk-pdf-check:hover {
  background: rgba(201, 169, 110, 0.08);
}

.ps-sk-pdf-check input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  cursor: pointer;
  pointer-events: auto;
  accent-color: var(--ps-sk-gold);
  position: relative;
  z-index: 2;
}

.ps-sk-pdf-email {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--ps-sk-border) !important;
  border-radius: 6px;
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--ps-sk-text) !important;
  -webkit-text-fill-color: var(--ps-sk-text);
  box-sizing: border-box;
}

.ps-sk-pdf-email::placeholder {
  color: var(--ps-sk-muted) !important;
  -webkit-text-fill-color: var(--ps-sk-muted);
  opacity: 1;
}

.ps-sk-pdf-email:focus {
  outline: none;
  border-color: var(--ps-sk-gold) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.ps-sk-pdf-loading {
  margin: 0;
  padding: 12px;
  color: var(--ps-sk-muted);
  font-size: 0.84rem;
  text-align: center;
}

.ps-sk-pdf-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.ps-sk-pdf-modal__actions--icons {
  flex-direction: row;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 0;
}

.ps-sk-pdf-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid var(--ps-sk-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ps-sk-pdf-icon-btn:hover,
.ps-sk-pdf-icon-btn:focus-visible {
  outline: none;
  border-color: var(--ps-sk-gold);
  background: rgba(201, 169, 110, 0.12);
}

.ps-sk-pdf-icon-btn--primary {
  background: linear-gradient(180deg, rgba(201, 169, 110, 0.95) 0%, rgba(140, 110, 55, 0.98) 100%);
  border-color: rgba(201, 169, 110, 0.85);
}

.ps-sk-pdf-icon-btn--primary:hover,
.ps-sk-pdf-icon-btn--primary:focus-visible {
  background: linear-gradient(180deg, rgba(212, 184, 130, 1) 0%, rgba(155, 120, 65, 1) 100%);
}

.ps-sk-pdf-icon {
  display: block;
  width: 22px;
  height: 22px;
  background: no-repeat center / contain;
}

.ps-sk-pdf-icon--download {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 3v10m0 0l4-4m-4 4L8 9' stroke='%23f5f0e8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2' stroke='%23c9a96e' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.ps-sk-pdf-icon-btn--primary .ps-sk-pdf-icon--download {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 3v10m0 0l4-4m-4 4L8 9' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.ps-sk-pdf-icon--email {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4 6h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z' stroke='%23c9a96e' stroke-width='1.6'/%3E%3Cpath d='m4 7 8 6 8-6' stroke='%23f5f0e8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.ps-sk-pdf-icon-btn.is-busy {
  opacity: 0.55;
  pointer-events: none;
}

.ps-sk-pdf-progress {
  display: none;
  width: min(180px, 72%);
  height: 3px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: rgba(143, 212, 160, 0.18);
  overflow: hidden;
}

.ps-sk-pdf-progress.is-active {
  display: block;
}

.ps-sk-pdf-progress__rider {
  width: 42%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(143, 212, 160, 0.15), #8fd4a0 45%, rgba(143, 212, 160, 0.15));
  animation: ps-sk-pdf-rider 1.05s ease-in-out infinite alternate;
}

@keyframes ps-sk-pdf-rider {
  from { transform: translateX(-8%); }
  to { transform: translateX(240%); }
}

.ps-sk-pdf-btn-check {
  display: none;
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #4caf6a;
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  font-weight: 700;
  box-shadow: 0 0 0 2px var(--ps-sk-bg, #1a1a1a);
}

.ps-sk-pdf-icon-btn.is-ok .ps-sk-pdf-btn-check {
  display: block;
}

.ps-sk-pdf-msg {
  min-height: 0;
  margin: 0;
  font-size: 1.1rem;
  color: var(--ps-sk-muted);
  line-height: 1;
  text-align: center;
}

.ps-sk-pdf-msg:not(:empty) {
  min-height: 1.4em;
  margin-top: 10px;
}

.ps-sk-pdf-msg--ok { color: #8fd4a0; }
.ps-sk-pdf-msg--error { color: #f0a0a8; font-size: 1.1rem; }

.ps-sk-pdf-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.ps-sk-pdf-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  min-height: 44px;
  border: 1px solid var(--ps-sk-border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ps-sk-text);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
}

.ps-sk-pdf-btn:hover {
  border-color: var(--ps-sk-gold);
  background: rgba(201, 169, 110, 0.12);
}

.ps-sk-pdf-btn--primary {
  background: linear-gradient(180deg, rgba(201, 169, 110, 0.95) 0%, rgba(140, 110, 55, 0.98) 100%);
  border-color: rgba(201, 169, 110, 0.85);
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.ps-sk-pdf-btn--primary:hover {
  background: linear-gradient(180deg, rgba(212, 184, 130, 1) 0%, rgba(155, 120, 65, 1) 100%);
}

body.ps-sk-pdf-open {
  overflow: hidden;
}

.ps-sk-pdf-empty {
  margin: 0;
  padding: 10px;
  color: var(--ps-sk-muted);
  font-size: 0.84rem;
}

@media (max-width: 767px) {
  .ps-sk-pdf-modal__body {
    padding: 10px;
  }
}
