/* ===== Page Wrapper ===== */
.payment-history-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f3f4f6;
}

/* ===== Content Area — outer white card (matches buynow-content) ===== */
.payment-history-content {
  flex: 1;
  margin: 16px 16px 16px 16px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  /* box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08); */
  padding: 24px;
  position: relative;

  display: flex;
  flex-direction: column;
}

/* ===== Page Header ===== */
.payment-history-header {
  margin-bottom: 23px;
}

.payment-history-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 6px 0;
}

.payment-history-subtitle {
  font-size: 14px;
  color: #888;
  margin: 0;
}

/* ===== No Record (td inside tbody) ===== */
.payment-history-no-record {
  text-align: center;
  font-size: 15px;
  color: #666;
  padding: 48px 20px;
}

/* ===== Table Container — inner card (matches buynow-right) ===== */
.payment-history-table-container {
  background: white;
  border-radius: 6px;
  /* border: 1px solid #e5e7eb; */
  /* box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06); */
  overflow: hidden;
}

/* ===== Table Styles ===== */
.payment-history-table {
  width: 100%;
  border-collapse: collapse;
}

.payment-history-table thead {
  background: #9e9e9e;
  color: white;
}

.payment-history-table th {
  padding: 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
  background: #9e9e9e;
  color: white;
  white-space: nowrap;
}

.payment-history-table th:hover {
  background: #ababab;
}

.th-content {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.sort-icon {
  font-size: 16px;
  opacity: 0.8;
}

.payment-history-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}

.payment-history-table tbody tr:hover {
  background: #f9fafb;
}

.payment-history-table tbody tr:last-child {
  border-bottom: none;
}

.payment-history-table td {
  padding: 16px;
  font-size: 14px;
  color: #333;
}

.transaction-id {
  color: #35659E;
  font-weight: 500;
}

.amount {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 15px;
}

/* ===== Status Badge ===== */
.status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

.status-completed {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-failed {
  background: #ffebee;
  color: #c62828;
}

/* ===== Action Buttons ===== */
.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.download-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #35659E;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.download-btn:hover:not(:disabled) {
  background: #2a4f80;
  transform: translateY(-1px);
  /* box-shadow: 0 4px 12px rgba(53, 101, 158, 0.3); */
  color: white;
}

.download-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.download-btn svg {
  flex-shrink: 0;
}

/* ===== Pagination Footer (sticky) ===== */
.ph-pagination-footer {
  background: white;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1); */
  position: sticky;
  bottom: 0;
  z-index: 100;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-top: 1px solid #f0f0f0;
}

.pagination-btn {
  padding: 10px 20px;
  border: 2px solid #35659E;
  background: white;
  color: #35659E;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  background: #35659E;
  color: white;
}

.pagination-btn:disabled {
  border-color: #ccc;
  color: #ccc;
  cursor: not-allowed;
}

.pagination-pages {
  display: flex;
  gap: 8px;
}

.pagination-page {
  width: 40px;
  height: 40px;
  border: 1px solid #ddd;
  background: white;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-page:hover {
  border-color: #35659E;
  color: #35659E;
}

.pagination-page.active {
  background: #35659E;
  color: white;
  border-color: transparent;
}

/* ===== Subscription Notice Banner ===== */
.ph-subscription-notice {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 14px 16px;
  margin-top: 16px;
  margin-inline: 18px;
}

.ph-subscription-notice-content {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
}

.ph-subscription-notice-content svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.ph-subscription-notice-content p {
  margin: 0;
  font-size: 14px;
  color: #1e40af;
  line-height: 1.5;
}

.ph-subscription-notice-content strong {
  font-weight: 600;
}

.ph-subscription-notice-close {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: #6b7280;
  flex-shrink: 0;
  transition: color 0.15s;
}

.ph-subscription-notice-close:hover {
  color: #1e40af;
}

/* ===== Cancel Membership Link ===== */
.ph-cancel-link-text {
  font-size: 15px;
  color: #333;
  margin: 20px 0 0 0;
}

.ph-cancel-inline-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 15px;
  color: #35659E;
  text-decoration: underline;
  cursor: pointer;
}

.ph-cancel-inline-link:hover {
  color: #2a4f80;
}

/* ===== Responsive Design ===== */
@media (max-width: 1200px) {
  .payment-history-table {
    font-size: 13px;
  }

  .payment-history-table th,
  .payment-history-table td {
    padding: 12px;
  }
}

@media (max-width: 992px) {
  .payment-history-content {
    margin: 16px;
    padding: 16px;
  }

  .payment-history-header h1 {
    font-size: 20px;
  }

  .payment-history-table-container {
    overflow-x: auto;
  }

  .payment-history-table {
    min-width: 900px;
  }
}

@media (max-width: 768px) {
  .payment-history-content {
    margin: 16px auto;
    width: calc(100% - 32px);
    padding: 12px;
  }

  .payment-history-header h1 {
    font-size: 18px;
  }

  .payment-history-subtitle {
    font-size: 13px;
  }

  .ph-pagination-footer {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
  }

  .pagination {
    flex-direction: column;
    gap: 16px;
  }

  .pagination-pages {
    order: -1;
  }

}

@media (max-width: 480px) {
  .payment-history-content {
    margin: 12px auto;
    width: calc(100% - 24px);
    padding: 10px;
  }

  .pagination-btn {
    padding: 8px 16px;
    font-size: 12px;
  }

  .pagination-page {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
}
