/*
================================================================================
THREE-STEP-MODAL.CSS - Modern Three-Step Booking Modal
================================================================================

PURPOSE:
Modern, mobile-first three-step booking flow inspired by provided mockups.
Converted from Tailwind CSS to vanilla CSS using existing design system.

FEATURES:
- Three-step progressive disclosure (dates → details → payment)
- Step progress indicator
- Mobile-optimized bottom sheet design
- Smooth transitions between steps
- Preserves all existing form field IDs and functionality

DESIGN TOKENS:
- Primary color: #01b0bb (from variables.css)
- Uses existing CSS variable system
- Matches site's design language

================================================================================
*/

/* =============================================================================
   MODAL OVERLAY & CONTAINER
   ============================================================================= */

/* Override base modal styles for three-step variant */
.modal.modal--three-step {
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 0;
}

/* Keep the base modal's show/hide behavior */
.modal.modal--three-step:not([hidden]) {
  display: flex;
}

.modal.modal--three-step .modal-content {
  background: white;
  width: 100%;
  max-width: 560px; /* Increased from 480px for better form layout */
  margin: auto;
  border-radius: 20px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border: none; /* Remove old modal border */
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
}

.modal.modal--three-step:not([hidden]) .modal-content {
  transform: translateY(0);
}

/* Desktop: Center modal */
@media (min-width: 768px) {
  .modal.modal--three-step {
    align-items: center;
  }

  .modal.modal--three-step .modal-content {
    border-radius: 20px;
    max-height: 85vh;
  }
}

/* =============================================================================
   MODAL HEADER
   ============================================================================= */

.three-step-modal__header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.three-step-modal__header--step-1 {
  justify-content: space-between;
}

.three-step-modal__header--step-2,
.three-step-modal__header--step-3 {
  justify-content: center;
  position: relative;
}

.three-step-modal__back-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  color: var(--color-gray-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 1rem;
  transition: color 0.2s ease;
}

.three-step-modal__back-btn:hover {
  color: var(--color-gray-900);
}

.three-step-modal__back-btn svg {
  width: 24px;
  height: 24px;
}

.three-step-modal__close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--color-gray-600);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s ease;
}

/* Position close button absolutely on steps 2 and 3 */
.three-step-modal__header--step-2 .three-step-modal__close-btn,
.three-step-modal__header--step-3 .three-step-modal__close-btn {
  position: absolute;
  right: 1rem;
}

.three-step-modal__close-btn:hover {
  color: var(--color-gray-900);
}

.three-step-modal__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin: 0;
}

/* =============================================================================
   STEP PROGRESS INDICATOR
   ============================================================================= */

.three-step-progress {
  padding: 1.5rem 1.5rem 1rem;
  flex-shrink: 0;
}

.three-step-progress__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-600);
  margin-bottom: 0.5rem;
  display: block;
}

.three-step-progress__bar {
  width: 100%;
  height: 0.5rem;
  background-color: var(--color-gray-200);
  border-radius: 9999px;
  overflow: hidden;
}

.three-step-progress__fill {
  height: 100%;
  background-color: var(--color-primary);
  border-radius: 9999px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.three-step-progress__fill--step-1 {
  width: 33.33%;
}

.three-step-progress__fill--step-2 {
  width: 66.66%;
}

.three-step-progress__fill--step-3 {
  width: 100%;
}

/* =============================================================================
   MODAL BODY (SCROLLABLE CONTENT)
   ============================================================================= */

.three-step-modal__body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

/* Junk Removal Form - Make it fill the modal properly */
#junkRemovalForm {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#junkRemovalForm .three-step-modal__body {
  flex: 1;
  overflow-y: auto;
}

#junkRemovalForm .three-step-modal__footer {
  flex-shrink: 0;
}

/* When junk form is hidden, remove it from layout completely */
#junkRemovalForm[style*="display: none"],
#junkRemovalModal.showing-confirmation #junkRemovalForm {
  display: none !important;
  position: absolute;
  visibility: hidden;
}

/* Hide the junk modal header when confirmation is shown */
#junkRemovalModal .three-step-modal__header--step-1 {
  flex-shrink: 0;
}

/* When confirmation is visible, hide the external header */
#junkRemovalModal:has(#junk-confirmation[style*="display: flex"]) .three-step-modal__header--step-1,
#junkRemovalModal.showing-confirmation .three-step-modal__header--step-1 {
  display: none !important;
}

/* =============================================================================
   STEP CONTAINERS
   ============================================================================= */

.three-step__step {
  display: none;
}

