/**
 * Shuttle Call - Modern PWA Styles
 * Enhanced Professional Design
 * Powered by Erkan ERDEM
 */

/* ========== Modern Enhancements ========== */

/* Smooth Animations */
* {
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== Enhanced Header ========== */
.navbar {
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(27, 165, 168, 0.1);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #1BA5A8 0%, #F28C38 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-brand img {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* ========== Modern Cards with Glassmorphism ========== */
.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px 0 rgba(26, 43, 74, 0.15);
}

/* ========== Gradient Buttons ========== */
.btn-gradient-primary {
  background: linear-gradient(135deg, #1A2B4A 0%, #0F1A2F 100%);
  color: white;
  border: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-gradient-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2A3B5A 0%, #1A2B4A 100%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-gradient-primary:hover::before {
  opacity: 1;
}

.btn-gradient-secondary {
  background: linear-gradient(135deg, #D4AF37 0%, #B49527 100%);
  color: #1A2B4A;
  border: none;
}

.btn-gradient-secondary:hover {
  background: linear-gradient(135deg, #E4BF47 0%, #D4AF37 100%);
}

/* ========== Status Indicators with Pulse ========== */
.status-indicator {
  position: relative;
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  animation: pulse-ring 1.5s ease-in-out infinite;
}

.status-online {
  background: #2E7D32;
  box-shadow: 0 0 0 rgba(46, 125, 50, 0.4);
}

.status-busy {
  background: #D4AF37;
  box-shadow: 0 0 0 rgba(212, 175, 55, 0.4);
}

.status-offline {
  background: #6B7280;
  box-shadow: none;
  animation: none;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(46, 125, 50, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 125, 50, 0);
  }
}

/* ========== Floating Action Button ========== */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1A2B4A 0%, #0F1A2F 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(26, 43, 74, 0.4);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 1000;
}

.fab:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 12px 32px rgba(26, 43, 74, 0.6);
}

.fab:active {
  transform: scale(0.95);
}

/* ========== Stats Card ========== */
.stat-card {
  background: white;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border-left: 4px solid #D4AF37;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(26, 43, 74, 0.15);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1A2B4A 0%, #D4AF37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.875rem;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* ========== Request Timeline ========== */
.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #1A2B4A 0%, #D4AF37 100%);
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  border: 3px solid #1A2B4A;
  box-shadow: 0 0 0 4px rgba(26, 43, 74, 0.1);
}

.timeline-item.completed::before {
  background: #1A2B4A;
  border-color: #1A2B4A;
}

/* ========== Location Card ========== */
.location-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.location-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.location-card-header {
  background: linear-gradient(135deg, #1A2B4A 0%, #2A3B5A 100%);
  color: white;
  padding: 16px 20px;
  font-weight: 600;
}

.location-card-body {
  padding: 20px;
}

.qr-code-container {
  text-align: center;
  padding: 24px;
  background: #F9FAFB;
  border-radius: 12px;
  margin: 16px 0;
}

.qr-code-container img {
  max-width: 200px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ========== Buggy Card ========== */
.buggy-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  border: 2px solid transparent;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 16px;
}

.buggy-card.available {
  border-color: #2E7D32;
  background: linear-gradient(135deg, rgba(46, 125, 50, 0.05) 0%, white 100%);
}

.buggy-card.busy {
  border-color: #D4AF37;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, white 100%);
}

.buggy-card.offline {
  border-color: #E5E7EB;
  opacity: 0.7;
}

.buggy-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1A2B4A 0%, #D4AF37 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(26, 43, 74, 0.3);
}

/* ========== Request Card ========== */
.request-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 16px;
  transition: all 0.3s ease;
  border-left: 4px solid #1A2B4A;
}

.request-card:hover {
  box-shadow: 0 8px 24px rgba(26, 43, 74, 0.1);
  transform: translateX(4px);
}

.request-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.request-time {
  font-size: 0.75rem;
  color: #9CA3AF;
  font-weight: 500;
}

.request-location {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.request-room {
  font-size: 0.875rem;
  color: #6B7280;
  display: flex;
  align-items: center;
  gap: 8px;
}

.request-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

/* ========== Skeleton Loading ========== */
.skeleton {
  background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: 12px;
}

.skeleton-card {
  height: 120px;
  border-radius: 16px;
}

/* ========== Smooth Page Transitions ========== */
.page-transition-enter {
  opacity: 0;
  transform: translateY(20px);
}

.page-transition-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease-out;
}

/* ========== Bottom Navigation (Mobile PWA) ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-items {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 12px 0;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  text-decoration: none;
  color: #6B7280;
  transition: all 0.2s ease;
}

.bottom-nav-item.active {
  color: #1BA5A8;
}

.bottom-nav-item svg {
  width: 24px;
  height: 24px;
}

.bottom-nav-label {
  font-size: 0.75rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  .bottom-nav {
    display: block;
  }

  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
}

/* ========== Install PWA Prompt ========== */
.pwa-install-prompt {
  position: fixed;
  bottom: 80px;
  left: 16px;
  right: 16px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 999;
  animation: slideUp 0.4s ease-out;
}

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

.pwa-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  flex-shrink: 0;
}

.pwa-content {
  flex: 1;
}

.pwa-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
  color: #111827;
}

.pwa-description {
  font-size: 0.875rem;
  color: #6B7280;
}

/* ========== Offline Indicator ========== */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #F28C38;
  color: white;
  text-align: center;
  padding: 12px;
  z-index: 10000;
  font-weight: 600;
  font-size: 0.875rem;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* ========== Ripple Effect ========== */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
  width: 300px;
  height: 300px;
}
