/* Aangekochte deals — index.html?purchases=1 */

body.ikash-purchases-page-active {
  background: #eef1f6;
}

body.ikash-purchases-page-active .city-banner,
body.ikash-purchases-page-active .categories-wrapper,
body.ikash-purchases-page-active .sort-bar,
body.ikash-purchases-page-active #deals,
body.ikash-purchases-page-active .ikash-trust-bar--desktop,
body.ikash-purchases-page-active .ikash-site-footer--desktop-only {
  display: none !important;
}

body.ikash-purchases-page-active .ikash-mobiel-app .mobiel-chips-wrap,
body.ikash-purchases-page-active .ikash-mobiel-app .sort-bar--mobiel,
body.ikash-purchases-page-active .ikash-mobiel-app #mobiel-deals-list {
  display: none !important;
}

.ikash-purchases-page {
  --ik-purchases-max: 1440px;
  max-width: min(var(--ik-purchases-max), calc(100vw - 2 * var(--ik-content-pad, 16px)));
  margin: 0 auto;
  padding: 28px clamp(12px, 1.5vw, 20px) 48px;
}

.ikash-purchases-layout {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.ikash-purchases-inner {
  flex: 1 1 0;
  min-width: 0;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(35, 34, 59, 0.08);
  box-shadow: 0 8px 32px rgba(35, 34, 59, 0.06);
  overflow: clip;
}

body.ikash-purchase-detail-open .ikash-purchases-page {
  --ik-purchases-max: 1760px;
}

body.ikash-purchase-detail-open .ikash-purchases-inner {
  flex: 1 1 auto;
  min-width: min(100%, 640px);
}

.ikash-purchase-detail {
  flex: 0 0 400px;
  width: 400px;
  max-width: min(400px, calc(100vw - 2 * var(--ik-content-pad, 16px) - 24px));
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(35, 34, 59, 0.08);
  box-shadow: 0 8px 32px rgba(35, 34, 59, 0.08);
  padding: 18px 18px 20px;
  position: sticky;
  top: calc(var(--ik-header-height, 64px) + 16px);
  max-height: calc(100vh - var(--ik-header-height, 64px) - 32px);
  overflow-y: auto;
  box-sizing: border-box;
}

.ikash-purchase-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.ikash-purchase-detail-heading {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #1e1b4b;
}

.ikash-purchase-detail-close {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.ikash-purchase-detail-top {
  margin-bottom: 16px;
}

.ikash-purchase-detail-title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: #1e1b4b;
  line-height: 1.35;
}

.ikash-purchase-detail-qr-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ikash-purchase-detail-qr {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 220px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid rgba(35, 34, 59, 0.08);
  border-radius: 12px;
  background: #fafbfd;
}

.ikash-purchase-detail-qr img,
.ikash-purchase-detail-qr canvas {
  display: block;
}

.ikash-purchase-detail-qr--disabled {
  min-height: 120px;
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
  text-align: center;
  padding: 20px 16px;
  background: #f8fafc;
  border-style: dashed;
}

.ikash-purchase-detail-meta {
  margin: 0 0 16px;
  padding: 0;
}

.ikash-purchase-detail-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  column-gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(35, 34, 59, 0.06);
}

.ikash-purchase-detail-row:last-child {
  border-bottom: none;
}

.ikash-purchase-detail-row dt {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  line-height: 1.35;
}

.ikash-purchase-detail-row dd {
  margin: 0;
  font-size: 13px;
  color: #1e1b4b;
  font-weight: 600;
  text-align: right;
  min-width: 0;
  line-height: 1.4;
}

#ikash-purchase-detail-voucher {
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.ikash-purchase-detail-merchant-city {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

.ikash-purchase-detail-hint {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid rgba(234, 88, 12, 0.15);
  color: #9a3412;
}

.ikash-purchase-detail-hint i {
  margin-top: 2px;
  color: #ea580c;
}

.ikash-purchase-detail-hint p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.ikash-purchase-detail-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 16px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(220, 38, 38, 0.25);
  background: #fff;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ikash-purchase-detail-remove:hover:not(:disabled) {
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.45);
}

