/* ==========================================================================
   PT Ziflazz Premium Server - Payment Page Stylesheet
   Based on PRD.md & Payment_PT_Ziflazz_Premium_Server.pdf Design Specifications
   ========================================================================== */

/* --------------------------------------------------------------------------
   Font Declarations (Self-hosted Poppins woff2)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../assets/fonts/poppins-300.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/poppins-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/poppins-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/poppins-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/poppins-700.woff2') format('woff2');
}

/* --------------------------------------------------------------------------
   Design Tokens & CSS Variables
   -------------------------------------------------------------------------- */
:root {
  /* Brand Colors from PRD */
  --color-navy-primary: #0F1E3A;
  --color-navy-secondary: #16294D;
  --color-navy-dark: #0A1428;
  --color-gold: #C9A961;
  --color-gold-light: #DFCA92;
  --color-gold-hover: #b8974e;
  --color-gold-glow: rgba(201, 169, 97, 0.25);

  /* Page & Surface Colors (Light Mode Default) */
  --color-bg-page: #F5F3EE;
  --color-bg-card: #FFFFFF;
  --color-bg-subtle: #F9F8F5;

  /* Typography Colors */
  --color-text-primary: #1B2438;
  --color-text-secondary: #6B7589;
  --color-text-muted: #8C95A6;
  --color-text-header-title: #FFFFFF;
  --color-text-header-sub: rgba(255, 255, 255, 0.9);
  --color-text-header-desc: #94A3B8;

  /* Borders & Shadows */
  --color-border-card: rgba(15, 30, 58, 0.05);
  --color-divider: #E4E0D7;
  --shadow-card: 0 10px 30px rgba(15, 30, 58, 0.06), 0 1px 3px rgba(15, 30, 58, 0.03);
  --shadow-card-hover: 0 14px 36px rgba(15, 30, 58, 0.1), 0 2px 6px rgba(15, 30, 58, 0.05);

  /* Layout */
  --max-width: 480px;
  --radius-card: 24px;
  --radius-item: 16px;
  --radius-btn: 10px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Dark Mode Theme (PRD F7)
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
  --color-bg-page: #0B1324;
  --color-bg-card: #131E35;
  --color-bg-subtle: #182542;
  --color-text-primary: #F1F5F9;
  --color-text-secondary: #94A3B8;
  --color-text-muted: #64748B;
  --color-border-card: rgba(201, 169, 97, 0.15);
  --color-divider: rgba(255, 255, 255, 0.08);
  --shadow-card: 0 12px 36px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 16px 44px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(201, 169, 97, 0.25);
}

/* --------------------------------------------------------------------------
   Reset & Base Elements
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-primary);
  background-color: var(--color-bg-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Layout Container
   -------------------------------------------------------------------------- */
.app-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: var(--color-bg-page);
  box-shadow: 0 0 50px rgba(15, 30, 58, 0.06);
  transition: background-color var(--transition-normal);
}

/* --------------------------------------------------------------------------
   Header Section (Navy with Decorative Rings & Gold Accents)
   -------------------------------------------------------------------------- */
.header-hero {
  position: relative;
  background: linear-gradient(175deg, var(--color-navy-primary) 0%, var(--color-navy-secondary) 100%);
  color: var(--color-text-header-title);
  padding: 40px 24px 72px 24px;
  overflow: hidden;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
}

/* Decorative background circles matching the PDF artwork */
.header-hero::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  top: -140px;
  right: -150px;
  pointer-events: none;
}

.header-hero::after {
  content: '';
  position: absolute;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  border: 1px solid rgba(201, 169, 97, 0.08);
  top: -200px;
  right: -220px;
  pointer-events: none;
}

/* Top utility bar inside header */
.header-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  position: relative;
  z-index: 2;
}

/* Category Label */
.label-payment-info {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--color-gold);
  text-transform: uppercase;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

.theme-toggle-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Main Titles */
.brand-title {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text-header-title);
  letter-spacing: -0.02em;
  position: relative;
  z-index: 2;
}

.brand-subtitle {
  font-size: 19px;
  font-weight: 300;
  color: var(--color-text-header-sub);
  letter-spacing: 0.01em;
  margin-top: 2px;
  margin-bottom: 14px;
  position: relative;
  z-index: 2;
}

/* Gold Divider */
.gold-divider {
  width: 48px;
  height: 2.5px;
  background-color: var(--color-gold);
  border-radius: 2px;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

/* Header Description */
.header-desc {
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-header-desc);
  position: relative;
  z-index: 2;
  max-width: 360px;
}

/* --------------------------------------------------------------------------
   Main Content Area
   -------------------------------------------------------------------------- */
.main-content {
  padding: 0 16px 36px 16px;
  margin-top: -46px; /* Negative margin to subtly overlap the navy header */
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

/* --------------------------------------------------------------------------
   QRIS Card (PRD F1, F1a, F4)
   -------------------------------------------------------------------------- */
.qris-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border-card);
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.qris-card:hover {
  box-shadow: var(--shadow-card-hover);
}

