/* Connection State Manager CSS - Reconnection Modal */
/* Agent #6 - November 14, 2025 - BroJack Connection State System */
/* Glassmorphism modal with blur overlay for iOS reconnection */

/* ========================================
   RECONNECTION MODAL OVERLAY - BLUR ENTIRE APP
   ======================================== */

.reconnection-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 9, 30, 0.8); /* Dark blue with transparency */
  backdrop-filter: blur(10px); /* Blur everything behind */
  -webkit-backdrop-filter: blur(10px); /* Safari support */
  z-index: 10000; /* Above everything */
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
  pointer-events: all; /* Block all interaction with app */
}

/* ========================================
   RECONNECTION MODAL - GLASSMORPHISM
   ======================================== */

.reconnection-modal {
  background: rgba(38, 45, 76, 0.9); /* Glassmorphism card */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 48px 40px;
  text-align: center;
  max-width: 400px;
  width: calc(100% - 32px); /* Mobile responsive */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.3s ease;
}

/* ========================================
   RECONNECTION SPINNER
   ======================================== */

.reconnection-spinner {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border: 4px solid rgba(85, 93, 255, 0.2);
  border-top-color: #555DFF; /* Purple primary */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ========================================
   RECONNECTION TEXT
   ======================================== */

.reconnection-modal h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 12px 0;
}

.reconnection-modal p {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  color: #536285; /* Text secondary */
  margin: 0 0 24px 0;
}

/* ========================================
   PROGRESS BAR
   ======================================== */

.reconnection-progress {
  width: 100%;
  height: 4px;
  background: rgba(85, 93, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
}

.reconnection-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #555DFF 0%, #7B83FF 100%); /* Purple gradient */
  animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
  0%, 100% { 
    width: 30%; 
  }
  50% { 
    width: 70%; 
  }
}

/* ========================================
   ATTEMPT COUNTER
   ======================================== */

.reconnection-attempt-count {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  color: #536285;
  margin-top: 8px;
}

.reconnection-attempt-count .attempt-number {
  color: #555DFF; /* Purple primary */
  font-weight: 600;
}

/* ========================================
   ERROR STATE
   ======================================== */

.reconnection-modal.error {
  /* Same glassmorphism, different content */
}

.reconnection-modal.error .error-icon {
  font-size: 64px;
  margin-bottom: 16px;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.reconnection-modal.error h3 {
  color: #FF3B30; /* Error red */
}

.reconnection-modal.error .btn-primary {
  margin-top: 24px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #555DFF 0%, #7B83FF 100%); /* Purple gradient */
  border: none;
  border-radius: 12px;
  color: #FFFFFF;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  width: 100%;
}

.reconnection-modal.error .btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(85, 93, 255, 0.4);
}

.reconnection-modal.error .btn-primary:active {
  transform: scale(0.98);
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

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

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 480px) {
  .reconnection-modal {
    padding: 40px 24px;
    max-width: 100%;
  }

  .reconnection-modal h3 {
    font-size: 20px;
  }

  .reconnection-spinner {
    width: 56px;
    height: 56px;
  }
}