.ikash-purchase-detail-remove:disabled {
  opacity: 0.6;
  cursor: wait;
}

.mijn-ikash-icon-btn--danger {
  color: #b91c1c;
}

.mijn-ikash-icon-btn--danger:hover {
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.25);
  color: #991b1b;
}

.ikash-purchases-table tr.is-selected {
  --mijn-purchase-row-bg: rgba(188, 105, 0, 0.1);
  --mijn-purchase-row-border: rgba(188, 105, 0, 0.22);
}

body.ikash-purchase-detail-open .ikash-purchases-table tr.is-selected {
  --mijn-purchase-row-bg: rgba(188, 105, 0, 0.12);
  --mijn-purchase-row-border: rgba(188, 105, 0, 0.26);
}

.ikash-purchases-table tr.is-selected:hover {
  --mijn-purchase-row-bg: rgba(188, 105, 0, 0.14);
  --mijn-purchase-row-border: rgba(188, 105, 0, 0.28);
}

body.ikash-purchase-detail-open .ikash-purchases-table tr.is-selected:hover {
  --mijn-purchase-row-bg: rgba(188, 105, 0, 0.16);
  --mijn-purchase-row-border: rgba(188, 105, 0, 0.3);
}

.ikash-purchases-table tr.is-selected td {
  background-color: var(--mijn-purchase-row-bg);
  border-bottom-color: var(--mijn-purchase-row-border);
}

.ikash-purchases-table tr.is-selected td:first-child {
  box-shadow: inset 4px 0 0 #bc6900;
}

.ikash-purchases-table tr.is-selected .mijn-ikash-icon-btn--nav {
  background: rgba(188, 105, 0, 0.14);
  border-color: rgba(188, 105, 0, 0.35);
  color: #9a5400;
}

.ikash-purchases-intro {
  margin-bottom: 18px;
}

.ikash-purchases-title {
  margin: 0 0 6px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: #1e1b4b;
  letter-spacing: -0.02em;
}

.ikash-purchases-lead {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.45;
}

.mijn-purchases-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 18px clamp(16px, 3vw, 24px);
  border-bottom: 1px solid rgba(35, 34, 59, 0.08);
  background: #fff;
}

.mijn-purchases-toolbar-row2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.mijn-purchases-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mijn-purchases-filter {
  border: 1px solid rgba(35, 34, 59, 0.12);
  background: #fff;
  color: #475569;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mijn-purchases-filter:hover {
  border-color: rgba(188, 105, 0, 0.35);
  color: #9b5600;
}

.mijn-purchases-filter.is-active {
  background: linear-gradient(to bottom, #e8950a, #bc6900);
  border-color: transparent;
  color: #fff;
}

.mijn-purchases-search-wrap {
  flex: 1 1 220px;
  min-width: min(100%, 220px);
  position: relative;
}

.mijn-purchases-search-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.mijn-purchases-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(35, 34, 59, 0.12);
  border-radius: 10px;
  padding: 10px 12px 10px 36px;
  font-size: 14px;
  background: #fff;
}

.mijn-purchases-search:focus {
  outline: 2px solid rgba(188, 105, 0, 0.35);
  border-color: #bc6900;
}

.mijn-purchases-sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.mijn-purchases-sort-wrap label {
  font-size: 13px;
  color: #64748b;
  white-space: nowrap;
}

.mijn-purchases-sort {
  border: 1px solid rgba(35, 34, 59, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  background: #fff;
}

.mijn-purchases-root {
  padding: 0 clamp(8px, 2vw, 16px) 8px;
}

.mijn-purchases-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px clamp(16px, 3vw, 24px) 18px;
  border-top: 1px solid rgba(35, 34, 59, 0.08);
  background: #fff;
  font-size: 13px;
  color: #64748b;
}