/* Container for the QRIS image */
.qris-image-wrapper {
  width: 100%;
  max-width: 360px;
  border-radius: 16px;
  overflow: hidden;
  background-color: #FFFFFF;
  display: flex;
  justify-content: center;
  align-items: center;
}

.qris-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Instruction box under QRIS (PRD F1a) */
.qris-instruction {
  margin-top: 14px;
  padding: 10px 14px;
  background-color: var(--color-bg-subtle);
  border-radius: 12px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 3px solid var(--color-gold);
}

.instruction-icon {
  flex-shrink: 0;
  color: var(--color-gold);
  width: 16px;
  height: 16px;
}

.qris-instruction p {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  line-height: 1.45;
}

/* Action button under QRIS (PRD F4: Unduh QRIS) */
.qris-actions {
  width: 100%;
  margin-top: 14px;
}

.btn-download-qris {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--color-bg-subtle);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-card);
  padding: 11px 16px;
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-download-qris:hover {
  background-color: var(--color-gold);
  color: #FFFFFF;
  border-color: var(--color-gold);
  box-shadow: 0 4px 14px var(--color-gold-glow);
  transform: translateY(-1px);
}

.btn-download-qris:active {
  transform: translateY(0);
}

.btn-download-qris svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* --------------------------------------------------------------------------
   Information Cards (GoPay & Email) (PRD F2, F3, Section 7)
   -------------------------------------------------------------------------- */
.info-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-item);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border-card);
  padding: 16px 18px;
  display: flex;
  align-items: stretch;
  gap: 14px;
  position: relative;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.info-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

/* Vertical Gold Accent Stripe from PDF */
.accent-stripe {
  width: 4px;
  background-color: var(--color-gold);
  border-radius: 4px;
  flex-shrink: 0;
  align-self: stretch;
}

.info-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.info-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.info-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.email-value {
  font-size: 14px;
  word-break: break-all;
}

/* Action button group inside info card */
.info-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Interactive Action Buttons (Copy / Mailto) */
.btn-action {
  background-color: var(--color-bg-subtle);
  border: 1px solid var(--color-border-card);
  color: var(--color-text-primary);
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.btn-action:hover {
  background-color: var(--color-navy-primary);
  color: #FFFFFF;
  border-color: var(--color-navy-primary);
  box-shadow: 0 3px 10px rgba(15, 30, 58, 0.15);
  transform: translateY(-1px);
}

[data-theme="dark"] .btn-action:hover {
  background-color: var(--color-gold);
  color: #0F1E3A;
  border-color: var(--color-gold);
}

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

.btn-action svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* State: Copied */
.btn-action.copied {
  background-color: #0D9488 !important;
  color: #FFFFFF !important;
  border-color: #0D9488 !important;
}

/* Icon-only button (e.g. mailto quick action) */
.btn-icon {
  width: 32px;
  padding: 0;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Footer Section (PRD Section 5 & 7)
   -------------------------------------------------------------------------- */
.footer-bar {
  margin-top: auto;
  padding: 22px 18px 30px 18px;
  border-top: 1px solid var(--color-divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.footer-left {
  font-weight: 500;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.footer-right {
  text-align: right;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Toast Notification (PRD F5)
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 9999;
  background-color: #0F1E3A;
  color: #FFFFFF;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(201, 169, 97, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

[data-theme="dark"] .toast-container {
  background-color: #1A2844;
  border: 1px solid var(--color-gold);
}

.toast-container.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-icon {
  width: 18px;
  height: 18px;
  color: #10B981;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .app-container {
    box-shadow: none;
  }

  .header-hero {
    padding: 34px 16px 64px 16px;
  }

  .brand-title {
    font-size: 30px;
  }

  .brand-subtitle {
    font-size: 17px;
  }

  .main-content {
    padding: 0 14px 28px 14px;
    margin-top: -42px;
  }

  .footer-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 18px 16px 26px 16px;
  }

  .footer-right {
    text-align: center;
  }
}

/* Extra small devices (320px - 360px) */
@media (max-width: 360px) {
  .btn-action {
    padding: 0 8px;
    font-size: 11px;
  }

  .info-value {
    font-size: 16px;
  }

  .email-value {
    font-size: 12.5px;
  }
}

/* --------------------------------------------------------------------------
   Print Stylesheet
   -------------------------------------------------------------------------- */
@media print {
  body {
    background: #FFFFFF;
  }

  .theme-toggle-btn,
  .btn-download-qris,
  .btn-action,
  .toast-container {
    display: none !important;
  }

  .app-container {
    box-shadow: none;
    max-width: 100%;
  }

  .header-hero {
    padding-bottom: 40px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .main-content {
    margin-top: 0;
  }
}
