/* Immigration Readiness Module
   Design system: mirrors university_recommendations (ur-*) patterns
   Prefix: imm- to avoid collisions */

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes immPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.imm-pulse { animation: immPulse 2s ease-in-out infinite; }

@keyframes immFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.imm-fade-in { animation: immFadeIn 0.5s ease forwards; }

/* ================================================================
   HEADER — dark gradient (matches ur-admin-header)
   ================================================================ */
.imm-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: #fff;
    padding: 30px 0;
}
.imm-header h1, .imm-header h2, .imm-header h3,
.imm-header h4, .imm-header h5, .imm-header h6,
.imm-header p, .imm-header i, .imm-header a.text-white { color: #fff; }

/* ================================================================
   SECTION WRAPPER — light bg like ur-admin-section
   ================================================================ */
.imm-section {
    padding: 30px 0 60px;
    background: #f8f9fa;
    min-height: 70vh;
}

/* ================================================================
   STAT CARDS — matches ur-stat-card exactly
   ================================================================ */
.imm-stat-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}
.imm-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.imm-stat-icon {
    width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 15px; font-size: 1.5rem;
}
.imm-stat-value {
    font-size: 2rem; font-weight: 800; color: #1a1a2e; margin-bottom: 5px;
}
.imm-stat-label {
    font-size: 0.85rem; color: #6c757d; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
}

/* ================================================================
   ACTION CARDS — matches ur-action-card
   ================================================================ */
.imm-action-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    padding: 30px;
    margin-bottom: 25px;
}
.imm-action-card h5 {
    font-weight: 700; color: #1a1a2e; margin-bottom: 20px;
    padding-bottom: 12px; border-bottom: 2px solid #f0f0f0;
}

/* ================================================================
   QUICK ACTIONS — matches ur-quick-action
   ================================================================ */
.imm-quick-action {
    display: flex; align-items: center; gap: 15px; padding: 15px;
    border-radius: 12px; background: #f8f9fa; margin-bottom: 10px;
    transition: all 0.2s ease; text-decoration: none; color: inherit;
}
.imm-quick-action:hover {
    background: #e9ecef; transform: translateX(5px); color: inherit;
}
.imm-quick-action-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
}

/* ================================================================
   TABLES — matches ur-recent-table
   ================================================================ */
.imm-table { margin-bottom: 0; }
.imm-table thead th {
    background: #f8f9fa; border-bottom: 2px solid #e9ecef;
    font-weight: 700; font-size: 0.8rem; text-transform: uppercase;
    letter-spacing: 0.5px; color: #6c757d; padding: 12px 16px;
}
.imm-table tbody td {
    padding: 14px 16px; vertical-align: middle;
    border-bottom: 1px solid #f0f0f0; font-size: 0.9rem;
}
.imm-table tbody tr:last-child td { border-bottom: none; }
.imm-table tbody tr:hover { background: #f8f9fa; }

/* ================================================================
   STATUS DOT — matches ur-status-dot
   ================================================================ */
.imm-status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    display: inline-block; margin-right: 6px;
}

/* ================================================================
   STATUS PILLS — colored badges for stage statuses
   ================================================================ */