.mijn-purchases-pager {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mijn-purchases-pager-btn,
.mijn-purchases-page-num {
  border: 1px solid rgba(35, 34, 59, 0.12);
  background: #fff;
  border-radius: 8px;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  cursor: pointer;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.mijn-purchases-pager-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mijn-purchases-page-num.is-active {
  background: #23223b;
  border-color: #23223b;
  color: #fff;
}

.mijn-ikash-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(35, 34, 59, 0.08);
  background: #fff;
  margin: 8px clamp(10px, 1.2vw, 16px);
  -webkit-overflow-scrolling: touch;
}

.mijn-ikash-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 13px;
}

.mijn-ikash-table.ikash-purchases-table {
  border-collapse: separate;
  border-spacing: 0;
}

.mijn-ikash-table.ikash-purchases-table th,
.mijn-ikash-table.ikash-purchases-table td {
  padding: 12px 14px;
}

.mijn-ikash-table th,
.mijn-ikash-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(35, 34, 59, 0.08);
  vertical-align: middle;
}

.mijn-ikash-table th {
  font-weight: 700;
  color: #475569;
  background: #fafbfd;
  white-space: nowrap;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mijn-ikash-table.ikash-purchases-table th {
  text-transform: none;
  letter-spacing: normal;
  font-size: 13px;
}

.mijn-ikash-table tr:last-child td {
  border-bottom: none;
}

.mijn-ikash-table.ikash-purchases-table tr:last-child td {
  border-bottom: 1px solid rgba(35, 34, 59, 0.08);
}

.mijn-ikash-table.ikash-purchases-table tr:last-child.is-selected td {
  border-bottom-color: var(--mijn-purchase-row-border, rgba(188, 105, 0, 0.22));
}

.mijn-ikash-table tbody tr:hover {
  background: rgba(248, 250, 252, 0.65);
}

.mijn-ikash-table.ikash-purchases-table tbody tr:hover td {
  background: rgba(248, 250, 252, 0.65);
}

.mijn-ikash-table.ikash-purchases-table tbody tr.is-selected:hover td {
  background-color: var(--mijn-purchase-row-bg);
}

.mijn-purchase-deal-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 160px;
  min-height: 72px;
}

.mijn-purchase-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e8ecf4, #dce4f0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 16px;
  overflow: hidden;
}

.mijn-purchase-thumb--photo {
  background: #e8ecf4;
}

.mijn-purchase-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.mijn-purchase-deal-title {
  font-weight: 700;
  color: #1e1b4b;
  line-height: 1.3;
}

.mijn-purchase-deal-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.mijn-purchase-category {
  display: inline-block;
  margin-top: 0;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  line-height: 1.3;
}

.mijn-purchase-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mijn-purchase-stack-main {
  color: #334155;
  font-weight: 500;
  line-height: 1.35;
}

