/* PWA Styles for Nobitex Trader Bot */

/* Mobile-first responsive styles */
:root {
  --primary-color: #3a86ff;
  --secondary-color: #58a6ff;
  --dark-color: #0a0e17;
  --light-color: #e6edf3;
  --danger-color: #ff5a5f;
  --success-color: #6bff95;
  --warning-color: #ffbd3d;
}

body {
  font-family: 'Vazirmatn', 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

.app-container {
  max-width: 100%;
  margin: 0 auto;
}

/* Bottom Navigation for Mobile */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--card-bg);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
  z-index: 1000;
}

.mobile-nav-list {
  display: flex;
  list-style-type: none;
  margin: 0;
  padding: 0;
  justify-content: space-around;
}

.mobile-nav-item {
  flex: 1;
  text-align: center;
  padding: 10px 0;
}

.mobile-nav-item a {
  color: var(--text-color);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;
}

.mobile-nav-icon {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.mobile-nav-item.active a {
  color: var(--primary-color);
}

/* Floating action button for creating new items */
.fab {
  position: fixed;
  bottom: 70px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--primary-color), var(--info-color));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
  z-index: 1001;
  text-decoration: none;
  font-size: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fab:hover, .fab:active {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

/* Card styling for list items */
.card {
  border-radius: 8px;
  margin-bottom: 15px;
  padding: 15px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 0 10px 0;
}

.card-content {
  font-size: 0.9rem;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Responsive styles */
@media screen and (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  
  .mobile-nav {
    display: block;
  }
  
  .app-container {
    padding: 10px;
    margin-bottom: 70px; /* Space for bottom nav */
  }
}

/* Offline indicator */
.offline-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--danger-color);
  color: white;
  text-align: center;
  padding: 8px;
  z-index: 9999;
  font-weight: bold;
  transform: translateY(-100%);
  transition: transform 0.3s ease-in-out;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.offline-indicator.show {
  transform: translateY(0);
}

/* Loading indicator */
.loading-spinner {
  border: 4px solid rgba(255, 255, 255, 0.1);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border-left-color: var(--primary-color);
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

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

/* App update notification */
.app-update-notification {
  position: fixed;
  bottom: 80px;
  left: 20px;
  right: 20px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 1002;
  display: none;
  animation: slideUp 0.3s ease-out;
}

.app-update-notification.show {
  display: block;
}

.app-update-notification p {
  margin: 0 0 10px 0;
}

.app-update-notification .btn-container {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

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