.imm-status-pill {
    display: inline-flex; align-items: center;
    padding: 4px 12px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600;
}
.imm-status-not_started { background: #f3f4f6; color: #6b7280; }
.imm-status-in_progress { background: #dbeafe; color: #2563eb; }
.imm-status-completed { background: #dcfce7; color: #16a34a; }
.imm-status-needs_attention { background: #fef3c7; color: #d97706; }

/* ================================================================
   SCORE BADGE — header score display
   ================================================================ */
.imm-score-badge {
    background: rgba(255,255,255,0.15);
    border-radius: 16px; padding: 16px 28px;
    text-align: center; backdrop-filter: blur(4px);
}
.imm-score-badge-lg {
    background: rgba(255,255,255,0.2);
    border-radius: 20px; padding: 24px 48px;
    display: inline-block;
}
.imm-score-number {
    font-size: 2.5rem; font-weight: 800; line-height: 1;
}
.imm-score-badge-lg .imm-score-number { font-size: 3.5rem; }
.imm-score-label { font-size: 0.85rem; opacity: 0.8; }

/* ================================================================
   SCORE BAR — visual progress bar
   ================================================================ */
.imm-score-visual {
    background: #e5e7eb; border-radius: 10px; height: 18px; overflow: hidden;
}
.imm-score-visual-lg { height: 26px; border-radius: 13px; }
.imm-score-bar {
    background: linear-gradient(90deg, #dc3545 0%, #ffc107 35%, #198754 65%, #0d6efd 100%);
    height: 100%; border-radius: 10px;
    transition: width 0.8s ease;
}

/* ================================================================
   STAGE ICONS
   ================================================================ */
.imm-stage-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1rem; flex-shrink: 0;
}
.imm-stage-icon-sm {
    width: 30px; height: 30px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.8rem;
}

/* ================================================================
   NOTES
   ================================================================ */
.imm-note {
    border: 1px solid #e5e7eb; border-radius: 12px;
    padding: 14px 18px; font-size: 0.9rem;
    transition: box-shadow 0.2s ease;
}
.imm-note:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.imm-note-pinned {
    border-left: 4px solid #f59e0b; background: #fffbeb;
}
.imm-note-counselor {
    border-left: 4px solid #0f3460; background: #f0f4ff;
}

/* ================================================================
   QUESTIONNAIRE — matches ur-questionnaire patterns
   ================================================================ */
.imm-questionnaire-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: #fff; padding: 30px 0;
}
.imm-questionnaire-header h1, .imm-questionnaire-header h2,
.imm-questionnaire-header p, .imm-questionnaire-header i { color: #fff; }

.imm-progress-container {
    background: #fff; border-radius: 16px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    padding: 25px 30px; margin-top: -20px;
    position: relative; z-index: 10;
}
.imm-progress-bar-wrapper {
    height: 8px; background: #e9ecef; border-radius: 4px; overflow: hidden;
}
.imm-progress-fill {
    height: 100%; border-radius: 4px;
    background: linear-gradient(90deg, #0f3460, #e94560);
    transition: width 0.4s ease;
}
.imm-phase-dot {
    width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid #dee2e6; background: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.8rem; color: #6c757d;
    cursor: pointer; transition: all 0.3s ease;
}
.imm-phase-dot.active {
    background: #0f3460; color: #fff; border-color: #0f3460;
}
.imm-phase-dot.completed {
    background: #198754; color: #fff; border-color: #198754;
}

.imm-question-card {
    background: #fff; border-radius: 16px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    padding: 25px 30px; margin-bottom: 20px;
    border-left: 4px solid #0f3460;
    transition: box-shadow 0.3s ease;
}
.imm-question-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.imm-question-num {
    width: 32px; height: 32px; border-radius: 50%;
    background: #0f3460; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem;
}

.imm-questionnaire-wrapper {
    padding: 30px 0 60px; background: #f8f9fa; min-height: 50vh;
}

/* ================================================================
   RESULTS PAGE — matches ur-results patterns
   ================================================================ */
.imm-breakdown-card {
    background: #fff; border-radius: 16px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    overflow: hidden; transition: transform 0.3s ease;
}
.imm-breakdown-card:hover { transform: translateY(-2px); }
.imm-breakdown-card .card-header {
    background: #f8f9fa; font-weight: 700;
    border-bottom: 2px solid #f0f0f0; padding: 16px 20px;
}

/* ================================================================
   ACCORDION — modern style for stage pipeline
   ================================================================ */
.imm-accordion .accordion-item {
    border: none; border-radius: 12px !important;
    margin-bottom: 8px; overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}
.imm-accordion .accordion-button {
    padding: 18px 24px; font-weight: 600;
    border-radius: 12px !important;
}
.imm-accordion .accordion-button:not(.collapsed) {
    background: #f0f4ff; color: #0f3460;
    box-shadow: none;
}
.imm-accordion .accordion-body {
    padding: 20px 24px; background: #fafbfc;
}

/* ================================================================
   SAVING INDICATOR
   ================================================================ */
.imm-saving-indicator {
    position: fixed; bottom: 20px; right: 20px;
    background: #1a1a2e; color: #fff;
    padding: 10px 20px; border-radius: 12px;
    font-size: 0.85rem; display: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9999;
}

/* ================================================================
   MODAL z-index fix
   ================================================================ */
.modal-backdrop { z-index: 10000 !important; }
.modal { z-index: 10001 !important; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
    .imm-header h1, .imm-header h2 { font-size: 1.5rem !important; }
    .imm-score-number { font-size: 2rem; }
    .imm-score-badge-lg .imm-score-number { font-size: 2.5rem; }
    .imm-stat-value { font-size: 1.5rem; }
    .imm-action-card { padding: 20px; }
    .imm-question-card { padding: 18px 20px; }
}

/* ================================================================
   PRINT
   ================================================================ */
@media print {
    .imm-header, .btn, .imm-saving-indicator { display: none !important; }
    .imm-action-card, .imm-breakdown-card { box-shadow: none; border: 1px solid #ddd; }
}
