/* Payment Page Specific Styles - Updated Layout */

.payment-layout {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.payment-product-section {
  margin-bottom: 48px;
  width: 100%;
}

.payment-product-card {
  background: white;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
  transition: all 0.3s ease;
}

.payment-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border-color: #eab308;
}

.payment-content-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
  width: 100%;
  align-items: start;
}

.payment-content-grid > div {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.payment-product-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.payment-product-info {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-product-price {
  font-size: 32px;
  font-weight: 800;
  color: #eab308;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  letter-spacing: -0.5px;
}

.payment-methods-section {
  background: white;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  height: 100%;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.payment-methods-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border-color: #eab308;
}

.payment-methods-header {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.payment-methods-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.payment-methods-list {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: flex-start;
}

.payment-method-option {
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-method-option:last-child {
  border-bottom: none;
}

.payment-method-option:hover {
  background: #f9fafb;
}

.payment-method-option.active {
  background: #fef2f2;
  border-left: 4px solid #dc2626;
}

.payment-method-content {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.payment-method-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 6px;
  flex-shrink: 0;
}

.payment-method-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.fallback-icon {
  display: flex;
  font-size: 22px;
  line-height: 1;
  align-items: center;
  justify-content: center;
}

.payment-method-icon .pm-svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.payment-method-details {
  flex: 1;
}

.payment-method-name {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.payment-method-desc {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.4;
}

.order-details {
  margin-bottom: 16px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.order-item-name {
  font-size: 16px;
  font-weight: 500;
  color: #111827;
}

.order-item-price {
  font-size: 16px;
  font-weight: 600;
  color: #dc2626;
}

.order-quantity {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #6b7280;
}

.order-price-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 12px;
}

.order-price-value {
  font-weight: 600;
  color: #eab308;
  font-size: 16px;
}

.order-sidebar {
  width: 100%;
  margin-top: 0px;
}

.order-card {
  background: white;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.order-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border-color: #eab308;
}

.btn-primary {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(234, 179, 8, 0.3);
  margin-top: auto;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ca8a04, #a16207);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 179, 8, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .payment-product-section {
    margin-bottom: 12px;
  }

  .payment-methods-section {
    margin-top: 0;
  }

  .payment-product-info {
    display: none;
  }

  .payment-content-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .payment-product-card {
    flex-direction: column;
    text-align: center;
    padding: 12px 16px;
  }
  
  .payment-product-img {
    width: 100px;
    height: 100px;
  }
  
  .payment-method-content {
    padding: 12px 16px;
  }
  
  .payment-method-icon {
    width: 40px;
    height: 40px;
  }
  
  .payment-method-icon img {
    width: 24px;
    height: 24px;
  }
  
  .fallback-icon {
    font-size: 20px;
  }
  
  .payment-method-name {
    font-size: 14px;
  }
  
  .payment-method-desc {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .payment-product-section {
    margin-bottom: 8px;
  }

  .payment-content-grid {
    gap: 12px;
  }

  .payment-product-card {
    padding: 10px 12px;
  }

  .payment-product-img {
    width: 88px;
    height: 88px;
  }
  
  .payment-method-content {
    padding: 10px 12px;
  }
  
  .payment-method-icon {
    width: 36px;
    height: 36px;
  }
  
  .payment-method-icon img {
    width: 20px;
    height: 20px;
  }
  
  .fallback-icon {
    font-size: 18px;
  }
}

/* Payment Popup Styles */
.payment-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.payment-popup {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.payment-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 16px 16px 0 0;
}

.payment-popup-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #111827;
}

.popup-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.popup-close-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.payment-popup-content {
  padding: 24px;
}

.payment-inline-status {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.payment-inline-status[hidden] {
  display: none !important;
}

.payment-inline-status.is-waiting {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
}

.payment-inline-status.is-declined {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
}

.payment-inline-status-sub {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0.9;
}

.payment-success-panel {
  text-align: center;
  padding: 28px 16px 8px;
}

.payment-success-panel[hidden] {
  display: none !important;
}

/* Success checkmark — see ui-icons.css (.payment-success-icon) */

.payment-success-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: #111827;
}

.payment-success-text {
  margin: 0 0 24px;
  font-size: 15px;
  color: #6b7280;
  line-height: 1.5;
}

.payment-success-ok-btn {
  display: inline-block;
  min-width: 140px;
  padding: 12px 32px;
  border: none;
  border-radius: 9999px;
  background: #eab308;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.payment-success-ok-btn:hover {
  background: #ca8a04;
}

#payment-form-section.is-hidden {
  display: none;
}

.payment-method-logos {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  justify-content: center;
}

.payment-logo {
  height: 60px;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.payment-logo svg {
  height: 60px;
  width: auto;
  display: block;
}

.payment-logo:hover {
  opacity: 1;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row .form-group {
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.form-group input {
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.2s ease;
  background: white;
}

.form-group input:focus {
  outline: none;
  border-color: #eab308;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.1);
}

.form-group input:invalid {
  border-color: #dc2626;
}

.security-message {
  text-align: center;
  color: #059669;
  font-size: 14px;
  margin: 20px 0;
  padding: 12px;
  background: #f0fdf4;
  border-radius: 8px;
  border: 1px solid #bbf7d0;
}

.pay-now-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  margin-top: 20px;
}

/* Cryptocurrency Payment Styles */
.crypto-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.crypto-method-btn {
  padding: 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.crypto-method-btn:hover {
  border-color: #eab308;
  background: #fef9c3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.2);
}

.crypto-method-btn.active {
  border-color: #eab308;
  background: #fef3c7;
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.3);
}

.crypto-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crypto-icon--btc {
  background: #f59e0b;
  border-radius: 50%;
  position: relative;
}

.crypto-icon--btc::after {
  content: "";
  display: block;
  width: 14px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50% 50% 45% 45%;
  border-top: none;
  transform: translateY(-1px);
}

.crypto-icon--usdt {
  background: #26a17b;
  border-radius: 50%;
  position: relative;
}

.crypto-icon--usdt::after {
  content: "T";
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  font-family: system-ui, sans-serif;
  line-height: 1;
}

.crypto-name {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.crypto-address-content {
  text-align: center;
}

.crypto-address-content h4 {
  margin: 0 0 20px 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.address-qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 8px;
  margin-bottom: 20px;
}

.qr-code {
  width: 200px;
  height: 200px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  padding: 10px;
}

.address-info {
  text-align: center;
  max-width: 100%;
}

.address-label {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 8px;
}

.address-value {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #111827;
  background: #f9fafb;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  word-break: break-all;
  margin-bottom: 12px;
}

.copy-btn {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: #e5e7eb;
}

.crypto-instructions {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 16px;
  margin-top: 20px;
}

.crypto-instructions p {
  margin: 0;
  color: #059669;
  font-size: 14px;
  line-height: 1.5;
}

.crypto-instructions p:first-child {
  margin-bottom: 8px;
}

/* Enhanced Crypto Payment Styles */
.order-summary-crypto {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.crypto-order-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.crypto-item-name {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.crypto-price-info {
  text-align: right;
}

.crypto-pkr-price {
  font-size: 20px;
  font-weight: 700;
  color: #eab308;
  margin-bottom: 4px;
}

.crypto-conversion {
  font-size: 14px;
  color: #6b7280;
}

.crypto-rate {
  font-size: 12px;
  color: #059669;
  margin-top: 4px;
  font-weight: 500;
}

.crypto-amount-display {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.amount-label {
  font-size: 14px;
  color: #92400e;
  margin-bottom: 8px;
  font-weight: 500;
}

.amount-value {
  font-size: 18px;
  font-weight: 700;
  color: #92400e;
  font-family: 'Courier New', monospace;
}

/* Responsive Popup Styles */
@media (max-width: 768px) {
  .payment-popup {
    width: 95%;
    max-width: none;
    margin: 20px;
  }
  
  .payment-popup-header {
    padding: 16px 20px;
  }
  
  .payment-popup-content {
    padding: 20px;
  }

  .payment-method-logos {
    gap: 22px;
    margin: 0 0 18px;
    padding: 12px 0 14px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    display: flex;
    width: 100%;
  }

  .payment-logo {
    height: 40px;
    width: auto;
  }
  
  .crypto-methods {
    grid-template-columns: 1fr;
  }
  
  .crypto-amount-display {
    margin-bottom: 28px;
    padding: 14px 12px;
  }

  .amount-value {
    font-size: 16px;
    line-height: 1.4;
    word-break: break-word;
  }

  .address-qr-container {
    margin-top: 16px;
    gap: 24px;
    clear: both;
  }

  .qr-code {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
  }

  #crypto-address-display .crypto-address-content {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  
  .form-row {
    flex-direction: column;
    gap: 12px;
  }
}
