/**
 * MultiPayHub — Frontend Styles
 * Mobile-first, professional hotel-booking aesthetic
 */

/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
  --mph-primary:       #1a56db;
  --mph-primary-dark:  #1044c2;
  --mph-success:       #0e9f6e;
  --mph-danger:        #e02424;
  --mph-text:          #111827;
  --mph-text-muted:    #6b7280;
  --mph-border:        #e5e7eb;
  --mph-bg:            #f9fafb;
  --mph-card-bg:       #ffffff;
  --mph-radius:        12px;
  --mph-shadow:        0 4px 24px rgba(0,0,0,.08);
  --mph-transition:    0.2s ease;
}

/* ============================================================
   Layout & Card
   ============================================================ */
.multipayhub-payment-page,
.multipayhub-result-page {
  padding: 2.5rem 0 4rem;
  background: var(--mph-bg);
  min-height: 60vh;
}

.mph-card {
  background: var(--mph-card-bg);
  border-radius: var(--mph-radius);
  box-shadow: var(--mph-shadow);
  padding: 2rem;
  margin-bottom: 1.25rem;
}

.mph-card--header {
  background: linear-gradient(135deg, #1a56db 0%, #0e9f6e 100%);
  color: #fff;
}

.mph-card--header .mph-heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.5rem 0 0.25rem;
}

.mph-card--header .mph-subheading {
  font-size: 0.95rem;
  opacity: 0.9;
  margin: 0;
}

/* ============================================================
   Secure Badge
   ============================================================ */
.mph-secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
  margin-bottom: 0.75rem;
}

/* ============================================================
   Gateway Logo
   ============================================================ */
.mph-gateway-logo {
  max-height: 40px;
  max-width: 160px;
  object-fit: contain;
  filter: grayscale(0);
  transition: filter var(--mph-transition);
}

/* ============================================================
   Pay Button
   ============================================================ */
.mph-btn-pay {
  background: var(--mph-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background var(--mph-transition), transform var(--mph-transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mph-btn-pay:hover,
.mph-btn-pay:focus {
  background: var(--mph-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  text-decoration: none;
}

.mph-btn-pay:active {
  transform: translateY(0);
}

/* ============================================================
   Loader / Spinner
   ============================================================ */
.mph-loader {
  text-align: center;
  padding: 1.5rem;
  color: var(--mph-text-muted);
}

.mph-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--mph-border);
  border-top-color: var(--mph-primary);
  border-radius: 50%;
  animation: mph-spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes mph-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   Back Link
   ============================================================ */
.mph-back-link {
  color: var(--mph-text-muted);
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--mph-transition);
}

.mph-back-link:hover {
  color: var(--mph-primary);
  text-decoration: none;
}

/* ============================================================
   Result Page
   ============================================================ */
.mph-result-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.mph-result-icon--success {
  background: #d1fae5;
  color: var(--mph-success);
}

.mph-result-icon--failed {
  background: #fee2e2;
  color: var(--mph-danger);
}

.mph-result-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--mph-text);
  margin-bottom: 0.5rem;
}

.mph-result-subtitle {
  color: var(--mph-text-muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

/* ============================================================
   Payment Summary Card (success page)
   ============================================================ */
.mph-summary-card {
  background: var(--mph-card-bg);
  border: 1px solid var(--mph-border);
  border-radius: var(--mph-radius);
  overflow: hidden;
  text-align: left;
  margin: 1.5rem 0;
}

.mph-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--mph-border);
  font-size: 0.9rem;
}

.mph-summary-row:last-child {
  border-bottom: none;
}

.mph-summary-row span:first-child {
  color: var(--mph-text-muted);
}

.mph-mono {
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  word-break: break-all;
}

/* ============================================================
   Payment return hook (order-confirmation)
   ============================================================ */
.mph-confirmation-box {
  border: 1px solid #d1fae5;
  border-radius: var(--mph-radius);
  background: #f0fdf4;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
}

.mph-confirmation-title {
  font-size: 1rem;
  font-weight: 600;
  color: #065f46;
  margin-bottom: 1rem;
}

.mph-detail-table {
  width: 100%;
  font-size: 0.875rem;
  border-collapse: collapse;
}

.mph-detail-table tr td {
  padding: 0.4rem 0;
  border-bottom: 1px solid #d1fae5;
}

.mph-detail-table tr:last-child td {
  border-bottom: none;
}

.mph-detail-table th {
  color: var(--mph-text-muted);
  font-weight: 500;
  width: 160px;
  padding: 0.4rem 0;
  border-bottom: 1px solid #d1fae5;
}

/* ============================================================
   Admin panel
   ============================================================ */
.multipayhub-admin .opacity-50 {
  opacity: 0.5;
}

.multipayhub-admin-order .table th {
  background: #f8f9fa;
  white-space: nowrap;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 576px) {
  .mph-card {
    padding: 1.25rem;
  }

  .mph-result-title {
    font-size: 1.4rem;
  }

  .mph-summary-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}
