/**
 * JTC TMIS Teacher Portal - Step Navigation & Access Control Styles
 * Version: 1.0.0
 * 
 * Styles for:
 * - Registration step navigation bar (Previous/Next buttons)
 * - Locked nav items (unverified users)
 * - Verification status banner in sidebar
 * 
 * ADD TO: index.html after main.css link
 * <link rel="stylesheet" href="css/step-navigation.css">
 */

/* ============================================
   STEP NAVIGATION BAR
   Injected between breadcrumb and content area
   ============================================ */

.step-navigation-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-bottom: 2px solid #e5e7eb;
    padding: 2px 24px;
    flex-shrink: 0;
    gap: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    z-index: 10;
}

/* Left side: Step info */
.step-nav-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.step-nav-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1d5926;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.step-nav-badge i {
    font-size: 0.75rem;
}

/* Mode indicator: New Entry vs Review & Update */
.step-nav-mode {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.step-nav-mode.mode-new {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.step-nav-mode.mode-update {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Right side: Previous/Next buttons */
.step-nav-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-step-prev,
.btn-step-next {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-step-prev {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-step-prev:hover:not(:disabled) {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.btn-step-next {
    background: #1d5926;
    color: #ffffff;
}

.btn-step-next:hover:not(:disabled) {
    background: #174a1f;
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(29, 89, 38, 0.3);
}

/* Submitted state - Next button lights up */
.btn-step-next.step-submitted {
    background: #10b981;
    animation: pulse-green 0.5s ease;
}

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

.btn-step-prev:disabled,
.btn-step-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Responsive: stack on mobile */
@media (max-width: 576px) {
    .step-navigation-bar {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 16px;
        gap: 10px;
    }

    .step-nav-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .btn-step-prev,
    .btn-step-next {
        flex: 1;
        justify-content: center;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* ============================================
   LOCKED NAV ITEMS
   Applied to portal services when user is not verified
   ============================================ */

.nav-item-locked {
    opacity: 0.5;
    cursor: not-allowed !important;
    position: relative;
}

.nav-item-locked:hover {
    background-color: transparent !important;
    color: inherit !important;
}

/* Lock icon on the right */
.nav-lock-icon {
    margin-left: auto;
    font-size: 0.7rem;
    color: #9ca3af;
    flex-shrink: 0;
}

/* Tooltip shown on hover for locked items */
.nav-item-locked::after {
    content: attr(title);
    position: fixed;
    left: 230px;
    background: #1f2937;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
    max-width: 220px;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

.nav-item-locked:hover::after {
    opacity: 1;
}

/* Collapsed sidebar: tooltip to the right */
body.sidebar-collapsed .nav-item-locked::after {
    left: 78px;
}

/* ============================================
   VERIFICATION STATUS BANNER (Sidebar)
   Shown when teacher is registered but not yet verified
   ============================================ */

.verification-status-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.8rem;
}

.verification-status-banner.pending {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #92400e;
}

.verification-status-banner.verified {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #065f46;
}

.vsb-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.vsb-title {
    font-weight: 600;
    margin-bottom: 2px;
    font-size: 0.8rem;
}

.vsb-text {
    font-size: 0.72rem;
    opacity: 0.85;
    line-height: 1.3;
}

/* Hide banner text in collapsed sidebar */
body.sidebar-collapsed .verification-status-banner {
    padding: 8px;
    justify-content: center;
    margin: 8px 4px;
}

body.sidebar-collapsed .vsb-content {
    display: none;
}

body.sidebar-collapsed .vsb-icon {
    font-size: 1.2rem;
}


/* Combined container – flex row, minimal padding */
.combined-nav-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  border-bottom: 2px solid #e5e7eb;
  padding: 4px 16px;           /* reduced vertical padding */
  flex-wrap: wrap;             /* allow wrap on small screens */
}

/* Remove original borders/paddings from both bars */
.combined-nav-progress .step-navigation-bar,
.combined-nav-progress .slim-progress-bar {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Make step nav shrinkable */
.combined-nav-progress .step-navigation-bar {
  flex: 0 1 auto;
}

/* Make progress bar take remaining space and be more compact */
.combined-nav-progress .slim-progress-bar {
  flex: 1 1 auto;
  min-width: 200px;             /* prevent it from disappearing */
}

/* Further compact the progress bar’s internal layout */
.combined-nav-progress .slim-progress-bar .slim-row {
  margin-bottom: 2px;            /* reduce space between track and steps */
}

.combined-nav-progress .slim-progress-bar .slim-steps-row {
  gap: 2px;                      /* tighter step spacing */
}

.combined-nav-progress .slim-progress-bar .slim-step {
  padding: 0 2px;                /* minimal horizontal padding */
}

/* If you want the track above the steps inside the same bar, keep as is */
.combined-nav-progress .slim-progress-bar .slim-track {
  height: 3px;                   /* even thinner track */
}

/* Responsive: stack on small screens */
@media (max-width: 768px) {
  .combined-nav-progress {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 12px;
  }

  .combined-nav-progress .step-navigation-bar {
    width: 100%;
  }

  .combined-nav-progress .slim-progress-bar {
    width: 100%;
  }

  /* Restore original step nav mobile stacking if needed */
  .combined-nav-progress .step-navigation-bar .step-nav-buttons {
    justify-content: space-between;
  }
}