/**
 * Stripe Connect Embedded Components Styling (tabs + section layout)
 * Split from app.stripe-connect.css to keep files ≤850 lines.
 */

/* Tab Navigation */
.payments-tabs-nav {
  position: relative;
  display: flex;
  gap: 0;
  padding: 0 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.payments-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.payments-tab i {
  font-size: 0.9375rem;
  opacity: 0.7;
  transition: opacity 0.25s ease;
}

.payments-tab:hover {
  color: rgba(255, 255, 255, 0.8);
}

.payments-tab:hover i {
  opacity: 0.9;
}

.payments-tab.active {
  color: var(--honey);
}

.payments-tab.active i {
  opacity: 1;
}

.payments-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--honey);
  border-radius: 2px 2px 0 0;
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.payments-tab.active::after {
  transform: scaleX(1);
}

/* Notification Banner */
.notification-banner-wrapper {
  margin-bottom: 1.5rem;
}

/* Notification wrapper should not have min-height or padding - let JS control visibility */
.notification-banner-wrapper .stripe-component-wrapper {
  min-height: 0;
  padding: 0;
}

#connect-notification {
  min-height: 0;
  padding: 0;
}

/* Tab Panels */
.payments-tab-panels {
  position: relative;
}

.payments-tab-panel {
  display: none;
  animation: tabFadeIn 0.35s ease;
}

.payments-tab-panel.active {
  display: block;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Onboarding Card */
.onboarding-card-wrapper {
  margin-bottom: 1.5rem;
}

.onboarding-card {
  background: linear-gradient(135deg, #fffbdf 0%, #fff9c4 50%, #fff59d 100%);
  border-radius: 16px;
  border: 1px solid rgba(255, 249, 71, 0.3);
  overflow: hidden;
  box-shadow:
    0 4px 12px rgba(255, 249, 71, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.onboarding-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 249, 71, 0.2);
}

.onboarding-icon {
  width: 44px;
  height: 44px;
  background: var(--charcoal);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.onboarding-icon i {
  font-size: 1.125rem;
  color: var(--honey);
}

.onboarding-text h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.125rem;
}

.onboarding-text p {
  font-size: 0.8125rem;
  color: rgba(11, 11, 11, 0.7);
}

/* Section Cards (Tab Content) */
.tab-section-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.02);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.tab-section-card:hover {
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.04);
}

.section-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.section-title i {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #fff9c4 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--charcoal);
}

.section-title h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
}

.section-subtitle {
  font-size: 0.8125rem;
  color: var(--text-medium);
  margin-left: calc(32px + 0.75rem);
}

/* Overview Grid */
.overview-grid {
  display: grid;
  gap: 1.5rem;
}

.balance-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.balance-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
}

.balance-card .card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.balance-card .card-title i {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--honey) 0%, #FFE947 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--charcoal);
  box-shadow: 0 2px 8px rgba(255, 249, 71, 0.3);
}

.balance-card .card-title h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-medium);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  border-color: var(--honey);
  color: var(--charcoal);
  background: var(--primary-light);
}

.icon-btn i {
  font-size: 0.75rem;
}

.balance-content {
  padding: 1.5rem;
  min-height: 200px;
}

/* Payouts Grid */
.payouts-grid {
  display: grid;
  gap: 1.5rem;
}

.payout-actions-card,
.payout-history-card {
  min-height: 300px;
}

/* Settings Grid */
.settings-grid {
  display: grid;
  gap: 1.5rem;
}

.settings-card {
  min-height: 250px;
}

.documents-card {
  grid-column: 1 / -1;
}

/* Premium Loading States */
.payments-page .stripe-component-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  gap: 1rem;
  color: var(--text-medium);
  font-size: 0.875rem;
}

.payments-page .stripe-component-loading .loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-light);
  border-top-color: var(--honey);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Responsive - Desktop */
@media (min-width: 768px) {
  .payouts-grid {
    grid-template-columns: 1fr 1fr;
  }

  .settings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Responsive - Mobile */
@media (max-width: 767px) {
  .payments-hero-card {
    border-radius: 16px;
  }

  .hero-content {
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
  }

  .hero-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .hero-icon {
    width: 48px;
    height: 48px;
  }

  .hero-icon i {
    font-size: 1.5rem;
  }

  .hero-text h1 {
    font-size: 1.5rem;
  }

  .hero-text p {
    font-size: 0.875rem;
  }

  .payments-tabs-nav {
    padding: 0 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .payments-tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .payments-tab {
    padding: 0.875rem 1rem;
    white-space: nowrap;
  }

  .payments-tab span {
    display: none;
  }

  .payments-tab i {
    font-size: 1.125rem;
  }

  .section-card-header {
    padding: 1rem 1.25rem;
  }

  .section-subtitle {
    margin-left: 0;
    margin-top: 0.5rem;
  }

  .balance-content,
  .payments-page .stripe-component-loading {
    padding: 1.25rem;
  }
}

/* Dark mode support - Disabled for Stripe components
   Stripe embedded components always render with their own white/light theme
   and cannot be styled to match dark mode, so we keep light mode for consistency
@media (prefers-color-scheme: dark) {
  .tab-section-card,
  .balance-card {
    background: #1a1a1a;
    border-color: #2a2a2a;
  }

  .section-card-header,
  .balance-card .card-header {
    background: linear-gradient(180deg, #222 0%, #1a1a1a 100%);
    border-color: #2a2a2a;
  }

  .section-title h3,
  .balance-card .card-title h3 {
    color: #ffffff;
  }

  .section-subtitle {
    color: rgba(255, 255, 255, 0.5);
  }
}
*/
