/* Bank Connection Component & Drawer Styles */

/* ==========================================================================
   1. Data Connection Choice Screen (Onboarding Step 2 Choice)
   ========================================================================== */
.connection-choice-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 10px 0;
}

.connection-choices-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.connection-choice-card {
  background: var(--modern-card-background, #ffffff);
  border: 1.5px solid var(--brokerly-border-medium, rgba(0, 0, 0, 0.09));
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  text-align: left;
  gap: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

html[data-theme="dark"] .connection-choice-card {
  background: var(--brokerly-card-background, #141419);
  border: 1.5px solid var(--brokerly-border-medium, rgba(255, 255, 255, 0.1));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.connection-choice-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.connection-choice-card--bank:hover {
  border-color: var(--brokerly-warm-teal, #1AB3A6) !important;
}

.connection-choice-card--csv:hover {
  border-color: #10B981 !important;
}

.connection-choice-card--manual:hover {
  border-color: #8B5CF6 !important;
}

html[data-theme="dark"] .connection-choice-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .connection-choice-card--bank:hover {
  border-color: #2DD4BF !important;
  box-shadow: 0 8px 24px rgba(26, 179, 166, 0.18);
}

html[data-theme="dark"] .connection-choice-card--csv:hover {
  border-color: #34D399 !important;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.18);
}

html[data-theme="dark"] .connection-choice-card--manual:hover {
  border-color: #A78BFA !important;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.18);
}

.choice-card-icon-wrap {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 0;
  flex-shrink: 0;
  transition: transform 0.25s ease;
  z-index: 2;
  position: relative;
}

.choice-card-icon-wrap svg {
  width: 20px;
  height: 20px;
}

.connection-choice-card:hover .choice-card-icon-wrap {
  transform: scale(1.08);
}

.connection-choice-card--bank .choice-card-icon-wrap {
  background: linear-gradient(135deg, rgba(26, 179, 166, 0.15) 0%, rgba(13, 140, 129, 0.25) 100%);
  border: 1px solid rgba(26, 179, 166, 0.25);
  color: #1AB3A6;
}

.connection-choice-card--csv .choice-card-icon-wrap {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.25) 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #10B981;
}

.connection-choice-card--manual .choice-card-icon-wrap {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(124, 58, 237, 0.25) 100%);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #8B5CF6;
}

html[data-theme="dark"] .connection-choice-card--bank .choice-card-icon-wrap {
  background: linear-gradient(135deg, rgba(26, 179, 166, 0.2) 0%, rgba(13, 140, 129, 0.35) 100%);
  border-color: rgba(26, 179, 166, 0.4);
  color: #2DD4BF;
}

html[data-theme="dark"] .connection-choice-card--csv .choice-card-icon-wrap {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.35) 100%);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34D399;
}

html[data-theme="dark"] .connection-choice-card--manual .choice-card-icon-wrap {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(124, 58, 237, 0.35) 100%);
  border-color: rgba(139, 92, 246, 0.4);
  color: #A78BFA;
}

.choice-card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.choice-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.choice-card-title {
  font-size: 14.5px;
  font-weight: 700;
  margin: 0;
  color: var(--brokerly-text-primary, #111827);
  letter-spacing: -0.2px;
}

html[data-theme="dark"] .choice-card-title {
  color: #ffffff;
}

.choice-card-desc {
  font-size: 12px;
  color: var(--brokerly-text-secondary, #6B7280);
  line-height: 1.45;
  margin: 0 0 6px 0;
  max-width: 100%;
}

html[data-theme="dark"] .choice-card-desc {
  color: rgba(255, 255, 255, 0.7);
}

.choice-card-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.connection-choice-card--bank .choice-card-badge {
  background: rgba(26, 179, 166, 0.12);
  border: 1px solid rgba(26, 179, 166, 0.22);
  color: #0D8C81;
}

.connection-choice-card--csv .choice-card-badge {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.22);
  color: #059669;
}

.connection-choice-card--manual .choice-card-badge,
.choice-card-badge--manual {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.22);
  color: #7C3AED;
}

html[data-theme="dark"] .connection-choice-card--bank .choice-card-badge {
  background: rgba(26, 179, 166, 0.2);
  border-color: rgba(26, 179, 166, 0.35);
  color: #2DD4BF;
}

html[data-theme="dark"] .connection-choice-card--csv .choice-card-badge {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34D399;
}

