/* this file is loaded by index.html and styles the page */

* {
  box-sizing: border-box;
}

body {
  font-family: sans-serif;
  margin: 2em 1em;
  line-height: 1.5em;
}

h1 {
  font-style: italic;
  color: #373fff;
  max-width: calc(100% - 5rem);
  line-height: 1.1;
}

form {
  background-color: #eee;
  display: grid;
  grid-gap: 1em;
  padding: 1em;
  max-width: 40ch;
}

input {
  border: 1px solid silver;
  display: block;
  font-size: 16px;
  margin-bottom: 10px;
  padding: 5px;
  width: 100%;
}

form button {
  background-color: #bbbbf2;
  border: 2px solid currentColor;
  border-radius: .25em;
  cursor: pointer;
  font-size: inherit;
  line-height: 1.4em;
  padding: 0.25em 1em;
  max-width: 20ch;
}

form button:hover {
  background-color: lavender;
}

footer {
  margin-top: 3em;
  padding-top: 1.5em;
  border-top: 1px solid lightgrey;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 450px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 5px 10px;
  line-height: 1;
}

.modal-close:hover {
  color: #333;
}

.modal-content h2 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 24px;
}

.modal-price {
  font-size: 28px;
  font-weight: 700;
  color: #2563eb;
  margin: 0 0 20px 0;
}

.modal-note {
  font-size: 14px;
  color: #666;
  margin-top: 15px;
}

/* Form Styles */
.form-group {
  margin-bottom: 16px;
}

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

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #2563eb;
}

.form-row {
  display: flex;
  gap: 12px;
}

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

/* Stripe Card Element */
#card-element {
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: white;
}

#card-element.StripeElement--focus {
  border-color: #2563eb;
}

.error-message {
  color: #dc2626;
  font-size: 14px;
  margin-top: 8px;
}

/* Submit Button */
.submit-button {
  width: 100%;
  padding: 14px 20px;
  background-color: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.submit-button:hover {
  background-color: #1d4ed8;
}

.submit-button:disabled {
  background-color: #93c5fd;
  cursor: not-allowed;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

/* Price Breakdown */
.price-breakdown {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 15px;
}

.price-row.total {
  border-top: 2px solid #ddd;
  margin-top: 8px;
  padding-top: 12px;
  font-weight: 700;
  font-size: 18px;
}

/* Download Link */
.download-link {
  display: inline-block;
  padding: 14px 28px;
  background-color: #059669;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  margin-top: 15px;
  transition: background-color 0.2s;
}

.download-link:hover {
  background-color: #047857;
}

/* Product Options */
.product-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.product-option {
  cursor: pointer;
}

.product-option input {
  display: none;
}

.product-option .option-content {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  transition: all 0.2s;
}

.product-option input:checked + .option-content {
  border-color: #059669;
  background-color: #ecfdf5;
}

.product-option:hover .option-content {
  border-color: #059669;
}

.option-name {
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.option-price {
  font-size: 13px;
  color: #666;
  margin-top: 2px;
}

/* Venmo Tip Box */
.venmo-tip-box {
  background: #f0f9ff;
  border: 2px solid #3d95ce;
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0;
  text-align: center;
}

.venmo-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.venmo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.venmo-link:hover {
  background-color: rgba(61, 149, 206, 0.15);
}

.venmo-logo {
  height: 24px;
  width: auto;
}

.venmo-handle {
  font-size: 18px;
  font-weight: 600;
  color: #3d95ce;
}

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

/* Info icon */
.info-icon {
  cursor: pointer;
  color: #2563eb;
  font-size: 14px;
  margin-left: 4px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.info-icon:hover {
  opacity: 1;
}
