/* HCI ACCESSIBILITY IMPROVEMENTS */

/* Skip to Main Content Link - HCI FIX #43 */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: #00a8cc;
  color: white;
  padding: 12px 24px;
  text-decoration: none;
  font-weight: 600;
  z-index: 10000;
  border-radius: 0 0 8px 0;
  transition: top 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 168, 204, 0.3);
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Enhanced Focus Indicators - HCI FIX #46 */
*:focus {
  outline: 2px solid #00a8cc;
  outline-offset: 2px;
}

a:focus, button:focus, input:focus, select:focus, textarea:focus {
  outline: 2px solid #00a8cc;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(0, 168, 204, 0.1);
  transition: box-shadow 0.2s ease;
}

/* Error Summary & Messages */
.error-summary-ultra {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
  border-left: 4px solid #e53e3e;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 4px 12px rgba(229, 62, 62, 0.1);
  animation: slideInDown 0.4s ease;
}

.form-error {
  color: #e53e3e;
  font-size: 13px;
  margin-top: 6px;
}

/* Reduced Motion Support - HCI FIX #48 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   NAVIGATION ENHANCEMENTS - HCI FIX #10, #11
   Standardize navigation behavior across pages
   Enhanced active state visibility
   ============================================ */

/* Enhanced Active Navigation State */
.nav-link.active {
  font-weight: 600 !important;
  position: relative;
  color: var(--accent-blue, #00a8cc) !important;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue, #00a8cc), var(--accent-gold, #d4af37));
  border-radius: 2px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    width: 0;
    left: 50%;
  }
  to {
    width: 100%;
    left: 0;
  }
}

