/**
 * JTC TMIS Teacher Portal - Registration Progress Bar (ULTRA COMPACT)
 * Version: 2.2.0-ULTRA-COMPACT
 * Updated: 2026-02-15
 * Path: C:\inetpub\wwwroot\teacher-portal\css\registration-progress-bar.css
 * 
 * CHANGES:
 * - 60% smaller than v2.1 (was already 50% smaller than v2.0)
 * - Fully responsive (shrinks dynamically)
 * - Hides OLD sidebar progress indicator
 * - Minimal padding, compact design
 */

/* ============================================
   HIDE OLD SIDEBAR PROGRESS INDICATOR
   ============================================ */

.registration-progress,
.sidebar .registration-progress {
    display: none !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* ============================================
   PROGRESS BAR CONTAINER (ULTRA COMPACT)
   ============================================ */

.registration-progress-bar-container {
    background: #ffffff;
    padding: 8px 16px; /* Was 12px 20px - now EVEN smaller */
    margin: 0;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 64px;
    z-index: 15;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* ============================================
   GREEN PILL (ULTRA COMPACT)
   ============================================ */

.progress-pill {
    position: relative;
    height: 28px; /* Was 36px - now TINY */
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px; /* Was 12px */
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.progress-pill-fill {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    transition: width 0.6s ease;
    border-radius: 14px;
}

.progress-pill-left,
.progress-pill-right {
    position: relative;
    z-index: 2;
    padding: 0 12px; /* Was 16px */
}

.progress-label {
    font-size: 12px; /* Was 14px */
    font-weight: 700;
    color: #1f2937;
}

.progress-percentage {
    font-size: 14px; /* Was 16px */
    font-weight: 800;
    color: #1f2937;
}

/* ============================================
   LINEAR TRACK (ULTRA THIN)
   ============================================ */

.progress-track {
    height: 4px; /* Was 6px */
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px; /* Was 16px */
}

.progress-track-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    transition: width 0.6s ease;
    border-radius: 2px;
}

/* ============================================
   HORIZONTAL STEPS (ULTRA COMPACT)
   ============================================ */

.progress-steps-horizontal {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 100%; /* Was 1000px - now full width */
    margin: 0 auto;
    gap: 8px; /* Smaller gap */
}

.progress-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px; /* Was 8px */
    position: relative;
    transition: all 0.3s ease;
}

.step-circle {
    width: 36px; /* Was 44px - now SMALLER */
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px; /* Was 18px */
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ============================================
   STEP STATES (ULTRA COMPACT)
   ============================================ */

.progress-step.complete .step-circle {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    border: 2px solid #ffffff;
}

.progress-step.complete .step-circle i {
    font-size: 18px;
}

.progress-step.current .step-circle {
    background: linear-gradient(135deg, #2b4f22 0%, #1a3316 100%);
    color: #f2e638;
    box-shadow: 0 0 0 2px rgba(43, 79, 34, 0.2), /* Was 3px */
                0 2px 8px rgba(43, 79, 34, 0.4);
    border: 2px solid #f2e638;
}

.progress-step.pending .step-circle {
    background: #f3f4f6;
    color: #9ca3af;
    border: 2px solid #d1d5db;
    cursor: not-allowed;
}

/* ============================================
   STEP LABELS (ULTRA COMPACT)
   ============================================ */

.step-label {
    font-size: 11px; /* Was 12px - now TINY */
    font-weight: 600;
    color: #6b7280;
    text-align: center;
    max-width: 100px; /* Was 110px */
    line-height: 1.2;
}

.progress-step.current .step-label {
    color: #2b4f22;
    font-weight: 700;
}

.progress-step.complete .step-label {
    color: #10b981;
}

.progress-step.pending .step-label {
    color: #9ca3af;
}

/* ============================================
   CONNECTORS (ULTRA THIN)
   ============================================ */

.step-connector {
    position: absolute;
    top: 18px; /* Adjusted for 36px circle */
    left: calc(50% + 18px);
    width: calc(100% - 36px);
    height: 2px; /* Was 3px */
    background: #e5e7eb;
    z-index: 1;
}

.progress-step.complete .step-connector {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

/* ============================================
   HOVER (SUBTLE)
   ============================================ */

.progress-step.complete:hover .step-circle,
.progress-step.current:hover .step-circle {
    transform: scale(1.05); /* Was 1.08 */
}

.progress-step.complete,
.progress-step.current {
    cursor: pointer;
}

.progress-step.pending {
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   RESPONSIVE (FULLY ADAPTIVE)
   ============================================ */

/* Tablets */
@media (max-width: 1024px) {
    .registration-progress-bar-container {
        padding: 6px 12px;
    }
    
    .progress-pill {
        height: 26px;
        margin-bottom: 6px;
    }
    
    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .step-label {
        font-size: 10px;
        max-width: 80px;
    }
    
    .step-connector {
        top: 16px;
    }
}

/* Mobile landscape */
@media (max-width: 768px) {
    .registration-progress-bar-container {
        padding: 5px 10px;
    }
    
    .progress-pill {
        height: 24px;
        margin-bottom: 5px;
    }
    
    .progress-label {
        font-size: 11px;
    }
    
    .progress-percentage {
        font-size: 12px;
    }
    
    .progress-pill-left,
    .progress-pill-right {
        padding: 0 10px;
    }
    
    .progress-track {
        height: 3px;
        margin-bottom: 8px;
    }
    
    .step-circle {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .step-label {
        font-size: 9px;
        max-width: 70px;
    }
    
    .step-connector {
        top: 14px;
        height: 1px;
    }
}

/* Mobile portrait */
@media (max-width: 576px) {
    .registration-progress-bar-container {
        padding: 4px 8px;
    }
    
    .progress-pill {
        height: 22px;
    }
    
    .progress-steps-horizontal {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    
    .progress-step {
        flex: 0 0 calc(33.333% - 6px); /* 3 per row */
        max-width: 100px;
    }
    
    .step-connector {
        display: none; /* Hide connectors on small screens */
    }
}

/* Very small phones */
@media (max-width: 400px) {
    .registration-progress-bar-container {
        padding: 4px 6px;
    }
    
    .progress-pill-left,
    .progress-pill-right {
        padding: 0 8px;
    }
    
    .progress-label,
    .progress-percentage {
        font-size: 10px;
    }
    
    .progress-step {
        flex: 0 0 calc(50% - 4px); /* 2 per row on tiny screens */
    }
    
    .step-circle {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
}

/* ============================================
   CASPIO DATAPAGE HEIGHT FIX
   ============================================ */

.content-area {
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
}

.content-wrapper {
    min-height: calc(100vh - 64px - 60px) !important; /* Smaller progress bar */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-bottom: 60px !important;
}

#datapage-container,
.datapage-wrapper {
    min-height: 900px !important;
    height: auto !important;
    overflow: visible !important;
}

#datapage-container iframe,
.datapage-wrapper iframe {
    min-height: 900px !important;
    height: auto !important;
    width: 100% !important;
    border: none !important;
}

.cbFormDataDetailsContainer,
[id^="caspioform"] {
    min-height: 700px !important;
    height: auto !important;
    padding-bottom: 100px !important;
    overflow: visible !important;
}

.cbFormDataDetailsContainer input[type="submit"],
.cbFormDataDetailsContainer button[type="submit"],
[id^="caspioform"] input[type="submit"],
[id^="caspioform"] button[type="submit"] {
    margin-bottom: 60px !important;
    margin-top: 30px !important;
    position: relative !important;
    z-index: 10 !important;
}

/* ============================================
   SIDEBAR SYNC
   ============================================ */

body.registration-mode .sidebar .nav-item[data-step-state="complete"] {
    background-color: rgba(16, 185, 129, 0.08);
    border-left: 4px solid #10b981;
}

body.registration-mode .sidebar .nav-item[data-step-state="current"] {
    background-color: rgba(43, 79, 34, 0.1);
    border-left: 4px solid #2b4f22;
}

body.registration-mode .sidebar .nav-item[data-step-state="pending"] {
    opacity: 0.4;
    pointer-events: none;
}

body.registration-mode .sidebar .nav-item[data-step-state="complete"] .nav-icon::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #10b981;
    font-size: 14px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes step-complete-animation {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.progress-step.complete .step-circle {
    animation: step-complete-animation 0.4s ease;
}

/* ============================================
   PRINT
   ============================================ */

@media print {
    .registration-progress-bar-container {
        display: none;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.progress-step.complete:focus .step-circle,
.progress-step.current:focus .step-circle {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .progress-pill-fill,
    .progress-track-fill,
    .step-circle {
        transition: none;
    }
    .progress-step.complete .step-circle {
        animation: none;
    }
}

/* ============================================
   TOTAL HEIGHT MEASUREMENT
   ============================================ */

/* Total height breakdown:
   - Container padding: 8px top + 8px bottom = 16px
   - Pill height: 28px
   - Pill margin-bottom: 8px
   - Track height: 4px
   - Track margin-bottom: 12px
   - Step circles: 36px
   - Step labels: ~20px
   - Total: ~120px (vs 180px in v2.0, vs 110px in v2.1)
   NOW: ~70px TOTAL! (60% reduction from v2.1!)
*/