html[data-theme="dark"] .connection-choice-card--manual .choice-card-badge,
html[data-theme="dark"] .choice-card-badge--manual {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.35);
  color: #A78BFA;
}

.choice-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.choice-card-meta {
  font-size: 11px;
  font-weight: 600;
  color: #10B981;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.choice-card-action {
  font-size: 11.5px;
  font-weight: 600;
  margin-left: auto;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.connection-choice-card--bank .choice-card-action {
  color: #1AB3A6;
}

.connection-choice-card--csv .choice-card-action {
  color: #10B981;
}

.connection-choice-card--manual .choice-card-action {
  color: #8B5CF6;
}

.connection-choice-card:hover .choice-card-action {
  opacity: 1;
  transform: translateX(2px);
}


/* ==========================================================================
   2. Institution Grid & Search (Yapily Bank List)
   ========================================================================== */
.bank-conn-search-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
}

.bank-conn-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.bank-conn-search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--brokerly-border-medium, rgba(255, 255, 255, 0.1));
  border-radius: 14px;
  padding: 14px 16px 14px 44px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.bank-conn-search-input:focus {
  border-color: rgba(26, 179, 166, 0.5);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 12px rgba(26, 179, 166, 0.15);
}

.bank-grid-scroll-area {
  width: 100%;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 24px;
}

.bank-institutions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

@media (max-width: 480px) {
  .bank-institutions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.bank-institution-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 105px;
}

.bank-institution-item:hover {
  background: rgba(26, 179, 166, 0.06);
  border-color: rgba(26, 179, 166, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.bank-institution-item.selected {
  background: rgba(26, 179, 166, 0.1);
  border-color: #1AB3A6;
  box-shadow: 0 0 12px rgba(26, 179, 166, 0.25);
}

.bank-item-logo-container {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.bank-item-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
  box-sizing: border-box;
}

.bank-item-logo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
}

.bank-item-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--brokerly-text-primary, #ffffff);
  line-height: 1.3;
  word-break: break-word;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ==========================================================================
   3. Consent Screen
   ========================================================================== */
.bank-conn-consent-view {
  display: flex;
  flex-direction: column;
  width: 100%;
  animation: fadeIn 0.3s ease;
}

.consent-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] .consent-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.consent-bank-logo-wrap {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  overflow: hidden;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.consent-bank-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  box-sizing: border-box;
}

.consent-header-text h4 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

html[data-theme="dark"] .consent-header-text h4 {
  color: #fff;
}

.consent-header-text span {
  font-size: 13px;
  color: #4b5563;
}

html[data-theme="dark"] .consent-header-text span {
  color: rgba(255, 255, 255, 0.5);
}

.consent-disclosure-box {
  background: rgba(79, 70, 229, 0.03);
  border: 1.5px solid rgba(79, 70, 229, 0.08);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

html[data-theme="dark"] .consent-disclosure-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1.5px solid var(--brokerly-border-medium, rgba(255, 255, 255, 0.08));
}

.consent-disclosure-box h5 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

html[data-theme="dark"] .consent-disclosure-box h5 {
  color: #fff;
}

.consent-disclosure-desc {
  font-size: 13px;
  color: #4b5563;
  margin: 0 0 16px 0;
  line-height: 1.4;
}

html[data-theme="dark"] .consent-disclosure-desc {
  color: rgba(255, 255, 255, 0.6);
}

.consent-permissions-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.consent-permission-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: #374151;
  line-height: 1.4;
}

html[data-theme="dark"] .consent-permission-item {
  color: rgba(255, 255, 255, 0.8);
}

.consent-permission-item strong {
  color: #111827;
  font-weight: 700;
}

html[data-theme="dark"] .consent-permission-item strong {
  color: #fff;
}

.consent-permission-item div div {
  color: #4b5563;
  margin-top: 2px;
}

html[data-theme="dark"] .consent-permission-item div div {
  color: rgba(255, 255, 255, 0.5);
}

.consent-permission-icon {
  color: #1AB3A6;
  flex-shrink: 0;
  margin-top: 2px;
}

.consent-terms-note {
  font-size: 11.5px;
  color: #4b5563;
  line-height: 1.5;
  margin: 0 0 24px 0;
}

html[data-theme="dark"] .consent-terms-note {
  color: rgba(255, 255, 255, 0.4);
}

.consent-terms-note a {
  color: #1AB3A6;
  text-decoration: none;
}