.nav-link.active i {
  color: var(--accent-blue, #00a8cc) !important;
  transform: scale(1.1);
}

/* Enhanced Hover States for Navigation */
.nav-link:hover:not(.active) {
  color: var(--accent-blue, #00a8cc) !important;
  transition: all 0.3s ease;
}

.nav-link:hover:not(.active) i {
  transform: translateY(-2px);
  transition: transform 0.3s ease;
}

/* Social Icons Hover Enhancement - HCI FIX #12 */
.social-links a,
.navbar-social a,
.footer-social a {
  position: relative;
  transition: all 0.3s ease !important;
}

.social-links a:hover,
.navbar-social a:hover,
.footer-social a:hover {
  transform: translateY(-3px) scale(1.1);
  color: var(--accent-blue, #00a8cc) !important;
}

.social-links a::after,
.navbar-social a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent-gold, #d4af37);
  transition: width 0.3s ease;
}

.social-links a:hover::after,
.navbar-social a:hover::after {
  width: 80%;
}

/* Breadcrumb Consistency - HCI FIX #13 */
.breadcrumbs-modern,
.breadcrumbs-ultra,
nav[aria-label="breadcrumb"] {
  margin-bottom: 2rem;
  padding: 0.75rem 0;
}

.breadcrumb-link,
.breadcrumb-item-ultra,
.breadcrumb-item a {
  color: var(--text-light, #718096) !important;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb-link:hover,
.breadcrumb-item-ultra:hover,
.breadcrumb-item a:hover {
  color: var(--accent-blue, #00a8cc) !important;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.breadcrumb-current,
.breadcrumb-item-ultra.active,
.breadcrumb-item.active {
  color: var(--text-dark, #2d3748) !important;
  font-weight: 600;
}

/* ============================================
   BUTTON STANDARDIZATION - HCI FIX #19, #20
   Reduce button variations from 6 to 3 types
   Clear visual hierarchy
   ============================================ */

/* Primary Button - Main CTAs */
.btn-primary,
.btn.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue, #00a8cc), #0088aa) !important;
  color: white !important;
  border: none !important;
  padding: 0.75rem 1.5rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 12px rgba(0, 168, 204, 0.3) !important;
}

.btn-primary:hover,
.btn.btn-primary:hover {
  background: linear-gradient(135deg, #0088aa, #006688) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0, 168, 204, 0.4) !important;
}

.btn-primary:active,
.btn.btn-primary:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 8px rgba(0, 168, 204, 0.3) !important;
}

/* Secondary Button - Alternative actions */
.btn-secondary,
.btn.btn-secondary,
.btn-outline {
  background: transparent !important;
  color: var(--accent-blue, #00a8cc) !important;
  border: 2px solid var(--accent-blue, #00a8cc) !important;
  padding: 0.75rem 1.5rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
}

.btn-secondary:hover,
.btn.btn-secondary:hover,
.btn-outline:hover {
  background: var(--accent-blue, #00a8cc) !important;
  color: white !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 168, 204, 0.3) !important;
}

/* Tertiary Button - Subtle actions */
.btn-tertiary,
.btn-text,
.btn-link {
  background: transparent !important;
  color: var(--accent-blue, #00a8cc) !important;
  border: none !important;
  padding: 0.5rem 1rem !important;
  font-weight: 500 !important;
  text-decoration: underline !important;
  text-underline-offset: 4px !important;
  transition: all 0.3s ease !important;
}

.btn-tertiary:hover,
.btn-text:hover,
.btn-link:hover {
  color: #006688 !important;
  text-decoration-thickness: 2px !important;
  transform: translateX(4px) !important;
}

/* Button Loading State */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* ============================================
   USER CONTROL ENHANCEMENTS - HCI FIX #25
   Back to Projects Button on Detail Page
   ============================================ */

.back-to-projects-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.5rem 0;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--accent-blue, #00a8cc);
  border: 2px solid var(--accent-blue, #00a8cc);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.back-to-projects-btn:hover {
  background: var(--accent-blue, #00a8cc);
  color: white;
  transform: translateX(-4px);
  box-shadow: 0 4px 12px rgba(0, 168, 204, 0.3);
}

.back-to-projects-btn i {
  transition: transform 0.3s ease;
}

.back-to-projects-btn:hover i {
  transform: translateX(-4px);
}

/* ============================================
   TOOLTIPS - HCI FIX #32
   Helpful guidance for complex fields
   ============================================ */

.tooltip-trigger {
  position: relative;
  cursor: help;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--accent-blue, #00a8cc);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  cursor: help;
}

.tooltip-content {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #2d3748;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #2d3748;
}

.tooltip-trigger:hover .tooltip-content,
.tooltip-trigger:focus .tooltip-content {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* ============================================
   CONFIRMATION DIALOGS - HCI FIX #26
   Prevent accidental data loss
   ============================================ */

.confirmation-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.confirmation-modal.active {
  opacity: 1;
  pointer-events: all;
}

.confirmation-dialog {
  background: white;
  border-radius: 16px;
  padding: 32px;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.confirmation-modal.active .confirmation-dialog {
  transform: scale(1);
}

.confirmation-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff5e6;
  color: #e67e22;
  font-size: 32px;
}

.confirmation-title {
  font-size: 24px;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 12px;
  text-align: center;
}

.confirmation-message {
  font-size: 16px;
  color: #718096;
  line-height: 1.6;
  margin-bottom: 28px;
  text-align: center;
}

.confirmation-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirmation-actions .btn {
  min-width: 120px;
}

/* ============================================
   LOADING INDICATORS - HCI FIX #15
   Show system status for filtering
   ============================================ */

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--accent-blue, #00a8cc);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================
   COLOR CONTRAST IMPROVEMENTS - HCI FIX #45
   WCAG 2.1 Level AA Compliance (4.5:1)
   ============================================ */

.text-muted {
  color: #4a5568 !important; /* Was #999 - now 4.5:1 on white */
}

::placeholder {
  color: #718096 !important; /* Was #999 - now 4.6:1 on white */
  opacity: 1;
}

.footer a {
  color: #a0aec0 !important; /* Improved contrast on dark background */
}

.footer a:hover {
  color: #cbd5e0 !important;
}

/* Secondary text with better contrast */
.secondary-text,
.helper-text,
.caption {
  color: #4a5568 !important;
}

/* ============================================
   KEYBOARD NAVIGATION ENHANCEMENTS
   ============================================ */

/* Visible focus for interactive elements */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #00a8cc !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 6px rgba(0, 168, 204, 0.2) !important;
}

/* Remove focus for mouse users only */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

