/* Body and general */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
  color: #222;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 80px 20px;
}

/* Loader */
.loader {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #1a1a1a;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hidden { display: none; }

.container {
  width: 200px;
  height: 200px;
  filter: url("#goo");
  animation: rotate-move 2s ease-in-out infinite;
  position: relative;
}

.dot {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: #111;
  position: absolute;
  margin: auto;
  top: 0; bottom: 0; left: 0; right: 0;
}
.dot-3 { background-color: #ff5656; animation: dot-3-move 2s ease infinite, index 6s ease infinite; }
.dot-2 { background-color: #5699ff; animation: dot-2-move 2s ease infinite, index 6s -4s ease infinite; }
.dot-1 { background-color: #ffd456; animation: dot-1-move 2s ease infinite, index 6s -2s ease infinite; }

@keyframes dot-3-move {
  20% { transform: scale(1); }
  45% { transform: translateY(-18px) scale(0.45); }
  60% { transform: translateY(-90px) scale(0.45); }
  80% { transform: translateY(-90px) scale(0.45); }
  100% { transform: translateY(0px) scale(1); }
}
@keyframes dot-2-move {
  20% { transform: scale(1); }
  45% { transform: translate(-16px, 12px) scale(0.45); }
  60% { transform: translate(-80px, 60px) scale(0.45); }
  80% { transform: translate(-80px, 60px) scale(0.45); }
  100% { transform: translateY(0px) scale(1); }
}
@keyframes dot-1-move {
  20% { transform: scale(1); }
  45% { transform: translate(16px, 12px) scale(0.45); }
  60% { transform: translate(80px, 60px) scale(0.45); }
  80% { transform: translate(80px, 60px) scale(0.45); }
  100% { transform: translateY(0px) scale(1); }
}
@keyframes rotate-move {
  55% { transform: rotate(0deg); }
  80% { transform: rotate(360deg); }
  100% { transform: rotate(360deg); }
}
@keyframes index {
  0%, 100% { z-index: 3; }
  33.3% { z-index: 2; }
  66.6% { z-index: 1; }
}

/* Invoice card */
.invoice-container {
  max-width: 720px;
  background: #fff;
  color: #222;
  padding: 40px 50px;
  border-radius: 12px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
  width: 100%;
  box-sizing: border-box;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 30px;
  gap: 10px;
}

.invoice-title {
  font-size: 32px;
  font-weight: 600;
  color: #222;
}

table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  color: #222;
}

th, td {
  text-align: left;
  padding: 12px 15px;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: #333;
  color: #fff;
  font-weight: 600;
}

/* Pay Now button */
.pay-btn {
  position: relative;
  padding: 12px 24px;
  font-size: 16px;
  background: #1a1a1a;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  margin-top: 30px;
  user-select: none;
}

.pay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.icon-container {
  position: relative;
  width: 24px;
  height: 24px;
}

.icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  color: #22c55e;
  opacity: 0;
  visibility: hidden;
}

.default-icon {
  opacity: 1;
  visibility: visible;
}

/* Hover animations for pay-btn icons */
.pay-btn:hover .icon {
  animation: none;
}

.pay-btn:hover .wallet-icon {
  opacity: 0;
  visibility: hidden;
}

.pay-btn:hover .card-icon {
  animation: iconRotate 2.5s infinite;
  animation-delay: 0s;
}

.pay-btn:hover .payment-icon {
  animation: iconRotate 2.5s infinite;
  animation-delay: 0.5s;
}

.pay-btn:hover .dollar-icon {
  animation: iconRotate 2.5s infinite;
  animation-delay: 1s;
}

.pay-btn:hover .check-icon {
  animation: iconRotate 2.5s infinite;
  animation-delay: 1.5s;
}

/* Active state - show only checkmark */
.pay-btn:active .icon {
  animation: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.pay-btn:active .check-icon {
  animation: checkmarkAppear 0.6s ease forwards;
  visibility: visible;
}

.btn-text {
  font-weight: 600;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
}

@keyframes iconRotate {
  0% {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.5);
  }
  5% {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
  15% {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
  20% {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.5);
  }
  100% {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.5);
  }
}

@keyframes checkmarkAppear {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-45deg);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Contact section */
.contact-section {
  margin-top: 40px;
  width: 100%;
}

.contact-toggle-btn {
  background: #1a1a1a;
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  user-select: none;
  transition: background-color 0.3s ease;
  width: fit-content;
}

.contact-toggle-btn:hover {
  background-color: #333;
}

.contact-toggle-btn:focus {
  outline: 2px solid #22c55e;
  outline-offset: 2px;
}

.arrow-icon {
  transition: transform 0.3s ease;
}

.contact-toggle-btn.open .arrow-icon {
  transform: rotate(180deg);
}

.contact-info-box {
  max-width: 720px;
  background: #f9f9f9;
  border-radius: 10px;
  padding: 25px 30px;
  color: #222;
  font-size: 15px;
  line-height: 1.5;
  margin-top: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.5s ease;
}

.contact-info-box.open {
  max-height: 500px; /* enough to show all content */
  opacity: 1;
}

.contact-info-box pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: 'Courier New', Courier, monospace;
}
  
/* Footer */
.footer {
  margin-top: 40px;
  font-size: 14px;
  color: #555;
  text-align: center;
}

/* Responsive */
@media (max-width: 600px) {
  .invoice-container {
    padding: 30px 20px;
  }
  table th, table td {
    font-size: 14px;
  }
  .pay-btn {
    width: 100%;
    justify-content: center;
  }
  .contact-toggle-btn {
    width: 100%;
    justify-content: center;
  }
}
