/* Gift Certificate Styles */

/* Gift Certificate Screens - Make scrollable */
#gift-purchase-screen,
#gift-redemption-screen,
#gift-success-screen {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

#gift-purchase-content,
#gift-redemption-content {
  min-height: 100%;
}

.gift-purchase-container,
.gift-redemption-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 16px;
  min-height: 100vh;
}

.gift-purchase-container h2,
.gift-redemption-container h2 {
  font-size: 32px;
  color: #1F4636;
  margin-bottom: 8px;
  text-align: center;
}

.gift-subtitle {
  text-align: center;
  color: #3B4B54;
  font-size: 16px;
  margin-bottom: 40px;
}

/* How It Works Section */
.gift-how-it-works {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 40px;
  border: 2px solid #bae6fd;
}

.gift-how-it-works h3 {
  font-size: 24px;
  color: #1F4636;
  text-align: center;
  margin-bottom: 24px;
}

.gift-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.gift-option-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.gift-option-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.gift-option-card h4 {
  font-size: 18px;
  color: #1F4636;
  margin-bottom: 8px;
}

.gift-option-card p {
  font-size: 14px;
  color: #6B7280;
  line-height: 1.6;
  margin: 0;
}

/* Tier Selection */
.tier-selection {
  margin-bottom: 32px;
}

.tier-selection h3 {
  font-size: 20px;
  color: #1F4636;
  margin-bottom: 16px;
  text-align: center;
}

.gift-tier-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.gift-tier-card {
  background: white;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gift-tier-card:hover {
  border-color: #2D6F7E;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.gift-tier-card.selected {
  border-color: #2D6F7E;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.gift-tier-vip {
  border-color: #F2B632;
}

.gift-tier-vip:hover {
  border-color: #F2B632;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.tier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.tier-header h4 {
  font-size: 24px;
  color: #1F4636;
  margin: 0;
}

.tier-badge {
  background: #F2B632;
  color: #1F4636;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tier-price {
  margin-bottom: 16px;
}

.price-amount {
  font-size: 36px;
  font-weight: 700;
  color: #1F4636;
}

.price-currency {
  font-size: 16px;
  color: #6B7280;
  margin-left: 4px;
}

.tier-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tier-features li {
  padding: 8px 0;
  color: #3B4B54;
  font-size: 14px;
}

/* Gift Form */
.gift-form {
  background: white;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gift-form h3 {
  font-size: 20px;
  color: #1F4636;
  margin-bottom: 24px;
}

/* Selected Tier Indicator */
.selected-tier-indicator {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #86efac;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tier-label {
  font-size: 14px;
  font-weight: 600;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tier-display {
  font-size: 18px;
  font-weight: 700;
  color: #15803d;
}

.tier-display.tier-vip {
  color: #b45309;
}

.tier-display.tier-vip::before {
  content: "⭐ ";
}

/* Delivery Method Selector */
.delivery-method-section {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 2px solid #E5E7EB;
}

.section-label {
  display: block;
  font-weight: 600;
  color: #1F4636;
  font-size: 16px;
  margin-bottom: 16px;
}

.delivery-method-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.delivery-option {
  position: relative;
  cursor: pointer;
  margin: 0;
}

.delivery-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.delivery-option-content {
  background: #F9FAFB;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  height: 100%;
}

.delivery-option:hover .delivery-option-content {
  border-color: #2D6F7E;
  background: #F0F9FF;
}

.delivery-option input[type="radio"]:checked ~ .delivery-option-content {
  border-color: #2D6F7E;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  box-shadow: 0 4px 12px rgba(45, 111, 126, 0.15);
}

.delivery-option-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.delivery-icon {
  font-size: 28px;
}

.delivery-title {
  font-weight: 600;
  color: #1F4636;
  font-size: 16px;
}

.delivery-description {
  font-size: 13px;
  color: #6B7280;
  margin: 0;
  line-height: 1.5;
  padding-left: 40px;
}

.gift-form .form-group {
  margin-bottom: 20px;
}

.gift-form label {
  display: block;
  font-weight: 600;
  color: #1F4636;
  margin-bottom: 8px;
  font-size: 14px;
}

.gift-form input,
.gift-form textarea,
.gift-form select {
  width: 100%;
  padding: 12px;
  border: 2px solid #E5E7EB;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.gift-form input:focus,
.gift-form textarea:focus,
.gift-form select:focus {
  outline: none;
  border-color: #2D6F7E;
}

.gift-form small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #6B7280;
}

.gift-form textarea {
  resize: vertical;
  min-height: 100px;
}

/* Datetime input with clear button */
.datetime-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.datetime-input-wrapper input {
  flex: 1;
}

.btn-clear-date {
  padding: 8px 16px;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #991b1b;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-clear-date:hover {
  background: #fecaca;
  border-color: #fca5a5;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* Gift Code Input */
.gift-code-input-section {
  background: white;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
}

/* Gift Details Card */
.gift-details-section {
  margin-bottom: 24px;
}

.gift-info-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #86efac;
  border-radius: 12px;
  padding: 24px;
}

.gift-info-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.gift-icon {
  font-size: 32px;
}

.gift-info-header h3 {
  font-size: 24px;
  color: #166534;
  margin: 0;
}

.gift-info-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid #bbf7d0;
}

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

.info-row .label {
  font-weight: 600;
  color: #166534;
  min-width: 100px;
}

.info-row .value {
  text-align: right;
  color: #15803d;
  flex: 1;
}

.message-row {
  flex-direction: column;
  align-items: flex-start;
}

.message-row .value {
  text-align: left;
  margin-top: 8px;
  font-style: italic;
  color: #15803d;
}

/* Edition Selection */
.edition-selection-section {
  background: white;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.edition-selection-section h3 {
  font-size: 20px;
  color: #1F4636;
  margin-bottom: 8px;
}

.edition-selection-section p {
  color: #6B7280;
  margin-bottom: 16px;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 2px solid #E5E7EB;
  border-radius: 8px;
  font-size: 16px;
  background: white;
  cursor: pointer;
}

.form-control:focus {
  outline: none;
  border-color: #2D6F7E;
}

/* Success Page */
.success-container {
  max-width: 600px;
  margin: 80px auto;
  padding: 48px;
  text-align: center;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: white;
}

.success-container h2 {
  font-size: 32px;
  color: #1F4636;
  margin-bottom: 16px;
}

.success-container p {
  color: #6B7280;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 8px;
}

.success-details {
  background: #f0fdf4;
  padding: 16px;
  border-radius: 8px;
  margin: 24px 0;
  color: #166534 !important;
}

.success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

/* Responsive */
@media (max-width: 768px) {
  .gift-how-it-works {
    padding: 24px 16px;
  }

  .gift-options-grid {
    grid-template-columns: 1fr;
  }

  .gift-tier-cards {
    grid-template-columns: 1fr;
  }

  .delivery-method-options {
    grid-template-columns: 1fr;
  }

  .delivery-description {
    padding-left: 0;
    margin-top: 8px;
  }

  .datetime-input-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-clear-date {
    width: 100%;
  }

  .gift-form,
  .gift-code-input-section,
  .edition-selection-section {
    padding: 24px 16px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
  }

  .success-container {
    margin: 40px 16px;
    padding: 32px 24px;
  }

  .success-actions {
    flex-direction: column;
  }

  .success-actions .btn {
    width: 100%;
  }
}

/* Error Messages */
.error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 16px;
  color: #991b1b;
  margin-top: 16px;
  font-size: 14px;
}

.error-message.hidden {
  display: none;
}
