/* =========================================================
   APPOINTMENT CONFIRMATION / INVOICE
   ========================================================= */

.appointment-confirmation {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* =========================================================
   PAGE HEADER
   Center title + right Continue button
   ========================================================= */

.card-header-row {
  position: relative;

  display: grid;
  grid-template-columns: 1fr auto 1fr;

  align-items: center;

  width: 100%;
  min-height: 85px;

  margin-bottom: 28px;
}

/* =========================================================
   CENTER HEADER
   ========================================================= */

.card-header-custom {
  grid-column: 2;

  display: flex;
  align-items: flex-start;
  justify-content: center;

  gap: 12px;

  text-align: left;
}

.card-header-custom > i {
  flex-shrink: 0;

  margin-top: 5px;

  color: #6f00a8;

  font-size: 22px;
}

/* Header Text */

.card-header-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-header-content h4 {
  margin: 0;

  color: #243b63;

  font-size: 24px;
  font-weight: 700;

  line-height: 1.3;

  white-space: nowrap;
}

.card-header-content p {
  margin: 7px 0 0;

  color: #4f1977;

  font-size: 16px;
  font-weight: 400;

  line-height: 1.4;

  white-space: nowrap;
}

/* =========================================================
   CONTINUE BUTTON
   ========================================================= */

.card-header-row .continue-btn-d {
  grid-column: 3;

  justify-self: end;

  min-width: 150px;

  padding: 12px 22px;

  border: none;
  border-radius: 10px;

  font-size: 16px;
  font-weight: 600;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.card-header-row .continue-btn-d:hover {
  transform: translateY(-1px);

  box-shadow: 0 5px 15px rgba(79, 25, 119, 0.18);
}

.card-header-row .continue-btn-d:active {
  transform: translateY(0);
}

/* =========================================================
   MAIN INVOICE CARD
   ========================================================= */

.invoice-card {
  width: 100%;

  background: #ffffff;

  border: 1px solid #e1e7ef;

  border-radius: 16px;

  padding: 35px;

  box-shadow: 0 8px 25px rgba(36, 59, 99, 0.07);

  box-sizing: border-box;
}

/* =========================================================
   INVOICE HEADER
   ========================================================= */

.invoice-header {
  display: flex;

  align-items: flex-start;

  justify-content: space-between;

  gap: 40px;

  width: 100%;
}

/* =========================================================
   COMPANY INFORMATION
   ========================================================= */

.company-information {
  display: flex;

  flex-direction: column;

  align-items: flex-start;
}

.company-information h2 {
  margin: 0 0 6px;

  color: #243b63;

  font-size: 26px;
  font-weight: 700;

  line-height: 1.2;
}

.company-information p {
  margin: 2px 0;

  color: #64748b;

  font-size: 16px;

  line-height: 1.5;
}

.company-information .company-name {
  margin-bottom: 6px;

  color: #334155;

  font-weight: 600;
}

/* =========================================================
   INVOICE INFORMATION
   ========================================================= */

.invoice-information {
  min-width: 260px;

  text-align: right;
}

.invoice-label {
  margin-bottom: 12px;

  color: #243b63;

  font-size: 28px;

  font-weight: 800;

  letter-spacing: 1.5px;
}

.invoice-meta {
  display: flex;

  flex-direction: column;

  align-items: flex-end;

  gap: 7px;
}

.invoice-meta-row {
  display: flex;

  align-items: center;

  justify-content: flex-end;

  gap: 12px;

  font-size: 16px;
}

.invoice-meta-row span {
  color: #8a94a6;
}

.invoice-meta-row strong {
  color: #334155;

  font-weight: 600;
}

/* =========================================================
   PAID BADGE
   ========================================================= */

.invoice-paid {
  display: inline-flex;

  align-items: center;

  gap: 7px;

  margin-top: 7px;

  padding: 7px 13px;

  background: #e9f8ef;

  color: #15803d;

  border-radius: 20px;

  font-size: 16px;

  font-weight: 700;
}

.invoice-paid i {
  font-size: 16px;
}

/* =========================================================
   DIVIDER
   ========================================================= */

.invoice-divider {
  width: 100%;

  height: 1px;

  margin: 28px 0;

  background: #e5eaf0;
}

/* =========================================================
   SECTION
   ========================================================= */

.invoice-section {
  width: 100%;
}

.invoice-section-title {
  margin-bottom: 15px;

  color: #243b63;

  font-size: 17px;

  font-weight: 700;
}

/* =========================================================
   APPOINTMENT DETAILS
   ========================================================= */

.appointment-details {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 14px;

  width: 100%;
}

/* =========================================================
   APPOINTMENT DETAIL
   ========================================================= */

.appointment-detail {
  display: flex;

  align-items: center;

  gap: 13px;

  min-height: 72px;

  padding: 14px;

  background: #fafbfc;

  border: 1px solid #edf0f4;

  border-radius: 12px;

  box-sizing: border-box;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.appointment-detail:hover {
  background: #ffffff;

  border-color: #e2d6eb;

  box-shadow: 0 4px 12px rgba(36, 59, 99, 0.05);
}

.appointment-detail.full-width {
  grid-column: span 2;
}

/* =========================================================
   DETAIL ICON
   ========================================================= */

.detail-icon {
  width: 38px;
  height: 38px;

  flex-shrink: 0;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 10px;

  background: #f1e8f7;

  color: #6f00a8;

  font-size: 16px;
}

/* =========================================================
   DETAIL CONTENT
   ========================================================= */

.detail-content {
  display: flex;

  flex-direction: column;

  gap: 4px;

  min-width: 0;
}

.detail-label {
  color: #8a94a6;

  font-size: 16px;

  font-weight: 700;

  text-transform: uppercase;

  letter-spacing: 0.5px;

  line-height: 1.2;
}

.detail-content strong {
  color: #243b63;

  font-size: 16px;

  font-weight: 600;

  line-height: 1.4;

  word-break: break-word;
}

/* =========================================================
   PAYMENT LINE ITEM
   ========================================================= */

.invoice-payment {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 20px;

  margin-top: 25px;

  padding: 18px 20px;

  background: #fafbfc;

  border-top: 1px solid #e5eaf0;

  border-bottom: 1px solid #e5eaf0;
}

.payment-description {
  display: flex;

  flex-direction: column;

  gap: 4px;
}

.payment-title {
  color: #334155;

  font-size: 16px;

  font-weight: 600;
}

.payment-subtitle {
  color: #8a94a6;

  font-size: 16px;
}

.payment-price {
  color: #243b63;

  font-size: 17px;

  font-weight: 700;

  white-space: nowrap;
}

/* =========================================================
   TOTAL
   ========================================================= */

.invoice-total {
  display: flex;

  align-items: center;

  justify-content: flex-end;

  gap: 45px;

  padding: 20px 20px 5px;

  color: #334155;

  font-size: 16px;
}

.invoice-total strong {
  color: #4f1977;

  font-size: 24px;

  font-weight: 800;

  min-width: 120px;

  text-align: right;
}

/* =========================================================
   PAYMENT STATUS
   ========================================================= */

.payment-status-box {
  display: flex;

  align-items: center;

  gap: 12px;

  margin-top: 22px;

  padding: 15px;

  background: #f0faf4;

  border: 1px solid #d7f0df;

  border-radius: 11px;
}

.payment-status-icon {
  width: 35px;
  height: 35px;

  flex-shrink: 0;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #dff5e7;

  color: #15803d;

  font-size: 16px;
}

.payment-status-content strong {
  display: block;

  margin-bottom: 3px;

  color: #166534;

  font-size: 16px;
}

.payment-status-content p {
  margin: 0;

  color: #64748b;

  font-size: 16px;

  line-height: 1.5;
}

/* =========================================================
   NOTIFICATIONS
   ========================================================= */

.confirmation-notices {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 12px;

  margin-top: 20px;
}

.notice {
  display: flex;

  align-items: flex-start;

  gap: 12px;

  padding: 14px;

  border-radius: 11px;

  box-sizing: border-box;
}

.notice-sms {
  background: #f0f9ff;

  border: 1px solid #d7efff;
}

.notice-email {
  background: #f8f5ff;

  border: 1px solid #e9defb;
}

.notice-icon {
  width: 34px;
  height: 34px;

  flex-shrink: 0;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 8px;

  background: #ffffff;

  font-size: 16px;
}

.notice-sms .notice-icon {
  color: #0284c7;
}

.notice-email .notice-icon {
  color: #7c3aed;
}

.notice strong {
  display: block;

  margin-bottom: 4px;

  color: #334155;

  font-size: 16px;

  font-weight: 700;

  line-height: 1.3;
}

.notice p {
  margin: 0;

  color: #64748b;

  font-size: 16px;

  line-height: 1.5;
}

/* =========================================================
   INVOICE FOOTER
   ========================================================= */

.invoice-footer {
  margin-top: 28px;

  padding-top: 20px;

  border-top: 1px solid #edf0f4;

  text-align: center;
}

.invoice-footer p {
  margin: 0 0 5px;

  color: #334155;

  font-size: 16px;

  font-weight: 600;
}

.invoice-footer span {
  color: #94a3b8;

  font-size: 16px;
}

/* =========================================================
   FOCUS / ACCESSIBILITY
   ========================================================= */

.card-header-row .continue-btn-d:focus-visible {
  outline: 3px solid rgba(111, 0, 168, 0.25);

  outline-offset: 2px;
}

/* =========================================================
   BOX SIZING
   ========================================================= */

.card-header-row *,
.invoice-card *,
.appointment-details *,
.invoice-payment *,
.payment-status-box *,
.confirmation-notices * {
  box-sizing: border-box;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 850px) {
  .invoice-card {
    padding: 25px;
  }

  .invoice-header {
    gap: 25px;
  }

  .invoice-information {
    min-width: 220px;
  }

  .invoice-label {
    font-size: 24px;
  }
}

/* =========================================================
   MOBILE - 700PX
   ========================================================= */

@media (max-width: 700px) {
  /* Header */

  .card-header-row {
    display: flex;

    flex-direction: column;

    align-items: stretch;

    gap: 18px;

    min-height: auto;

    margin-bottom: 22px;
  }

  /* Header */

  .card-header-custom {
    justify-content: center;

    text-align: center;

    width: 100%;
  }

  .card-header-content {
    align-items: center;

    width: 100%;
  }

  .card-header-custom > i {
    margin-top: 3px;

    font-size: 20px;
  }

  .card-header-content h4 {
    font-size: 20px;

    white-space: normal;
  }

  .card-header-content p {
    font-size: 16px;

    white-space: normal;
  }

  /* Button */

  .card-header-row .continue-btn-d {
    width: 100%;

    min-width: 0;

    justify-self: auto;
  }

  /* Invoice */

  .invoice-card {
    padding: 20px;

    border-radius: 14px;
  }

  /* Invoice Header */

  .invoice-header {
    flex-direction: column;

    gap: 25px;
  }

  .invoice-information {
    width: 100%;

    min-width: 0;

    text-align: left;
  }

  .invoice-label {
    font-size: 24px;
  }

  .invoice-meta {
    align-items: flex-start;
  }

  .invoice-meta-row {
    justify-content: flex-start;
  }

  /* Details */

  .appointment-details {
    grid-template-columns: 1fr;
  }

  .appointment-detail.full-width {
    grid-column: span 1;
  }

  /* Payment */

  .invoice-payment {
    align-items: flex-start;

    flex-direction: column;

    gap: 10px;
  }

  /* Total */

  .invoice-total {
    justify-content: space-between;

    gap: 15px;

    padding-left: 0;

    padding-right: 0;
  }

  .invoice-total strong {
    min-width: auto;

    font-size: 21px;
  }

  /* Status */

  .payment-status-box {
    align-items: flex-start;
  }

  /* Notifications */

  .confirmation-notices {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   SMALL MOBILE - 480PX
   ========================================================= */

@media (max-width: 480px) {
  .card-header-row {
    gap: 15px;
  }

  .card-header-custom {
    gap: 8px;
  }

  .card-header-custom > i {
    font-size: 18px;
  }

  .card-header-content h4 {
    font-size: 18px;
  }

  .card-header-content p {
    font-size: 16px;
  }

  .invoice-card {
    padding: 15px;
  }

  .company-information h2 {
    font-size: 23px;
  }

  .company-information p {
    font-size: 16px;
  }

  .invoice-label {
    font-size: 22px;
  }

  .appointment-detail {
    min-height: 64px;

    padding: 12px;
  }

  .detail-icon {
    width: 34px;
    height: 34px;

    font-size: 16px;
  }

  .detail-content strong {
    font-size: 16px;
  }

  .invoice-payment {
    padding: 15px;
  }

  .invoice-total {
    font-size: 16px;
  }

  .invoice-total strong {
    font-size: 20px;
  }

  .notice {
    padding: 12px;
  }
}

/* =========================================================
   PRINT / INVOICE
   ========================================================= */

@media print {
  body {
    background: #ffffff !important;
  }

  .card-header-row {
    display: none !important;
  }

  .invoice-card {
    max-width: 100%;

    padding: 25px;

    border: none;

    box-shadow: none;
  }

  .appointment-detail {
    background: #ffffff;

    box-shadow: none;
  }

  .payment-status-box,
  .confirmation-notices {
    break-inside: avoid;
  }
}
