/* QuickDrop Custom CSS with #0066ff Branding */

/* Base styles for better cross-browser compatibility */
html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Custom color variables */
:root {
  --primary-color: #0066ff;
  --primary-hover: #0052cc;
  --primary-light: #e6f0ff;
  --success-color: #10b981;
  --success-hover: #059669;
  --danger-color: #ef4444;
  --danger-hover: #dc2626;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
}

/* Utility classes for older browsers */
.hidden {
  display: none !important;
}

.flex {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.items-center {
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.justify-center {
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.justify-between {
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
}

/* Primary color overrides for Tailwind */
.bg-blue-500,
.hover\:bg-blue-600:hover {
  background-color: var(--primary-color) !important;
}

.hover\:bg-blue-600:hover {
  background-color: var(--primary-hover) !important;
}

.text-blue-500,
.text-blue-600 {
  color: var(--primary-color) !important;
}

.border-blue-300 {
  border-color: var(--primary-light) !important;
}

.bg-blue-50 {
  background-color: var(--primary-light) !important;
}

/* Lightning bolt animation */
.fa-bolt {
  animation: pulse-lightning 2s infinite;
}

@keyframes pulse-lightning {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* Connection status indicators */
.status-online {
  background-color: var(--success-color) !important;
  color: white !important;
}

.status-online i {
  color: white !important;
}

/* File upload dropzone enhanced styling */
#dropzone {
  transition: all 0.3s ease;
  border: 2px dashed var(--gray-300);
  background-color: var(--gray-50);
}

#dropzone:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

#dropzone.dragover {
  border-color: var(--primary-color) !important;
  background-color: var(--primary-light) !important;
  transform: scale(1.02);
}

/* Enhanced file item styling */
.file-item {
  transition: all 0.2s ease;
  border: 1px solid var(--gray-300);
}

.file-item:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.1);
  transform: translateY(-1px);
}

/* Button styling consistency */
.download-btn {
  background-color: var(--primary-color) !important;
  color: white !important;
}

.download-btn:hover {
  background-color: var(--primary-hover) !important;
}

.share-btn {
  background-color: var(--success-color) !important;
  color: white !important;
}

.share-btn:hover {
  background-color: var(--success-hover) !important;
}

.delete-btn {
  background-color: var(--danger-color) !important;
  color: white !important;
}

.delete-btn:hover {
  background-color: var(--danger-hover) !important;
}

/* Progress bar styling */
#progress-bar {
  transition: width 0.3s ease;
  background-color: var(--primary-color) !important;
}

/* Toast notification styles */
#toast {
  font-family: inherit;
  font-weight: 500;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* QR Code container styling */
#qrcode {
  border: 2px solid var(--gray-300);
  border-radius: 8px;
  padding: 16px;
  background: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Auth modal improvements */
#auth-modal .bg-white {
  border-radius: 12px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* Google login button styling */
#google-login-btn {
  border: 2px solid var(--gray-300);
  transition: all 0.2s ease;
}

#google-login-btn:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.1);
}

/* Navigation styling */
nav.bg-blue-600 {
  background-color: var(--primary-color) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Feature cards hover effects */
.bg-white.p-6.rounded-lg.shadow-md:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* Settings dropdown */
#settings-dropdown {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--gray-300);
}

/* Mobile responsiveness improvements */
@media (max-width: 768px) {
  .file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .file-item .flex.space-x-2 {
    width: 100%;
    justify-content: space-between;
  }
  
  .download-btn,
  .share-btn,
  .delete-btn {
    flex: 1;
    text-align: center;
  }
}

/* Loading animation */
.loading-spinner {
  border: 3px solid var(--gray-300);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 8px;
}

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

/* Focus states for accessibility */
button:focus,
input:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Improved spacing and typography */
h1, h2, h3 {
  font-weight: 700;
  line-height: 1.2;
}

.text-4xl {
  font-size: 2.25rem;
  font-weight: 800;
}

/* Brand colors for icons */
.fa-bolt.text-blue-500,
.fa-bolt.text-yellow-300 {
  color: #fbbf24 !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Action buttons for file items */
.action-btn {
  display: inline-block;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  border-radius: 8px;
  border: 2px solid transparent;
  margin: 5px;
  min-width: 130px;
  min-height: 50px;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
  /* For older browsers */
  background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.1) 100%);
  background-image: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.1) 100%);
}

.action-btn:hover {
  -webkit-transform: translateY(-2px);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.action-btn:active {
  -webkit-transform: translateY(1px);
  transform: translateY(1px);
  box-shadow: 0 2px 3px rgba(0,0,0,0.2);
}

.action-btn i {
  margin-right: 5px;
}

.download-btn {
  background-color: #3B82F6;
  color: white;
}

.download-btn:hover {
  background-color: #2563EB;
}

.share-btn {
  background-color: #10B981;
  color: white;
}

.share-btn:hover {
  background-color: #059669;
}

.edit-btn {
  background-color: #F59E0B;
  color: white;
}

.edit-btn:hover {
  background-color: #D97706;
}

.delete-btn {
  background-color: #EF4444;
  color: white;
}

.delete-btn:hover {
  background-color: #DC2626;
}

/* Animations */
@keyframes pulse {
  0% { -webkit-transform: scale(0.95); transform: scale(0.95); opacity: 0.7; }
  50% { -webkit-transform: scale(1.05); transform: scale(1.05); opacity: 1; }
  100% { -webkit-transform: scale(0.95); transform: scale(0.95); opacity: 0.7; }
}

.pulse-animation {
  -webkit-animation: pulse 2s infinite ease-in-out;
  animation: pulse 2s infinite ease-in-out;
}

/* Progress bar animation */
#progress-bar {
  -webkit-transition: width 0.3s ease-in-out;
  transition: width 0.3s ease-in-out;
}

/* Connection status indicators */
.status-online {
  background-color: #10B981 !important; /* green-500 */
}

.status-online i {
  color: white !important;
}

/* File item styles */
.file-item {
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
  margin-bottom: 15px;
  padding: 15px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
}

.file-item:hover {
  -webkit-transform: translateY(-2px);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Responsive grid for file action buttons */
.file-actions {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: -5px;
}

.file-actions > button {
  -webkit-box-flex: 1;
  -ms-flex: 1 0 calc(50% - 10px);
  flex: 1 0 calc(50% - 10px);
  margin: 5px;
}

@media (min-width: 768px) {
  .file-actions > button {
    -ms-flex-preferred-size: calc(25% - 10px);
    flex-basis: calc(25% - 10px);
  }
}

/* Drag and drop */
.dragover {
  background-color: #EFF6FF !important; /* blue-50 */
  border-color: #3B82F6 !important; /* blue-500 */
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 1rem;
  background: #4B5563;
  color: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 100;
  opacity: 0;
  -webkit-transform: translateY(20px);
  transform: translateY(20px);
  -webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
  transition: opacity 0.3s, transform 0.3s;
}

.toast.show {
  opacity: 1;
  -webkit-transform: translateY(0);
  transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
