/* Vue.js Components CSS - SocialPostWriter Frontend Modernization */

/* Vue Transitions */
.notification-enter-active,
.notification-leave-active {
  transition: all 0.3s ease;
}

.notification-enter-from {
  opacity: 0;
  transform: translateX(100%);
}

.notification-leave-to {
  opacity: 0;
  transform: translateX(100%);
}

.notification-move {
  transition: transform 0.3s ease;
}

/* Notification Container */
.notification-container {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 9999;
  width: 350px;
  max-width: calc(100vw - 40px);
}

.notification-item {
  margin-bottom: 0.75rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
  border: none;
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Floating Action Button */
.floating-actions {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.btn-floating {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: none;
  font-size: 1.25rem;
  transition: all 0.3s ease;
  position: relative;
}

.btn-floating:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.quick-actions-menu {
  position: absolute;
  bottom: 70px;
  right: 0;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  padding: 0.75rem;
  min-width: 200px;
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quick-actions-menu .btn {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
}

/* Post Manager Enhanced Styles */
.post-manager {
  position: relative;
}

.post-card {
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  border-color: var(--brand-blue);
}

.post-card .card-body {
  position: relative;
  padding: 1.25rem;
}

.post-card .status-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

/* Loading States */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.loading-spinner i {
  font-size: 3rem;
  color: #007bff;
  animation: spin 1s linear infinite;
}

.loading-spinner span {
  font-weight: 500;
  color: #6c757d;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Enhanced Dashboard Components */
.dashboard-enhanced {
  position: relative;
}

.post-status-updates {
  margin-bottom: 1.5rem;
  animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Real-time Update Indicators */
.status-update-indicator {
  position: relative;
  display: inline-block;
}

.status-update-indicator::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #28a745;
  border-radius: 50%;
  border: 2px solid white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(0.8);
    opacity: 1;
  }
}

/* Enhanced Form Components */
.vue-form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.vue-form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  font-size: 1rem;
  background: white;
}

.vue-form-input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 0.2rem rgba(48, 196, 220, 0.25);
}

.vue-form-label {
  position: absolute;
  top: 0.75rem;
  left: 1rem;
  color: #6c757d;
  transition: all 0.3s ease;
  pointer-events: none;
  background: white;
  padding: 0 0.25rem;
}

.vue-form-input:focus + .vue-form-label,
.vue-form-input:not(:placeholder-shown) + .vue-form-label {
  top: -0.5rem;
  left: 0.75rem;
  font-size: 0.875rem;
  color: var(--brand-blue);
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
  .notification-container {
    width: calc(100vw - 20px);
    right: 10px;
    top: 80px;
  }
  
  .floating-actions {
    bottom: 15px;
    right: 15px;
  }
  
  .btn-floating {
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }
  
  .quick-actions-menu {
    bottom: 60px;
    min-width: 180px;
    right: -5px;
  }
  
  .post-card {
    margin-bottom: 1rem;
  }
}

/* Dark Mode Support (Optional Future Enhancement) */
@media (prefers-color-scheme: dark) {
  .notification-item {
    background-color: #2d3748;
    color: white;
    border-color: #4a5568;
  }
  
  .quick-actions-menu {
    background-color: #2d3748;
    color: white;
  }
  
  .vue-form-input {
    background-color: #2d3748;
    border-color: #4a5568;
    color: white;
  }
  
  .vue-form-label {
    color: #a0aec0;
  }
}

/* Advanced Animations */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide-up {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scale-in {
  animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Interactive Elements */
.interactive-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.interactive-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.interactive-button {
  position: relative;
  overflow: hidden;
}

.interactive-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  transform: translate(-50%, -50%);
}

.interactive-button:hover::before {
  width: 300px;
  height: 300px;
}

/* PWA Installation Prompt - Public & App Pages */
.pwa-install-prompt,
.install-prompt {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  padding: 1rem;
  z-index: 1000;
  animation: slideInUp 0.3s ease-out;
  max-width: 400px;
  margin: 0 auto;
  border: 1px solid #dee2e6;
}

.install-prompt-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.install-prompt-content i {
  font-size: 1.5rem;
  color: #007bff;
  flex-shrink: 0;
}

.install-prompt-content span {
  flex: 1;
  min-width: 150px;
  font-weight: 500;
  color: #495057;
}

.install-prompt-content .btn {
  white-space: nowrap;
  margin-left: auto;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pwa-install-prompt .btn-group {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* Public Page Specific Enhancements */
#public-app {
  position: relative;
}

/* Enhanced Landing Page Elements */
.benefit-card,
.feature-card,
.testimonial-card {
  transition: all 0.3s ease;
}

.benefit-card:hover,
.feature-card:hover,
.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* Typing Animation Enhancement */
.typing-demo-business {
  font-weight: 600;
  color: #007bff;
}

#typing-text {
  min-height: 4em;
  display: flex;
  align-items: center;
}

/* ===== MODERN HEADER STYLES FOR PUBLIC PAGES ===== */
/* High specificity to override Bootstrap */

.modern-header {
  position: sticky !important;
  top: 0;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1020;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  box-shadow: none;
}

/* Brand text styling */
.modern-header .brand-text {
  font-weight: 600 !important;
  color: #333 !important;
  font-size: 1.1rem !important;
  text-decoration: none !important;
}

.modern-header .nav-links {
  display: flex;
  align-items: center;
}

/* CRITICAL: Override Bootstrap's default link styles with high specificity */
.modern-header .nav-links a.nav-link-modern,
.modern-header .navbar a.nav-link-modern,
header.modern-header a.nav-link-modern {
  color: #495057 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  padding: 0.5rem 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  transition: color 0.3s ease !important;
  position: relative;
  font-size: 1rem !important;
  line-height: 1.5 !important;
}

.modern-header .nav-links a.nav-link-modern:hover,
.modern-header .navbar a.nav-link-modern:hover,
header.modern-header a.nav-link-modern:hover,
.modern-header .nav-links a.nav-link-modern:focus,
.modern-header .navbar a.nav-link-modern:focus,
header.modern-header a.nav-link-modern:focus {
  color: #007bff !important;
  text-decoration: none !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
}

/* Hover underline effect */
.modern-header a.nav-link-modern::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #007bff;
  transition: width 0.3s ease;
}

.modern-header a.nav-link-modern:hover::after {
  width: 100%;
}

/* Mobile menu button */
.modern-header .mobile-menu-btn {
  color: #495057 !important;
  font-size: 1.2rem !important;
  border: none !important;
  background: transparent !important;
  padding: 0.5rem !important;
}

.modern-header .mobile-menu-btn:hover,
.modern-header .mobile-menu-btn:focus {
  color: #007bff !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
}

/* Mobile menu styling */
.modern-header .mobile-menu {
  background: white;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  animation: slideDown 0.3s ease-out;
}

.modern-header .mobile-menu-content {
  padding: 1rem 0;
}

/* Mobile navigation links */
.modern-header .mobile-nav-link,
.modern-header a.mobile-nav-link {
  display: block !important;
  color: #495057 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  padding: 0.75rem 1rem !important;
  transition: all 0.3s ease !important;
  border-radius: 0.5rem;
  margin: 0.25rem 1rem !important;
  border: none !important;
  background: transparent !important;
}

.modern-header .mobile-nav-link:hover,
.modern-header a.mobile-nav-link:hover,
.modern-header .mobile-nav-link:focus,
.modern-header a.mobile-nav-link:focus {
  background: #f8f9fa !important;
  color: #007bff !important;
  text-decoration: none !important;
  border: none !important;
  outline: none !important;
}

.modern-header .mobile-menu-actions {
  padding: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Performance Optimizations */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

/* Accessibility Enhancements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.focus-visible:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .btn-outline-primary {
    border-width: 2px;
  }
  
  .card {
    border-width: 2px;
  }
  
  .form-control:focus {
    border-width: 3px;
  }
  
  .install-prompt {
    border-width: 2px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .floating-actions .btn-floating:hover {
    transform: none;
  }
  
  .post-card:hover,
  .benefit-card:hover,
  .feature-card:hover,
  .testimonial-card:hover {
    transform: none;
  }
}

/* Print Styles */
@media print {
  .floating-actions,
  .notification-container,
  .pwa-install-prompt,
  .install-prompt {
    display: none !important;
  }
  
  .post-card {
    break-inside: avoid;
    margin-bottom: 1rem;
  }
}

/* Mobile-specific PWA Styles and Header */
@media (max-width: 768px) {
  .install-prompt {
    bottom: 10px;
    left: 10px;
    right: 10px;
  }
  
  .install-prompt-content {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  
  .install-prompt-content .btn {
    margin-left: 0;
    width: 100%;
  }
  
  .loading-overlay {
    background: rgba(255, 255, 255, 0.9);
  }
  
  .modern-header .brand-text {
    display: none !important;
  }
  
  /* Mobile header adjustments */
  .modern-header .navbar {
    padding: 0.75rem 0 !important;
  }
  
  .modern-header .nav-links {
    display: none !important;
  }
}