.consent-terms-note a:hover {
  text-decoration: underline;
}

.consent-actions {
  display: flex;
  gap: 12px;
}

.consent-btn {
  flex: 1;
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
}

.consent-btn--back {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.consent-btn--back:hover {
  background: #e5e7eb;
}

html[data-theme="dark"] .consent-btn--back {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .consent-btn--back:hover {
  background: rgba(255, 255, 255, 0.12);
}

.consent-btn--connect {
  background: linear-gradient(135deg, #1AB3A6, #0D8C81);
  color: #fff;
  box-shadow: 0 4px 14px rgba(26, 179, 166, 0.35);
}

.consent-btn--connect:hover {
  box-shadow: 0 6px 20px rgba(26, 179, 166, 0.45);
  transform: translateY(-1px);
}


/* ==========================================================================
   4. Simulated Bank Login Portal Overlay (Iframe-like modal)
   ========================================================================== */
.bank-portal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 999999 !important;
  background: rgba(15, 23, 42, 0.7) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.bank-portal-container {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  color: #1f2937;
  overflow: hidden;
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.bank-portal-header {
  background: #111827;
  color: white;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 4px solid #1AB3A6;
}

.bank-portal-logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bank-portal-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  box-sizing: border-box;
}

.bank-portal-logo-text {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.5px;
}

.bank-portal-ssl-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  background: rgba(26, 179, 166, 0.15);
  color: #1AB3A6;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.bank-portal-body {
  padding: 28px 24px;
}

.bank-portal-welcome {
  text-align: center;
  margin-bottom: 24px;
}

.bank-portal-welcome h3 {
  margin: 0 0 6px 0;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.bank-portal-welcome p {
  margin: 0;
  font-size: 13px;
  color: #4b5563;
}

.bank-portal-form-group {
  margin-bottom: 16px;
  text-align: left;
}

.bank-portal-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #374151;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.bank-portal-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 14px;
  color: #111827;
  outline: none;
  background: #f9fafb;
  transition: border-color 0.2s ease;
}

.bank-portal-input:focus {
  border-color: #1AB3A6;
  background: #ffffff;
}

.bank-portal-disclosure {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.5;
  background: #f3f4f6;
  padding: 12px;
  border-radius: 8px;
  margin: 20px 0 24px 0;
  border-left: 3px solid #1AB3A6;
}

.bank-portal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bank-portal-btn {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-align: center;
  transition: all 0.2s ease;
}

.bank-portal-btn--primary {
  background: #111827;
  color: white;
}

.bank-portal-btn--primary:hover {
  background: #1f2937;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.25);
}

.bank-portal-btn--secondary {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.bank-portal-btn--secondary:hover {
  background: #e5e7eb;
  color: #1f2937;
}


/* ==========================================================================
   5. Sync Loader & Success Screen
   ========================================================================== */
.bank-conn-loader-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  animation: fadeIn 0.3s ease;
}

.premium-circle-loader {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 30px;
}

.loader-glow-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 179, 166, 0.2), transparent 70%);
  animation: loaderGlowPulse 2s ease-in-out infinite;
}

.loader-outer-spinner {
  width: 100%;
  height: 100%;
  border: 3px solid rgba(26, 179, 166, 0.15);
  border-top-color: #1AB3A6;
  border-right-color: #1AB3A6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-inner-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #1AB3A6;
  font-size: 24px;
}

.sync-status-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  margin-top: 10px;
}

.sync-message-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--brokerly-text-secondary, rgba(255, 255, 255, 0.45));
  text-align: left;
  transition: all 0.3s ease;
  opacity: 0.5;
}

.sync-message-line.active {
  color: #fff;
  opacity: 1;
  font-weight: 600;
}

.sync-message-line.completed {
  color: rgba(26, 179, 166, 0.85);
  opacity: 0.85;
}

.sync-line-bullet {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.sync-message-line.active .sync-line-bullet {
  border-color: #1AB3A6;
  background: rgba(26, 179, 166, 0.1);
  animation: loaderGlowPulse 1.5s infinite;
}

.sync-message-line.completed .sync-line-bullet {
  border-color: #1AB3A6;
  background: #1AB3A6;
  color: white;
}

/* Success View */
.bank-conn-success-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-success-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #1AB3A6, #0D8C81);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(26, 179, 166, 0.4);
  animation: successIconPop 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.bank-conn-success-view h3 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 10px 0;
  color: #fff;
}

