@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&display=swap');

:root {
  /* Cash App brand colors - updated to match official app */
  --primary-color: #00D632;
  --primary-hover: #00C02E;
  --text-color: #000000;
  --secondary-text: #2B2B2B;
  --border-color: #EEEEEE;
  --background: #000000;
  --card-background: #ffffff;
  --danger-color: #FF0000;
  --warning-color: #FF9500;
  --success-color: #00D632;
  --cash-light-bg: #F8F8F8;
  --cash-app-black: #000000;
  --cash-app-grey: #F7F7F7;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--cash-light-bg);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 16px;
  line-height: 1.5;
  letter-spacing: -0.3px;
}

/* Styles specific to iframe embedding */
body.in-iframe {
  min-height: auto;
  padding: 0;
  background: transparent;
}

.wrapper {
  width: 100%;
  max-width: 460px;
  position: relative;
}

.card {
  background: var(--card-background);
  border-radius: 24px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  padding: 24px;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

/* Iframe specific styles */
.in-iframe .wrapper {
  max-width: 100%;
  margin: 0;
}

.in-iframe .card {
  border-radius: 0;
  box-shadow: none;
  padding: 16px;
}

/* Custom Stripe button container styling */
#stripe-button-container {
  margin-top: 20px;
}

/* Style for custom Stripe button */
.custom-stripe-container {
  border-radius: 8px;
  overflow: hidden;
}

/* Responsive adjustments for small embeds */
@media (max-width: 350px) {
  .card {
    padding: 16px;
  }
  
  h1 {
    font-size: 20px;
    margin-bottom: 16px;
  }
}

/* Cash App branding styling - official look */
.brand-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 36px; /* Increased margin below to balance larger header */
  gap: 16px; /* Increased gap between logo and text */
  position: relative;
  padding: 40px 0; /* Increased height for larger text */
  background-color: #1C1C1C; /* Even more subtle dark gray */
  border-radius: 22px; /* Slightly larger radius to match larger content */
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08); /* Slightly enhanced shadow for larger header */
  overflow: hidden;
}

.brand-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(0,214,50,0) 0%, rgba(0,214,50,0.2) 50%, rgba(0,214,50,0) 100%);
}

.brand-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px; /* Wider line */
  height: 2px; /* Thinner line */
  background-color: rgba(0,214,50,0.5); /* More transparent */
  border-radius: 2px;
}

.cash-app-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px; /* Slightly larger radius */
  overflow: hidden;
  position: relative;
  width: 60px; /* Increased size to match larger text */
  height: 60px; /* Increased size to match larger text */
  animation: subtle-pulse 8s infinite ease-in-out; /* Slower animation */
}

.cash-app-logo {
  width: 58px; /* Increased size to match larger text */
  height: 58px; /* Increased size to match larger text */
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 214, 50, 0.25));
}

@keyframes subtle-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

h1 {
  margin-bottom: 0;
  font-weight: 600;
  font-size: 22px;
  text-align: center;
  color: var(--text-color);
}

.cash-app-title {
  color: #00D632;
  font-weight: 600; /* Reduced from 700 to 600 */
  letter-spacing: -0.4px; /* Slightly more condensed */
  font-size: 28.5px; /* 1.5x bigger than previous 19px */
  text-shadow: 0 0 10px rgba(0, 214, 50, 0.18); /* Slightly enhanced glow for larger text */
}

.form-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 15px;
  font-weight: 500;
  color: var(--secondary-text);
  margin-left: 2px;
  letter-spacing: -0.2px;
  margin-bottom: 4px;
}

select {
  width: 100%;
  padding: 16px;
  font-size: 17px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: white;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2300D632' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px top 50%;
  background-size: 14px 14px;
  font-weight: 500;
  letter-spacing: -0.3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  color: var(--text-color);
}

select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0, 214, 50, 0.2);
}

.submit-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 214, 50, 0.2);
  letter-spacing: -0.3px;
  position: relative;
  overflow: hidden;
  text-transform: none;
}

.submit-button:before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}

.submit-button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

.submit-button:hover:before {
  left: 100%;
}

.submit-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 214, 50, 0.15);
}

#stripe-button-container {
  margin-top: 24px;
  min-height: 60px;
  position: relative;
}

/* Style for the messages displayed in the container */
#stripe-button-container div {
  padding: 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.3px;
  text-align: center;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-color);
  margin-top: 4px;
}

/* Ensure Stripe button has consistent styling */
stripe-buy-button {
  --stripeElementLineHeight: 1.5 !important;
  --stripeElementFontFamily: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Cash App styling for Stripe container - official look */
.custom-stripe-container {
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 4px 12px rgba(0, 214, 50, 0.1);
  margin-bottom: 16px;
  background-color: white;
  border: 1px solid var(--border-color);
}

/* Cash App style selection indicator */
select {
  background-color: white;
  position: relative;
}

select option {
  padding: 12px;
}

select option:checked {
  background-color: var(--primary-color);
  color: white;
}

/* Cash App animation for changes */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.stripe-button-updated {
  animation: fade-in 0.4s ease-out;
}

/* Mobile decorations and animations - Cash App style */
.cash-dollar-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(0, 214, 50, 0.02) 15%, transparent 15%);
  background-size: 24px 24px;
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
}

.mobile-decorations {
  display: none;
  position: relative;
  margin-top: 30px;
  height: 100px;
}

.floating-dollar {
  position: absolute;
  font-family: 'Archivo', sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--primary-color);
  opacity: 0.3;
  animation: float-dollar 8s infinite ease-in-out;
  text-shadow: 0 0 10px rgba(0, 214, 50, 0.2);
}

.floating-dollar-1 {
  left: 20%;
  top: 0;
  animation-delay: 0s;
}

.floating-dollar-2 {
  left: 65%;
  top: 20px;
  animation-delay: 2.5s;
}

.floating-dollar-3 {
  left: 40%;
  top: 50px;
  animation-delay: 4.5s;
}

@keyframes float-dollar {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.4; }
  20% { transform: translateY(-15px) rotate(5deg); opacity: 0.6; }
  40% { transform: translateY(-30px) rotate(0deg); opacity: 0.4; }
  60% { transform: translateY(-45px) rotate(-5deg); opacity: 0.2; }
  80% { transform: translateY(-60px) rotate(0deg); opacity: 0; }
  100% { transform: translateY(-60px) rotate(0deg); opacity: 0; }
}

.payment-success-indicator {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  animation: success-appear 5s infinite 1s;
}

.success-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 214, 50, 0.2);
}

.success-circle:before {
  content: "";
  width: 14px;
  height: 8px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px, -2px);
}

.success-message {
  font-size: 13px;
  font-weight: 500;
  color: #333;
  opacity: 0.8;
}

@keyframes success-appear {
  0% { opacity: 0; transform: translateX(-50%) scale(0.9); }
  10% { opacity: 1; transform: translateX(-50%) scale(1); }
  80% { opacity: 1; transform: translateX(-50%) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) scale(0.9); }
}

/* Media query for mobile devices */
@media (max-width: 600px) {
  .mobile-decorations {
    display: block;
  }
  
  .card {
    margin-bottom: 20px;
  }
  
  body::after {
    content: "";
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(0,0,0,0.03), transparent);
    z-index: -1;
    pointer-events: none;
  }
}