.three-step__step.active {
  display: block;
  animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* =============================================================================
   STEP 1: DATE SELECTION
   ============================================================================= */

.three-step__calendar-wrapper {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.three-step__date-summary {
  background: rgba(1, 176, 187, 0.1);
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.three-step__date-summary-item {
  text-align: center;
  flex: 1;
}

.three-step__date-summary-label {
  font-size: 0.875rem;
  color: var(--color-gray-600);
  margin-bottom: 0.25rem;
  display: block;
}

.three-step__date-summary-value {
  font-weight: 700;
  color: var(--color-gray-900);
  font-size: 0.9375rem;
}

.three-step__time-section {
  margin-top: 1.5rem;
}

.three-step__section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 1rem;
}

/* Notice section for rental period information */
.three-step__notice {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background-color: var(--color-primary-50, #f0fdfe);
  border-left: 3px solid var(--color-primary-500, #01b0bb);
  border-radius: 6px;
}

.three-step__notice-text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-gray-700, #334155);
  line-height: 1.5;
}

.three-step__time-select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-gray-300);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--color-gray-900);
  background-color: white;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
  padding-right: 3rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.three-step__time-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(1, 176, 187, 0.1);
}

.three-step__time-select option {
  padding: 0.75rem 1rem;
  background-color: white;
  color: var(--color-gray-900);
  font-size: 1rem;
  font-family: inherit;
}

.three-step__time-select option:hover,
.three-step__time-select option:focus {
  background-color: var(--color-primary-light, #e0f7f8);
  color: var(--color-primary);
}

.three-step__time-select option:checked {
  background-color: var(--color-primary);
  color: white;
}

/* =============================================================================
   STEP 2: DELIVERY DETAILS & CONTACT INFO
   ============================================================================= */

.three-step__form-section {
  margin-bottom: 2rem;
}

.three-step__form-section:last-child {
  margin-bottom: 0;
}

.three-step__form-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 1.5rem;
}

.three-step__form-group {
  margin-bottom: 1rem;
}

.three-step__form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-700);
  margin-bottom: 0.375rem;
}

.three-step__form-input,
.three-step__form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-gray-300);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--color-gray-900);
  background-color: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.three-step__form-input::placeholder,
.three-step__form-textarea::placeholder {
  color: var(--color-gray-400);
}

.three-step__form-input:focus,
.three-step__form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(1, 176, 187, 0.1);
}

.three-step__form-input.error,
.three-step__form-textarea.error {
  border-color: #dc2626;
}

.three-step__form-textarea {
  resize: vertical;
  min-height: 5rem;
}

.three-step__form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.three-step__optional-label {
  color: var(--color-gray-500);
  font-weight: 400;
}

/* =============================================================================
   STEP 3: CHECKOUT & PAYMENT
   ============================================================================= */

.three-step__payment-card {
  background: white;
  border: 1px solid var(--color-gray-200);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.three-step__payment-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 1rem;
}

.three-step__payment-summary {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.5rem;
}

.three-step__payment-line-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.three-step__payment-line-item--total {
  font-weight: 700;
}

.three-step__payment-divider {
  height: 1px;
  background-color: var(--color-gray-300);
  margin: 0.75rem 0;
}

.three-step__payment-total {
  font-size: 1rem;
  color: var(--color-gray-900);
}

.three-step__payment-amount {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-gray-900);
}

.three-step__payment-description {
  font-size: 0.875rem;
  color: var(--color-gray-600);
  line-height: 1.5;
}

.three-step__payment-description p {
  margin: 0 0 0.5rem 0;
}

.three-step__payment-description p:last-child {
  margin-bottom: 0;
}

.three-step__square-container {
  min-height: 120px;
  background-color: white;
  border-radius: 8px;
  border: 1px solid var(--color-gray-300);
  padding: 1rem;
  /* Remove flexbox centering that breaks Square SDK iframe rendering */
  display: block;
  width: 100%;
}

/* Ensure Square SDK iframe and wrapper are visible */
#card-container .sq-card-wrapper,
#card-container .sq-card-wrapper > div,
#card-container iframe {
  display: block !important;
  visibility: visible !important;
  width: 100% !important;
  min-height: 60px !important;
}

.three-step__square-placeholder {
  color: var(--color-gray-500);
  font-size: 0.875rem;
}

.three-step__terms-wrapper {
  display: flex;
  align-items: start;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.three-step__terms-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
  border-radius: 0.25rem;
  border: 2px solid var(--color-gray-300);
  color: var(--color-primary);
  cursor: pointer;
}

.three-step__terms-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(1, 176, 187, 0.1);
}

.three-step__terms-label {
  font-size: 0.875rem;
  color: var(--color-gray-900);
  line-height: 1.5;
}

.three-step__terms-label a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.three-step__terms-label a:hover {
  text-decoration: underline;
}

