/**
 * Receipt/Thank You Page Styles
 * 
 * @package TripManagement
 */

/* Receipt Container */
.trip-receipt {
  max-width: 800px;
  margin: 40px auto;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Receipt Header */
.trip-receipt__header {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 40px 30px;
  text-align: center;
}

/* Receipt Logo */
.trip-receipt__logo {
  margin-bottom: 20px;
}

.trip-receipt__logo a {
  display: inline-block;
  text-decoration: none;
}

.trip-receipt__logo-img {
  max-height: 60px;
  max-width: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  /* White filter so logos with dark colors remain visible on coloured header backgrounds */
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

/* Icon-sized logo (site icon fallback) */
.trip-receipt__logo-img--icon {
  max-height: 64px;
  max-width: 64px;
  border-radius: 8px;
  filter: none;
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
  padding: 6px;
}

.trip-receipt__header--pending {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.trip-receipt__header h1 {
  margin: 0 0 10px 0;
  font-size: 32px;
  font-weight: bold;
}

.trip-receipt__status-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Receipt Content */
.trip-receipt__content {
  padding: 40px 30px;
}

.trip-receipt__section {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 2px solid #e5e7eb;
}

.trip-receipt__section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.trip-receipt__section-title {
  font-size: 20px;
  font-weight: bold;
  color: #1f2937;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.trip-receipt__section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 24px;
  background: #f2bc02;
  border-radius: 2px;
}

/* Detail Rows */
.trip-receipt__detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 15px 0;
  border-bottom: 1px solid #f3f4f6;
}

.trip-receipt__detail-row:last-child {
  border-bottom: none;
}

.trip-receipt__detail-label {
  font-weight: 600;
  color: #6b7280;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trip-receipt__detail-value {
  font-weight: 500;
  color: #111827;
  font-size: 16px;
  text-align: right;
}

.trip-receipt__detail-value--large {
  font-size: 24px;
  font-weight: bold;
  color: #10b981;
}

.trip-receipt__detail-value--confirmed {
  color: #10b981;
  font-weight: bold;
}

.trip-receipt__detail-value--pending {
  color: #f59e0b;
  font-weight: bold;
}

.trip-receipt__detail-value--partially_paid {
  color: #f59e0b;
  font-weight: bold;
}

/* Payment Info Box */
.trip-receipt__payment-box {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 20px;
  border-radius: 8px;
  margin-top: 20px;
}

.trip-receipt__payment-box--success {
  background: #d1fae5;
  border-left-color: #10b981;
}

.trip-receipt__transaction-id {
  font-family: "Courier New", monospace;
  background: rgba(0, 0, 0, 0.05);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
}

/* Success Message */
.trip-receipt__success-message {
  background: #d1fae5;
  border: 2px solid #10b981;
  color: #065f46;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  text-align: center;
  font-size: 16px;
  line-height: 1.6;
}

.trip-receipt__success-message strong {
  display: block;
  font-size: 18px;
  margin-bottom: 10px;
}

/* Actions */
.trip-receipt__actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.trip-receipt__button {
  flex: 1;
  min-width: 200px;
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.trip-receipt__button--primary {
  background: #f2bc02;
  color: #1f2937;
}

.trip-receipt__button--primary:hover {
  background: #d9a502;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(242, 188, 2, 0.3);
}

.trip-receipt__button--secondary {
  background: #ffffff;
  color: #1f2937;
  border: 2px solid #e5e7eb;
}

.trip-receipt__button--secondary:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

/* Print Styles */
@media print {
  @page {
    margin: 0;
  }

  /* ---- 1. Remove theme chrome from the layout entirely ---- */
  #masthead,
  .site-header,
  .kadence-header-wrap,
  .header-wrap,
  .site-footer,
  #colophon,
  #wpadminbar,
  .kadence-breadcrumbs,
  nav,
  .nav-container-inner,
  .lubinus-alert-banner,
  .trip-thankyou__actions,
  .trip-thankyou__next-steps,
  .trip-receipt__actions {
    display: none !important;
  }

  /* ---- 2. Reset layout wrappers so they add no space ---- */
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .content-wrap,
  #primary,
  #main,
  .site-main,
  .entry-content-wrap,
  .content-container,
  .wp-site-blocks {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* ---- 3. Let the booking card fill the page and paginate naturally ---- */
  .trip-thankyou,
  .trip-receipt {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  /* ---- 4. Preserve background colours ---- */
  .trip-receipt__header {
    background: #10b981 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .trip-thankyou__header {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .trip-receipt__payment-box,
  .trip-receipt__success-message,
  .trip-thankyou__alert {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ---- 5. Avoid awkward mid-element page breaks ---- */
  .trip-thankyou__header,
  .trip-thankyou__section,
  .trip-thankyou__row,
  .trip-receipt__header,
  .trip-receipt__detail-row {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .trip-receipt {
    margin: 20px;
    border-radius: 8px;
  }

  .trip-receipt__header {
    padding: 30px 20px;
  }

  .trip-receipt__header h1 {
    font-size: 24px;
  }

  .trip-receipt__content {
    padding: 30px 20px;
  }

  .trip-receipt__detail-row {
    flex-direction: column;
    gap: 5px;
  }

  .trip-receipt__detail-value {
    text-align: left;
  }

  .trip-receipt__actions {
    flex-direction: column;
  }

  .trip-receipt__button {
    width: 100%;
  }
}

/* ==========================================================
   Thank You Page Styles (.trip-thankyou)
   ========================================================== */

.trip-thankyou {
  max-width: 720px;
  margin: 40px auto;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* --- Header --- */
.trip-thankyou__header {
  background: linear-gradient(135deg, #f2bc02 0%, #d9a502 100%);
  color: #1f2937;
  padding: 44px 32px 10px 32px;
  text-align: center;
}

/* --- Logo in header --- */
.trip-thankyou__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.trip-thankyou__logo a,
.trip-thankyou__logo .custom-logo-link {
  display: inline-block;
  text-decoration: none;
  line-height: 0;
  pointer-events: none;
  cursor: default;
}
/* Image container */
.trip-thankyou__logo-image {
  flex-shrink: 0;
  line-height: 0;
}
/* Target both get_custom_logo() output (.custom-logo) and manual img */
.trip-thankyou__logo-image .custom-logo,
.trip-thankyou__logo-image img {
  max-height: 56px;
  max-width: 160px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
/* Pending/yellow header — natural colours */
.trip-thankyou__header--pending .trip-thankyou__logo-image .custom-logo,
.trip-thankyou__header--pending .trip-thankyou__logo-image img {
  filter: none;
  opacity: 1;
}
/* Site-icon (small square) */
.trip-thankyou__logo-img--icon {
  max-height: 56px !important;
  max-width: 56px !important;
  border-radius: 10px;
  filter: none !important;
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.18);
  padding: 6px;
}
/* Text identity block (name + tagline) */
.trip-thankyou__logo-identity {
  text-align: left;
}
.trip-thankyou__logo-text {
  display: block;
  font-size: 24px;
  letter-spacing: 0.02em;
  color: #000;
  opacity: 1;
  line-height: 1.2;
}
.trip-thankyou__header--pending .trip-thankyou__logo-text {
  color: #000;
  opacity: 1;
}
/* Tagline */
.trip-thankyou__tagline {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: rgba(0, 0, 0, 0.65);
  line-height: 1.4;
}
.trip-thankyou__header--pending .trip-thankyou__tagline {
  color: rgba(0, 0, 0, 0.65);
}

.trip-thankyou__header--confirmed {
  /* background: linear-gradient(135deg, #10b981 0%, #059669 100%); */
  background: none;
  color: #fff;
}

.trip-thankyou__header--partial {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
}

.trip-thankyou__header--pending {
  /* background: linear-gradient(135deg, #f2bc02 0%, #d9a502 100%); */
  background: none;
  color: #1f2937;
}

.trip-thankyou__header--cancelled {
  /* background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); */
  background: none;
  color: #fff;
}

.trip-thankyou__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: transparent;
  border: 4px solid #000;
  font-size: 34px;
  line-height: 1;
  margin-bottom: 16px;
  color: #000;
}

.trip-thankyou__title {
  margin: 0 0 14px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: #000;
}

.trip-thankyou__badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(0, 0, 0, 0.15);
  color: #000;
}

.trip-thankyou__badge--confirmed {
  /* background: rgba(0, 0, 0, 0.15); */
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
}
.trip-thankyou__badge--pending {
  /* background: rgba(0, 0, 0, 0.12); */
  background: linear-gradient(135deg, #f2bc02 0%, #d9a502 100%);
  color: #fff;
}
.trip-thankyou__badge--partial {
  background: rgba(0, 0, 0, 0.15);
  color: #000;
}
.trip-thankyou__badge--cancelled {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #000;
}

/* --- Body --- */
.trip-thankyou__body {
  padding: 36px 32px;
}

/* --- Alert banners --- */
.trip-thankyou__alert {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 8px;
  margin-bottom: 28px;
  border-left: 4px solid;
}

.trip-thankyou__alert--success {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.trip-thankyou__alert--info {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #78350f;
}

.trip-thankyou__alert--partial {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1e3a8a;
}

.trip-thankyou__alert--error {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

.trip-thankyou__alert-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.trip-thankyou__alert-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
  line-height: 1.55;
}

.trip-thankyou__alert-text strong {
  font-size: 16px;
  font-weight: 700;
}

/* --- Trip summary card --- */
.trip-thankyou__summary-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 28px;
}

.trip-thankyou__trip-name {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}

.trip-thankyou__trip-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #9ca3af;
}

.trip-thankyou__trip-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
}

.trip-thankyou__meta-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #4b5563;
}

.trip-thankyou__meta-row strong {
  color: #1f2937;
}

/* --- Sections --- */
.trip-thankyou__section {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid #e5e7eb;
}

.trip-thankyou__section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.trip-thankyou__section-title {
  font-size: 17px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.trip-thankyou__section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 20px;
  background: #f2bc02;
  border-radius: 2px;
}

/* --- DL breakdown --- */
.trip-thankyou__dl {
  margin: 0;
  padding: 0;
  list-style: none;
}

.trip-thankyou__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 15px;
}

.trip-thankyou__row:last-child {
  border-bottom: none;
}

.trip-thankyou__row dt {
  font-weight: 500;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.trip-thankyou__row dd {
  font-weight: 500;
  color: #111827;
  text-align: right;
  margin: 0;
}

/* Sub-heading row */
.trip-thankyou__row--subheading {
  padding: 8px 0 4px;
  border-bottom: none;
}
.trip-thankyou__row--subheading dt {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
}

/* Add-on row */
.trip-thankyou__row--addon {
  padding-left: 12px;
  background: #fafafa;
}

.trip-thankyou__addon-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #e0e7ff;
  color: #3730a3;
  padding: 2px 7px;
  border-radius: 4px;
}

/* Coupon discount row */
.trip-thankyou__row--discount dt {
  color: #059669;
}

.trip-thankyou__coupon-code {
  display: inline-block;
  font-family: "Courier New", monospace;
  font-size: 13px;
  font-weight: 700;
  background: #d1fae5;
  color: #065f46;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px dashed #6ee7b7;
}

.trip-thankyou__discount-amount {
  color: #059669 !important;
  font-weight: 700 !important;
}

/* Total row */
.trip-thankyou__row--total {
  border-top: 2px solid #e5e7eb;
  margin-top: 4px;
  padding-top: 14px;
  border-bottom: none;
}

.trip-thankyou__row--total dt {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.trip-thankyou__total {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

/* Due row */
.trip-thankyou__row--due dt {
  font-weight: 700;
  color: #1f2937;
}

.trip-thankyou__amount-due {
  font-size: 18px;
  font-weight: 700;
  color: #f2bc02;
}

.trip-thankyou__paid {
  color: #10b981;
  font-weight: 600;
}
.trip-thankyou__remaining {
  color: #f59e0b;
  font-weight: 600;
}

.trip-thankyou__txn-id {
  font-family: "Courier New", monospace;
  font-size: 13px;
  background: #f3f4f6;
  padding: 3px 8px;
  border-radius: 4px;
}

/* --- What Happens Next steps --- */
.trip-thankyou__next-steps {
  background: #fffbf0;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 22px 24px;
}

.trip-thankyou__steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.trip-thankyou__steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15px;
  color: #374151;
  line-height: 1.5;
}

.trip-thankyou__step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f2bc02;
  color: #1f2937;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Action buttons --- */
.trip-thankyou__actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.trip-thankyou__btn {
  flex: 1;
  min-width: 180px;
  padding: 14px 26px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: none;
}

.trip-thankyou__btn--primary {
  background: #f2bc02;
  color: #1f2937;
}

.trip-thankyou__btn--primary:hover {
  background: #d9a502;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(242, 188, 2, 0.35);
  color: #000 !important;
  text-decoration: none;
}

.trip-thankyou__btn--secondary {
  background: #fff;
  color: #374151;
  border: 2px solid #e5e7eb;
}

.trip-thankyou__btn--secondary:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  color: #111827;
  text-decoration: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .trip-thankyou {
    margin: 16px;
    border-radius: 8px;
  }

  .trip-thankyou__header {
    padding: 32px 20px 28px;
  }
  .trip-thankyou__title {
    font-size: 22px;
  }
  .trip-thankyou__body {
    padding: 24px 18px;
  }

  .trip-thankyou__meta-row {
    gap: 12px;
  }

  .trip-thankyou__row {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }

  .trip-thankyou__row dd {
    text-align: left;
  }

  .trip-thankyou__actions {
    flex-direction: column;
  }
  .trip-thankyou__btn {
    width: 100%;
  }
}
