/**
 * AyaSend Premium Fintech Treatment v2.0
 * Comprehensive UI polish for production-grade fintech feel
 * 
 * Sections:
 * 1. Popular Corridors - Clean tappable cards
 * 2. Best Overall Banner - Premium hero card
 * 3. Provider List Rows - Scannable design
 * 4. Hero Section - Tightened spacing
 * 5. Mobile Menu - Clean minimal
 */

/* ========================================
   1. POPULAR CORRIDORS - CLEAN & TAPPABLE
   ======================================== */

/* Premium Corridor Cards - v2.0 Clean Tappable Design */
.popular-corridor-card {
  background: #ffffff;
  border: none;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 12px;
  transition:
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out,
    background-color 0.15s ease-out;
  /* Button reset */
  font: inherit;
  text-align: left;
  outline: none;
  width: 100%;
}

.popular-corridor-card:hover,
.popular-corridor-card:focus {
  transform: translateY(-2px);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
  outline: none;
}

.pc-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pc-flags {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 18px;
  line-height: 1.3;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Mobile flag images - properly sized */
.pc-flag-img {
  width: 20px !important;
  height: 15px !important;
  border-radius: 2px !important;
  object-fit: cover !important;
  display: inline-block !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
  flex-shrink: 0 !important;
}

.pc-arrow-text {
  font-size: 12px !important;
  color: #94a3b8 !important;
  font-weight: 400 !important;
  margin: 0 2px !important;
}

.pc-names {
  font-size: 13px;
  color: #0f172a;
  font-weight: 500;
  line-height: 1.4;
}

.pc-meta {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pc-pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 500;
  line-height: 1.3;
}

.pc-arrow {
  font-size: 18px;
  color: #cbd5e1;
  line-height: 1;
}

/* Dark mode */
html.dark .popular-corridor-card {
  background: #1E293B;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

html.dark .popular-corridor-card:hover,
html.dark .popular-corridor-card:focus {
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.4);
  background: rgba(30, 41, 59, 0.95);
}

html.dark .pc-names {
  color: #F8FAFC;
}

html.dark .pc-pill {
  background: rgba(79, 70, 229, 0.2);
  color: #a5b4fc;
}

/* ========================================
   2. BEST OVERALL BANNER - PREMIUM HERO CARD
   ======================================== */

.best-overall-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 20px 12px 28px;
}

.best-overall-wrapper > * {
  width: 100%;
  max-width: 640px;
}

.best-overall-card {
  background: linear-gradient(135deg, #0078ff, #00b4ff);
  border-radius: 24px;
  padding: 18px 16px 16px;
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(0, 120, 255, 0.28);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bo-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bo-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.9;
  font-weight: 600;
}

.bo-chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.16);
  font-weight: 500;
}

.bo-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bo-provider-logo {
  flex-shrink: 0;
}

.bo-provider-logo img {
  width: 40px;
  height: auto;
  border-radius: 8px;
}

.bo-text {
  flex: 1;
}

.bo-provider-name {
  font-size: 13px;
  opacity: 0.95;
  margin-bottom: 2px;
  font-weight: 500;
}

.bo-amount {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 2px;
  line-height: 1.2;
}

.bo-sub {
  font-size: 12px;
  opacity: 0.9;
}

.bo-cta-row {
  margin-top: 4px;
}

.bo-cta-btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  background: #ffffff;
  color: #0369a1;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition:
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out,
    background-color 0.15s ease-out;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
}

.bo-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.24);
}

/* Dark mode */
html.dark .best-overall-card {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
}

html.dark .bo-cta-btn {
  background: #f0f9ff;
  color: #0c4a6e;
}

/* ========================================
   3. PROVIDER LIST ROWS - SCANNABLE DESIGN
   ======================================== */

.provider-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.03);
  margin-bottom: 8px;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.provider-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.pr-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pr-logo {
  flex-shrink: 0;
}

.pr-logo img {
  width: 32px;
  height: auto;
  border-radius: 6px;
}

.pr-name-speed {
  flex: 1;
  min-width: 0;
}

.pr-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1px;
  line-height: 1.3;
}

.pr-speed {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.3;
}

.pr-center {
  text-align: right;
}

.pr-amount {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1px;
  line-height: 1.3;
}

.pr-fee {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.3;
}

.pr-right {
  display: flex;
  justify-content: flex-end;
}

.pr-send-btn {
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  border: none;
  background: #0ea5e9;
  color: #ffffff;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.15s ease-out,
    transform 0.15s ease-out;
}

.pr-send-btn:hover {
  background: #0284c7;
  transform: translateY(-1px);
}

/* Mobile: Stack vertically */
@media (max-width: 640px) {
  .provider-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .pr-left {
    grid-column: 1;
  }
  
  .pr-center {
    grid-column: 1;
    text-align: left;
  }
  
  .pr-right {
    grid-column: 1;
    justify-content: stretch;
  }
  
  .pr-send-btn {
    width: 100%;
  }
}

/* Dark mode */
html.dark .provider-row {
  background: #1E293B;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

html.dark .provider-row:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

html.dark .pr-name,
html.dark .pr-amount {
  color: #F8FAFC;
}

html.dark .pr-speed,
html.dark .pr-fee {
  color: #94a3b8;
}

html.dark .pr-send-btn {
  background: #0ea5e9;
}

html.dark .pr-send-btn:hover {
  background: #38bdf8;
}

/* ========================================
   4. HERO SECTION - TIGHTENED SPACING
   ======================================== */

.hero-section {
  padding-top: 18px;
  padding-bottom: 18px;
}

/* Mobile only - desktop uses theme.css sizing */
@media (max-width: 767px) {
  .hero-title {
    font-size: 22px;
    line-height: 1.25;
    margin-bottom: 8px;
  }
  
  .hero-subtitle {
    font-size: 13px;
    color: #6b7280;
    max-width: 360px;
    margin: 8px auto 14px;
  }
}

/* Dark mode */
html.dark .hero-subtitle {
  color: #94a3b8;
}

/* ========================================
   5. MOBILE NAVIGATION - PREMIUM POLISH
   ======================================== */

/* Additional polish for existing mobile drawer */
.drawer-nav-item {
  border-radius: 12px;
}

.menu-drawer-content {
  padding-top: 18px;
}

/* Smoother transitions */
#mobile-menu-drawer {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  #mobile-menu-drawer {
    transition: transform 0.2s ease;
  }
}

/* ========================================
   ACCESSIBILITY - REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .popular-corridor-card,
  .provider-row,
  .bo-cta-btn,
  .pr-send-btn {
    transition: none;
  }
  
  .popular-corridor-card:hover,
  .provider-row:hover,
  .bo-cta-btn:hover,
  .pr-send-btn:hover {
    transform: none;
  }
}

/* ========================================
   6. DESKTOP NAV REFINEMENT (HOMEPAGE ONLY)
   Hide duplicate controls - already in hamburger
   ======================================== */

@media (min-width: 768px) {
  /* Target desktop navigation container */
  .header-right > div.hidden {
    display: none !important;
  }
}