/* =============================================================================
   MODAL FOOTER
   ============================================================================= */

.three-step-modal__footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-gray-200);
  flex-shrink: 0;
  background: white;
}

.three-step-modal__footer--step-2 {
  display: flex;
  gap: 1rem;
}

.three-step-modal__btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.three-step-modal__btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.three-step-modal__btn-primary:hover {
  background-color: var(--color-primary-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(1, 176, 187, 0.3);
}

.three-step-modal__btn-primary:active {
  transform: translateY(0);
}

.three-step-modal__btn-primary:disabled {
  background-color: var(--color-gray-300);
  cursor: not-allowed;
  transform: none;
}

.three-step-modal__btn-secondary {
  background-color: var(--color-gray-200);
  color: var(--color-gray-800);
}

.three-step-modal__btn-secondary:hover {
  background-color: var(--color-gray-300);
}

.three-step-modal__btn--half {
  width: auto;
  flex: 1;
}

/* =============================================================================
   ERROR MESSAGES
   ============================================================================= */

.three-step__error-message {
  font-size: 0.875rem;
  color: #dc2626;
  margin-top: 0.25rem;
  display: none;
}

.three-step__error-message.visible {
  display: block;
}

.three-step__field-help {
  font-size: 0.8125rem;
  color: var(--color-gray-500);
  margin-top: 0.375rem;
  line-height: 1.4;
}

/* =============================================================================
   LOADING STATES
   ============================================================================= */

.three-step__loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.three-step__spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* =============================================================================
   MOBILE PULL HANDLE (Step 2 style)
   ============================================================================= */

.three-step-modal__pull-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0;
  flex-shrink: 0;
}

.three-step-modal__pull-bar {
  width: 2.5rem;
  height: 0.375rem;
  background-color: var(--color-gray-300);
  border-radius: 9999px;
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

.three-step__hidden {
  display: none !important;
}

.three-step__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* =============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================= */

@media (min-width: 640px) {
  .three-step-modal__body {
    padding: 2rem;
  }

  .three-step__section-title {
    font-size: 1.5rem;
  }

  .three-step__form-section-title {
    font-size: 1.75rem;
  }
}

/* Mobile responsive calendar fix for screens under 440px */
@media (max-width: 440px) {
  .three-step__calendar-wrapper {
    padding: 0.5rem;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
  }

  .three-step__date-summary {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}

/* =============================================================================
   PROFESSIONAL CHECKOUT DESIGN (Step 3)
   Inspired by Stripe, Square, and modern payment UX best practices
   ============================================================================= */

/* Order Summary Card */
.checkout__summary-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 1px solid var(--color-gray-200);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.checkout__section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin: 0 0 1rem 0;
}

.checkout__line-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}

.checkout__item-label {
  font-size: 0.9375rem;
  color: var(--color-gray-700);
}

.checkout__item-label--muted {
  font-size: 0.875rem;
  color: var(--color-gray-600);
}

.checkout__item-label--total {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-gray-900);
}

.checkout__item-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-gray-900);
}

.checkout__item-value--muted {
  font-size: 0.875rem;
  color: var(--color-gray-600);
}

.checkout__item-value--total {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}

.checkout__divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-gray-300), transparent);
  margin: 0.5rem 0;
}

.checkout__summary-note {
  font-size: 0.8125rem;
  color: var(--color-gray-600);
  margin: 1rem 0 0 0;
  line-height: 1.5;
}

/* Payment Method Card */
.checkout__payment-card {
  background: white;
  border: 1px solid var(--color-gray-200);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Security Badge */
.checkout__security-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: #0369a1;
}

.checkout__security-badge svg {
  flex-shrink: 0;
  color: #0284c7;
}

/* Card Container - Professional Stripe-like styling */
.checkout__card-container {
  min-height: 120px;
  background: white;
  border: 2px solid var(--color-gray-300);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  display: block;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.checkout__card-container:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(1, 176, 187, 0.1);
}

/* Ensure Square SDK iframe and wrapper are visible */
#card-container .sq-card-wrapper,
#card-container .sq-card-wrapper > div,
#card-container iframe {
  display: block !important;
  visibility: visible !important;
  width: 100% !important;
  min-height: 60px !important;
}

/* Accepted Cards */
.checkout__accepted-cards {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-gray-200);
}

.checkout__accepted-cards-label {
  font-size: 0.8125rem;
  color: var(--color-gray-600);
  font-weight: 500;
}

.checkout__card-icons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.checkout__card-icons svg {
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Terms of Service */
.checkout__terms-wrapper {
  display: flex;
  align-items: start;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--color-gray-50);
  border-radius: 8px;
}

.checkout__terms-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
  cursor: pointer;
  accent-color: var(--color-primary);
}

