/* Kapsule Wallet Frontend Styles */

.kapsule-wallet-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.wallet-header {
  margin-bottom: 30px;
}

.wallet-header h2 {
  font-size: 28px;
  margin: 0;
  color: #333;
}

/* Wallet Balance Card */
.wallet-balance-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.balance-info {
  display: flex;
  flex-direction: column;
}

.balance-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.balance-amount {
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  color: #333;
}

.balance-actions .button {
  background: #0073aa;
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.balance-actions .button:hover {
  background: #005a87;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

/* Transactions Section */
.wallet-transactions-section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.wallet-transactions-section h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 22px;
  color: #333;
}

.wallet-no-transactions {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.wallet-transactions-table {
  overflow-x: auto;
}

.wallet-transactions-table table {
  width: 100%;
  border-collapse: collapse;
}

.wallet-transactions-table thead {
  background: #f8f9fa;
}

.wallet-transactions-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #555;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wallet-transactions-table td {
  padding: 16px 12px;
  border-bottom: 1px solid #eee;
}

.transaction-row:last-child td {
  border-bottom: none;
}

.transaction-date {
  color: #666;
  font-size: 14px;
}

.transaction-time {
  display: block;
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.transaction-description strong {
  color: #333;
  font-size: 15px;
}

.transaction-details {
  color: #666;
  font-size: 13px;
}

.transaction-amount {
  font-weight: 600;
  font-size: 16px;
}

.transaction-amount.credit {
  color: #28a745;
}

.transaction-amount.debit {
  color: #dc3545;
}

.transaction-balance {
  font-weight: 600;
  color: #333;
}

.wallet-load-more {
  text-align: center;
  margin-top: 20px;
}

.wallet-load-more .button {
  padding: 10px 24px;
}

/* Modal Styles */
.wallet-modal {
  display: none;
  position: fixed;
  z-index: 999999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.wallet-modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 0;
  border-radius: 12px;
  max-width: 500px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  position: relative;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.wallet-modal-content h3 {
  margin: 0;
  padding: 24px 50px 24px 30px;
  background: white;
  color: #333;
  border-radius: 12px 12px 0 0;
  font-size: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.wallet-modal-close {
  position: absolute;
  right: 15px;
  top: 15px;
  color: #666;
  font-size: 28px;
  font-weight: bold;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 50%;
  background: transparent;
  line-height: 1;
}

.wallet-modal-close:hover,
.wallet-modal-close:focus {
  background: #f0f0f0;
  color: #333;
}

#wallet-topup-form {
  padding: 30px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.amount-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-symbol {
  position: absolute;
  left: 15px;
  font-weight: 600;
  color: #666;
  font-size: 18px;
}

#topup-amount {
  width: 100%;
  padding: 12px 12px 12px 40px;
  font-size: 18px;
  border: 2px solid #ddd;
  border-radius: 6px;
  transition: border-color 0.3s ease;
}

#topup-amount:focus {
  outline: none;
  border-color: #667eea;
}

.quick-amounts {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.quick-amount-label {
  font-size: 14px;
  color: #666;
  margin-right: 5px;
}

.quick-amount-btn {
  background: #f8f8f8;
  border: 2px solid #e0e0e0;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  color: #333;
}

.quick-amount-btn:hover {
  background: #0073aa;
  color: white;
  border-color: #0073aa;
}

.form-actions {
  margin-bottom: 16px;
}

.form-actions .button {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  background: #0073aa;
  color: white;
}

.form-actions .button:hover {
  background: #005a87;
}

.topup-note {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 6px;
  text-align: center;
}

.topup-note p {
  margin: 0;
  font-size: 13px;
  color: #666;
}

/* Payment Gateway Styles */
.kapsule-wallet-payment-fields {
  padding: 15px;
  background: #f9f9f9;
  border-radius: 6px;
  margin: 10px 0;
}

.wallet-balance-display {
  font-size: 16px;
  padding: 12px;
  background: white;
  border-radius: 6px;
  margin: 10px 0;
}

.wallet-balance-amount {
  color: #667eea;
  font-weight: 700;
  font-size: 18px;
}

.wallet-insufficient-notice {
  padding: 12px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
  margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .wallet-balance-card {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }

  .balance-info {
    margin-bottom: 20px;
  }

  .balance-amount {
    font-size: 36px;
  }

  .wallet-transactions-table {
    font-size: 14px;
  }

  .wallet-transactions-table th,
  .wallet-transactions-table td {
    padding: 10px 8px;
  }

  .wallet-modal-content {
    margin: 10% 10px;
  }
}

@media (max-width: 480px) {
  .balance-amount {
    font-size: 32px;
  }

  .quick-amounts {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-amount-btn {
    width: 100%;
  }
}

/* Payment Gateway Selection */
.payment-gateways {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.gateway-option {
  display: flex;
  align-items: center;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gateway-option:hover {
  border-color: #009bb5;
  background: #f8f8f8;
}

.gateway-option input[type="radio"] {
  margin-right: 12px;
  width: 18px;
  height: 18px;
}

.gateway-option input[type="radio"]:checked + .gateway-label {
  color: #009bb5;
}

.gateway-label {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.gateway-label strong {
  font-size: 16px;
  margin-bottom: 4px;
}

.gateway-label small {
  color: #666;
  font-size: 13px;
}

/* Compact Payment Gateway Selection */
.payment-gateways-compact {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.gateway-option-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 140px;
}

.gateway-option-compact:hover {
  border-color: #009bb5;
  background: #f8f8f8;
}

.gateway-option-compact input[type="radio"] {
  margin: 0;
  width: 18px;
  height: 18px;
}

.gateway-option-compact input[type="radio"]:checked ~ .gateway-text {
  color: #009bb5;
}

.gateway-icon {
  font-size: 20px;
}

.gateway-text {
  display: flex;
  flex-direction: column;
}

.gateway-text strong {
  font-size: 14px;
  white-space: nowrap;
}

/* Tillify Gateway Styling */
.tillify-option {
  background: linear-gradient(135deg, #e8fff9 0%, #f0fdf9 100%);
  border-color: #00e0c4;
}

.tillify-option:hover {
  border-color: #00c4aa;
  background: linear-gradient(135deg, #d6fff4 0%, #e8fff9 100%);
}

.tillify-option input[type="radio"]:checked ~ .gateway-text {
  color: #00aa8f;
}

.gateway-fee-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #00aa8f;
  background: #d6fff4;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