.mijn-purchase-stack-sub {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.mijn-ikash-table-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mijn-purchase-price-old {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  text-decoration: line-through;
}

.mijn-purchase-price-paid {
  display: block;
  font-weight: 800;
  color: #1e1b4b;
}

.mijn-purchase-voucher {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 12px;
  color: #475569;
  background: #f1f5f9;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.mijn-purchase-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.mijn-purchase-badge--active {
  background: #dcfce7;
  color: #166534;
}

.mijn-purchase-badge--redeemed {
  background: #dbeafe;
  color: #1d4ed8;
}

.mijn-purchase-badge--refund-pending {
  background: #fee2e2;
  color: #b91c1c;
}

.mijn-purchase-badge--refund-done {
  background: #f1f5f9;
  color: #475569;
}

.mijn-ikash-table.ikash-purchases-table tbody tr {
  height: 1px;
}

.mijn-ikash-table.ikash-purchases-table td.mijn-ikash-table-actions {
  display: table-cell;
  vertical-align: middle;
  text-align: right;
  white-space: nowrap;
  min-width: 96px;
  height: 100%;
  box-sizing: border-box;
}

.mijn-ikash-table.ikash-purchases-table td.mijn-ikash-table-actions .mijn-ikash-icon-btn {
  vertical-align: middle;
}

.mijn-ikash-table.ikash-purchases-table td.mijn-ikash-table-actions .mijn-ikash-icon-btn + .mijn-ikash-icon-btn {
  margin-left: 6px;
}

.mijn-ikash-table-actions {
  white-space: nowrap;
  min-width: 96px;
}

@media (min-width: 901px) {
  .mijn-ikash-table.ikash-purchases-table th:last-child,
  .mijn-ikash-table.ikash-purchases-table td.mijn-ikash-table-actions {
    position: sticky;
    right: 0;
    z-index: 2;
    background-color: #fff;
    box-shadow: inset 1px 0 0 rgba(35, 34, 59, 0.08);
  }

  .mijn-ikash-table.ikash-purchases-table th:last-child {
    background-color: #fafbfd;
    z-index: 3;
  }

  .mijn-ikash-table.ikash-purchases-table tr.is-selected td.mijn-ikash-table-actions {
    background-color: var(--mijn-purchase-row-bg);
    box-shadow: inset 1px 0 0 rgba(188, 105, 0, 0.18);
  }

  .mijn-ikash-table.ikash-purchases-table tbody tr:hover td.mijn-ikash-table-actions {
    background-color: rgba(248, 250, 252, 0.95);
  }

  .mijn-ikash-table.ikash-purchases-table tbody tr.is-selected:hover td.mijn-ikash-table-actions {
    background-color: var(--mijn-purchase-row-bg);
  }
}

.mijn-ikash-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(35, 34, 59, 0.12);
  background: #fff;
  color: #bc6900;
  cursor: pointer;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.mijn-ikash-icon-btn:hover {
  background: rgba(188, 105, 0, 0.1);
}

.mijn-ikash-icon-btn--nav {
  color: #64748b;
}

.mijn-ikash-empty {
  margin: 24px clamp(16px, 3vw, 24px);
  padding: 28px 20px;
  text-align: center;
  color: #64748b;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed rgba(35, 34, 59, 0.15);
}

/* QR-modal (gedeeld met Mijn iKash) */
.mijn-ikash-qr-modal[hidden] {
  display: none !important;
}

.mijn-ikash-qr-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mijn-ikash-qr-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.mijn-ikash-qr-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 380px);
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.mijn-ikash-qr-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: #64748b;
}

.mijn-ikash-qr-heading {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: #1e1b4b;
}

.mijn-ikash-qr-deal-title {
  margin: 0 0 16px;
  color: #64748b;
  font-size: 0.92rem;
}

.mijn-ikash-qr-root {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.mijn-ikash-qr-hint {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  text-align: center;
}

.mijn-ikash-qr-link {
  display: block;
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  color: #bc6900;
}

@media (max-width: 900px) {
  body.ikash-purchases-page-active .ikash-mobiel-app {
    display: none !important;
  }

  body.ikash-purchases-page-active .ikash-desktop-shell {
    position: relative !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    white-space: normal !important;
    border: 0 !important;
    pointer-events: auto !important;
  }

  .mijn-ikash-table.ikash-purchases-table td::before {
    text-transform: none;
    letter-spacing: normal;
  }

  .mijn-ikash-table thead {
    display: none;
  }

  .mijn-ikash-table,
  .mijn-ikash-table tbody,
  .mijn-ikash-table tr,
  .mijn-ikash-table td {
    display: block;
    width: 100%;
  }

  .mijn-ikash-table tr {
    margin: 12px 0;
    border: 1px solid rgba(35, 34, 59, 0.1);
    border-radius: 12px;
    padding: 4px 0;
    background: #fff;
  }

  .mijn-ikash-table td {
    border: none;
    padding: 8px 14px;
  }

  .mijn-ikash-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    margin-bottom: 4px;
  }

  .mijn-ikash-table-actions {
    justify-content: flex-start;
    padding-top: 4px;
  }

  .ikash-purchases-layout {
    flex-direction: column;
  }

  body.ikash-purchase-detail-open .ikash-purchases-inner {
    flex-basis: auto;
  }

  .ikash-purchase-detail {
    position: fixed;
    inset: 0;
    top: var(--ik-header-height, 64px);
    width: 100%;
    max-width: none;
    flex: none;
    border-radius: 0;
    z-index: 500;
    max-height: none;
  }
}
