/* Shared CSS styles for Extension Project Manager */

/* Common Animations */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

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

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

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

/* Common Background Gradients */
.animated-gradient {
  background: linear-gradient(-45deg, #2E7D32, #388E3C, #4CAF50, rgb(88, 184, 93), rgb(30, 138, 30), rgb(110, 192, 72), rgb(84, 179, 40), rgb(53, 131, 17));
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  position: relative;
  overflow: hidden;
}

.animated-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../images/jhcsc-background.jpg') center/cover no-repeat;
  opacity: 0.2;
  z-index: 1;
}

/* Common Form Styles */
.modern-form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.modern-form-label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: rgba(7, 5, 5, 0.7);
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.modern-form-control {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 12px !important;
  color: rgb(5, 4, 4) !important;
  padding: 1.2rem 1rem 0.4rem 1rem !important;
  font-size: 0.95rem !important;
  transition: all 0.3s ease !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1) !important;
}

.modern-form-control:focus {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(76, 175, 80, 0.8) !important;
  box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.3), 0 12px 30px rgba(0, 0, 0, 0.2) !important;
  outline: none !important;
}

.modern-form-control:focus + .modern-form-label,
.modern-form-control:not(:placeholder-shown) + .modern-form-label {
  top: 0.5rem;
  font-size: 0.75rem;
  color: rgba(9, 10, 9, 0.9);
  font-weight: 600;
}

.modern-form-control::placeholder {
  color: transparent !important;
}

/* Common Button Styles */
.modern-btn {
  background: linear-gradient(135deg, rgb(27, 85, 30), rgb(14, 66, 16), rgb(16, 78, 18));
  border: none !important;
  border-radius: 12px !important;
  padding: 0.8rem 1.5rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  box-shadow: 0 8px 25px rgba(46, 125, 50, 0.4) !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

.modern-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.modern-btn:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 15px 40px rgba(46, 125, 50, 0.6) !important;
  background: linear-gradient(135deg, rgb(14, 88, 16), rgb(16, 94, 20), rgb(12, 78, 15)) !important;
}

.modern-btn:hover::before {
  left: 100%;
}

.modern-btn:active {
  transform: translateY(-1px) !important;
  animation: pulse 0.3s ease !important;
}

/* Common Alert Styles */
.modern-alert {
  border-radius: 12px;
  padding: 0.8rem;
  margin-bottom: 1.2rem;
  backdrop-filter: blur(10px);
  border: 1px solid;
}

.modern-alert-success {
  background: rgba(76, 175, 80, 0.2);
  border-color: rgba(76, 175, 80, 0.3);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.2);
}

.modern-alert-danger {
  background: rgba(244, 67, 54, 0.2);
  border-color: rgba(244, 67, 54, 0.3);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(244, 67, 54, 0.2);
}

.modern-alert-warning {
  background: rgba(255, 193, 7, 0.2);
  border-color: rgba(255, 193, 7, 0.3);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(255, 193, 7, 0.2);
}

.modern-alert-info {
  background: rgba(33, 150, 243, 0.2);
  border-color: rgba(33, 150, 243, 0.3);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(33, 150, 243, 0.2);
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 1s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
  .modern-btn {
    padding: 0.7rem 1.2rem !important;
    font-size: 0.9rem !important;
  }
  
  .modern-form-control {
    padding: 1rem 0.8rem 0.3rem 0.8rem !important;
    font-size: 0.9rem !important;
  }
}
