/**
 * LatePoint QuickPay Frontend Styles
 * Styles for QuickPay payment integration
 */

/* Payment method selection styles */
.latepoint-payment-method-quickpay_checkout {
  display: flex;
  align-items: center;
  padding: 15px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.latepoint-payment-method-quickpay_checkout:hover {
  border-color: #0073aa;
  background-color: #f8f9fa;
}

.latepoint-payment-method-quickpay_checkout.selected {
  border-color: #0073aa;
  background-color: #e7f3ff;
}

.latepoint-payment-method-quickpay_checkout .payment-method-logo {
  width: 40px;
  height: 24px;
  margin-right: 12px;
  object-fit: contain;
}

.latepoint-payment-method-quickpay_checkout .payment-method-name {
  font-weight: 500;
  color: #333;
}

/* Loading overlay styles */
.latepoint-payment-loading {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.7) !important;
  z-index: 999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: white !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.latepoint-payment-loading .loading-content {
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.latepoint-spinner {
  border: 4px solid rgba(255, 255, 255, 0.3) !important;
  border-top: 4px solid #ffffff !important;
  border-radius: 50% !important;
  width: 50px !important;
  height: 50px !important;
  animation: latepoint-quickpay-spin 1.5s linear infinite !important;
  margin: 0 auto 20px !important;
}

@keyframes latepoint-quickpay-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.latepoint-payment-loading .loading-text {
  font-size: 16px;
  font-weight: 500;
  margin-top: 15px;
}

/* Payment status messages */
.latepoint-quickpay-message {
  padding: 15px;
  border-radius: 5px;
  margin: 15px 0;
  font-weight: 500;
}

.latepoint-quickpay-message.success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.latepoint-quickpay-message.error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.latepoint-quickpay-message.info {
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .latepoint-payment-loading .loading-content {
    margin: 20px;
    padding: 20px;
  }
  
  .latepoint-payment-method-quickpay_checkout {
    padding: 12px;
  }
  
  .latepoint-payment-method-quickpay_checkout .payment-method-logo {
    width: 32px;
    height: 20px;
    margin-right: 8px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .latepoint-payment-method-quickpay_checkout {
    border-color: #444;
    background-color: #2a2a2a;
  }
  
  .latepoint-payment-method-quickpay_checkout:hover {
    border-color: #0073aa;
    background-color: #333;
  }
  
  .latepoint-payment-method-quickpay_checkout.selected {
    background-color: #1a3a4a;
  }
  
  .latepoint-payment-method-quickpay_checkout .payment-method-name {
    color: #fff;
  }
}

/* Integration with LatePoint existing styles */
.latepoint-form .latepoint-payment-method-quickpay_checkout {
  margin-bottom: 15px;
}

.latepoint-booking-form-element .latepoint-payment-method-quickpay_checkout {
  width: 100%;
  box-sizing: border-box;
}

/* QuickPay branding */
.quickpay-powered-by {
  font-size: 12px;
  color: #666;
  text-align: center;
  margin-top: 10px;
}

.quickpay-powered-by a {
  color: #0073aa;
  text-decoration: none;
}

.quickpay-powered-by a:hover {
  text-decoration: underline;
}