.checkout__terms-label {
  font-size: 0.875rem;
  color: var(--color-gray-700);
  line-height: 1.5;
  cursor: pointer;
}

.checkout__terms-label a {
  color: var(--color-primary);
  text-decoration: underline;
  font-weight: 500;
}

.checkout__terms-label a:hover {
  color: var(--color-primary-700);
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .checkout__summary-card,
  .checkout__payment-card {
    padding: 1.25rem;
    border-radius: 10px;
  }

  .checkout__section-title {
    font-size: 1rem;
  }

  .checkout__line-item {
    padding: 0.625rem 0;
  }

  .checkout__item-value--total {
    font-size: 1.125rem;
  }

  .checkout__security-badge {
    font-size: 0.8125rem;
    padding: 0.625rem 0.875rem;
  }

  .checkout__card-icons svg {
    width: 28px;
    height: 18px;
  }
}


/* =============================================================================
   PREMIUM MINIMALIST CHECKOUT (Apple/Tesla Style)
   Clean, trustworthy, professional - no cheesy graphics
   ============================================================================= */

.premium-checkout__summary {
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.premium-checkout__summary-header {
  margin-bottom: 20px;
}

.premium-checkout__title {
  font-size: 17px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0;
  letter-spacing: -0.022em;
}

.premium-checkout__line-items {
  margin-bottom: 16px;
}

.premium-checkout__line-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.premium-checkout__line-item:last-child {
  border-bottom: none;
}

.premium-checkout__line-item--subtle {
  opacity: 0.7;
}

.premium-checkout__label {
  font-size: 15px;
  color: #1d1d1f;
  font-weight: 400;
}

.premium-checkout__value {
  font-size: 15px;
  color: #1d1d1f;
  font-weight: 500;
  font-feature-settings: 'tnum';
}

.premium-checkout__total-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid #d2d2d7;
}

.premium-checkout__total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.premium-checkout__total-label {
  font-size: 17px;
  font-weight: 600;
  color: #1d1d1f;
  letter-spacing: -0.022em;
}

.premium-checkout__total-value {
  font-size: 24px;
  font-weight: 600;
  color: #1d1d1f;
  font-feature-settings: 'tnum';
  letter-spacing: -0.022em;
}

.premium-checkout__includes {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  font-size: 13px;
  color: #6e6e73;
}

.premium-checkout__includes svg {
  flex-shrink: 0;
  color: #06c;
}

.premium-checkout__payment {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.premium-checkout__payment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.premium-checkout__secure-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #06c;
  font-weight: 500;
}

.premium-checkout__secure-badge svg {
  flex-shrink: 0;
}

.premium-checkout__card-input {
  min-height: 50px;
  background: white;
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.premium-checkout__card-input:focus-within {
  border-color: #06c;
  box-shadow: 0 0 0 4px rgba(0, 125, 250, 0.1);
}

#card-container .sq-card-wrapper,
#card-container .sq-card-wrapper > div,
#card-container iframe {
  display: block !important;
  visibility: visible !important;
  width: 100% !important;
  min-height: 50px !important;
}

.premium-checkout__payment-note {
  font-size: 13px;
  color: #6e6e73;
  text-align: center;
}

.premium-checkout__terms {
  margin-top: 20px;
}

.premium-checkout__checkbox-label {
  display: flex;
  gap: 12px;
  cursor: pointer;
  align-items: start;
}

.premium-checkout__checkbox {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #06c;
  border-radius: 6px;
}

.premium-checkout__checkbox-text {
  font-size: 13px;
  color: #6e6e73;
  line-height: 1.6;
}

.premium-checkout__checkbox-text a {
  color: #06c;
  text-decoration: none;
  font-weight: 500;
}

.premium-checkout__checkbox-text a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .premium-checkout__summary,
  .premium-checkout__payment {
    padding: 20px;
    border-radius: 12px;
  }

  .premium-checkout__title {
    font-size: 16px;
  }

  .premium-checkout__total-value {
    font-size: 20px;
  }
}

/* Override total value to use brand color instead of black */
.premium-checkout__total-value {
  color: #01b0bb !important;
}

/* Minimal styling - let Square SDK render naturally */
.premium-checkout__card-input {
  min-height: 200px;
  padding: 16px;
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
}

/* DO NOT style Square's internal elements - they need to render naturally */
#card-container {
  width: 100%;
  min-height: 150px;
}

/* Only ensure the wrapper is visible and full-width */
#card-container .sq-card-wrapper {
  width: 100%;
  min-height: 120px;
}

/* Let Square SDK control iframe dimensions - DO NOT override height */
#card-container iframe {
  width: 100%;
  border: none;
}