.bank-conn-success-view p {
  font-size: 14px;
  color: var(--brokerly-text-secondary, rgba(255, 255, 255, 0.65));
  margin: 0;
  line-height: 1.5;
}


/* ==========================================================================
   6. General Utilities & Animation keyframes
   ========================================================================== */
.back-to-choices-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--modern-input-bg, rgba(0, 0, 0, 0.04));
  border: 1px solid var(--brokerly-border-medium, rgba(0, 0, 0, 0.12));
  color: var(--brokerly-text-primary, #111827);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 6px 14px;
  border-radius: 9999px;
  align-self: flex-start;
}

.back-to-choices-btn:hover {
  color: var(--brokerly-warm-teal, #1AB3A6);
  border-color: var(--brokerly-warm-teal, #1AB3A6);
  background: rgba(26, 179, 166, 0.08);
  transform: translateX(-2px);
}

html[data-theme="dark"] .back-to-choices-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--brokerly-text-primary, #ffffff);
}

html[data-theme="dark"] .back-to-choices-btn:hover {
  color: #2DD4BF;
  border-color: #2DD4BF;
  background: rgba(45, 212, 191, 0.12);
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes loaderGlowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes successIconPop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 600px) {
  .connection-choices-grid {
    gap: 10px;
  }

  .connection-choice-card {
    padding: 13px 14px;
    border-radius: 14px;
    gap: 11px;
    min-height: unset;
  }

  .choice-card-icon-wrap {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    font-size: 18px;
  }

  .choice-card-icon-wrap svg {
    width: 18px !important;
    height: 18px !important;
  }

  .choice-card-title {
    font-size: 13.5px;
    margin-bottom: 2px;
  }

  .choice-card-desc {
    font-size: 11.5px;
    margin-bottom: 4px;
    line-height: 1.35;
    max-width: 100%;
  }

  .choice-card-badge {
    font-size: 9.5px;
    padding: 1.5px 6px;
  }
}

.premium-button-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* ==========================================================================
   10. Yapily Hosted Pages Launcher Styles
   ========================================================================== */
.bank-connection-hosted-launcher {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  padding: 4px 0;
  animation: fadeIn 0.3s ease;
}

.hosted-launcher-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 16px;
  background: linear-gradient(180deg, rgba(26, 179, 166, 0.08) 0%, rgba(26, 179, 166, 0.02) 100%);
  border: 1px solid rgba(26, 179, 166, 0.2);
  border-radius: 20px;
}

.hosted-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(26, 179, 166, 0.15);
  color: #1AB3A6;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.hosted-hero-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--brokerly-text-primary, #ffffff);
  margin: 0 0 8px 0;
}

.hosted-hero-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--brokerly-text-secondary, rgba(255, 255, 255, 0.65));
  margin: 0;
  max-width: 380px;
}

.hosted-country-selector-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hosted-field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--brokerly-text-secondary, rgba(255, 255, 255, 0.6));
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hosted-country-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.country-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--brokerly-text-primary, #ffffff);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.country-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.country-pill.active {
  background: rgba(26, 179, 166, 0.15);
  border-color: #1AB3A6;
  color: #1AB3A6;
  box-shadow: 0 0 12px rgba(26, 179, 166, 0.2);
}

.hosted-supported-ribbon {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.supported-ribbon-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--brokerly-text-secondary, rgba(255, 255, 255, 0.5));
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.supported-banks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 480px) {
  .supported-banks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.supported-bank-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--brokerly-text-primary, #ffffff);
  overflow: hidden;
}

.supported-bank-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  padding: 2px;
  flex-shrink: 0;
}

.supported-bank-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hosted-security-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}

.security-card-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.security-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

.security-card-item strong {
  display: block;
  font-size: 12px;
  color: var(--brokerly-text-primary, #ffffff);
  margin-bottom: 2px;
}

.security-card-item p {
  font-size: 11px;
  line-height: 1.35;
  color: var(--brokerly-text-secondary, rgba(255, 255, 255, 0.55));
  margin: 0;
}

.hosted-launch-action-wrap {
  margin-top: 4px;
}

.hosted-primary-connect-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 14px;
  background: linear-gradient(135deg, #1AB3A6 0%, #0ea5e9 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(26, 179, 166, 0.3);
  transition: all 0.25s ease;
}

.hosted-primary-connect-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 179, 166, 0.45);
}


