/* === OLD ENGLISH TEXT FONT === */
@font-face {
  font-family: 'OldEnglishTextMT';
  src: local('Old English Text MT'), local('OldEnglishTextMT');
  font-style: normal;
  font-weight: normal;
}

/* === GENERAL TYPOGRAPHY === */
body {
  font-family: "Bookman Old Style", "Times New Roman", serif;
  font-size: 14px;
  color: #111;
}

.border-dashed {
  border: 2px dashed #0d6efd;
  border-radius: 10px;
  background: #f8fbff;
  transition: 0.2s;
}
.border-dashed:hover {
  background: #eef5ff;
}

.ipcrf-icon {
  font-size: 40px;
  color: #dc3545;
}
.ipcrf-upload-card {
    border: 2px dashed #d1d5db;
    border-radius: 18px;
    transition: all .25s ease;
    background: #f9fafb;
    cursor: pointer;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ipcrf-upload-card:hover {
    border-color: #6366f1;
    background: #eef2ff;
    transform: translateY(-2px);
}

.ipcrf-upload-card.uploaded {
    border-color: #22c55e;
    background: #ecfdf5;
}

.ipcrf-upload-body {
    text-align: center;
}

.ipcrf-main-icon {
    font-size: 40px;
    color: #9ca3af;
    transition: .2s;
}

.ipcrf-upload-card:hover .ipcrf-main-icon {
    color: #6366f1;
}

.ipcrf-upload-card.uploaded .ipcrf-main-icon {
    color: #22c55e;
}

.ipcrf-title {
    font-weight: 600;
    margin-top: 6px;
    font-size: 14px;
}

.domain-title {
  background: #2c3e50 !important;
  color: white !important;
  font-weight: bold !important;
}

/* Modern spinner */
.loader {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #1E3F66; /* Main color */
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

/* Keyframes must be global, not inside media queries */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
/* === HEADER STYLES === */
.header {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 10px;
  position: relative;
}

.doc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
  font-size: 13px;
}
.doc-top .left { color: #111; }
.doc-top .right { font-style: italic; font-size: 13px; }

.dep-logo {
  display: block;
  margin: 0 auto 6px;
  width: 78px;
  height: auto;
}

.level-check {
  pointer-events: none;
  opacity: 1;
  cursor: default;
}
/* Add these styles to your CSS file */
.training-item {
    transition: all 0.3s ease;
    border-left: 4px solid #0d6efd !important;
}

.training-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15) !important;
}

.border-dashed {
    border: 2px dashed #dee2e6 !important;
}

.file-upload-area {
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    background-color: rgba(13, 110, 253, 0.05) !important;
    border-color: #0d6efd !important;
}

.form-control-lg, .form-select-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.border-primary-subtle {
    border-color: #cfe2ff !important;
}

.bg-primary-subtle {
    background-color: #cfe2ff !important;
}
/* COI - YELLOW */
.row-coi {
  background-color: #fff8e1;
}
.row-coi td:first-child {
  border-left: 6px solid #ffc107;
}

/* NCOI - GREEN */
.row-ncoi {
  background-color: #e9f7ef;
}
.row-ncoi td:first-child {
  border-left: 6px solid #28a745;
}

/* === HEADER TEXT STYLES === */
.dep-rc-title {
  font-family: 'OldEnglishTextMT', 'Old English Text MT', serif;
  font-size: 11pt;
  font-weight: normal;
}

.dep-sub {
  font-family: 'OldEnglishTextMT', 'Old English Text MT', serif;
  font-size: 16pt;
  font-weight: normal;
}

.form-card {
  max-width: 980px;
  margin: 0 auto 30px;
}

.levels-checkboxes label {
  margin-right: 15px;
  cursor: pointer;
}

table td[contenteditable="true"] {
  background: #f9f9f9;
}

/* === PERFORMANCE TABLE HIGHLIGHT === */
.highlight-row {
  background-color: #f8fff8 !important;
  border: 2px solid #28a745 !important;
  border-radius: 6px;
  transition: all 0.25s ease-in-out;
}

#performanceTable tbody tr {
  transition: all 0.25s ease-in-out;
}

/* === TABLE HEADERS === */
table.table thead th {
  vertical-align: middle;
}
/* Overlay */
#qsLoadingOverlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 9999;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#qsLoadingOverlay.active {
    opacity: 1;
    visibility: visible;
}

/* Wrapper */
.qs-loader-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* AURA BACKGROUND (glow circle) */
.logo-aura {
    width: 160px;
    height: 160px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: radial-gradient(
        circle,
        rgba(30, 63, 102, 0.25) 0%,
        rgba(30, 63, 102, 0.08) 40%,
        rgba(255,255,255,0) 70%
    );

    animation: auraPulse 2s ease-in-out infinite;
}

/* LOGO */
.loader-logo {
    width: 90px;
    height: 90px;

    object-fit: contain;

    animation: logoFloat 1.8s ease-in-out infinite;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,0.15));
}

/* TEXT */
.qs-loading-text {
    margin-top: 18px;
    font-size: 14px;
    color: #1E3F66;
    font-weight: 500;
    opacity: 0.85;
    animation: fadePulse 1.5s ease-in-out infinite;
}

/* ANIMATIONS */
@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-6px) scale(1.05);
    }
}

@keyframes auraPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

@keyframes fadePulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
/* EVALUATING LOADER */
#evalLoadingOverlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 9999;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#evalLoadingOverlay.active {
    opacity: 1;
    visibility: visible;
}
.qs-loader-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center; /* ✅ ADD THIS */
}
/* =========================
   SUBMIT LOADER ONLY
========================= */

#submitLoadingOverlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 9999;

    /* 🔥 IMPORTANT: hidden by default */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 🔥 SHOW ONLY WHEN ACTIVE */
#submitLoadingOverlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}
input[name="levels[]"] {
    cursor: not-allowed;
}
/* =======================================
   EDUCATION MODAL - CLEAN UNIFORM DESIGN
======================================= */

/* 🔥 GLOBAL FONT (COMPACT + CONSISTENT) */
#educationModal {
    font-size: 0.9rem;
}

#educationModal .form-label {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

#educationModal .form-control,
#educationModal .form-select {
    font-size: 0.85rem;
    padding: 6px 10px;
}

/* INPUT HEIGHT FIX */
#educationModal input[type="date"],
#educationModal select {
    height: 36px;
}

/* =======================================
   MODAL SCROLL
======================================= */
#educationModal .modal-body {
    max-height: 85vh;
    overflow-y: auto;
}

/* =======================================
   LEFT SIDE (RUBRICS + SUMMARY UNIFORM)
======================================= */
.education-rubrics-sticky {
    position: sticky;
    top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px; /* 🔥 consistent spacing */
}

/* 🔥 MAKE BOTH CARDS IDENTICAL STYLE */
.education-rubrics-sticky .card {
    border: 1px solid #e5e7eb;
    border-left: 4px solid #28a745;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* 🔥 SAME HEADER STYLE */
.education-rubrics-sticky .card-header {
    background-color: #f8f9fa;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 12px;
}

/* 🔥 SAME BODY STYLE */
.education-rubrics-sticky .card-body {
    font-size: 0.83rem;
    padding: 12px;
}

/* REMOVE EXTRA STYLE DIFFERENCE */
.bg-light-green {
    background-color: #f8f9fa !important;
}

.border-light-green {
    border-left: 4px solid #28a745 !important;
}

.text-green {
    color: #198754 !important;
}

/* =======================================
   RUBRICS LIST IMPROVED
======================================= */
.education-rubrics-sticky .list-group-item {
    font-size: 0.8rem;
    padding: 8px 10px;
    border: none;
    border-bottom: 1px solid #f1f1f1;
}

.education-rubrics-sticky .list-group-item:last-child {
    border-bottom: none;
}

/* =======================================
   SUMMARY CARD (LOOK LIKE RUBRICS)
======================================= */
#modal_education_summary {
    font-size: 0.82rem;
    line-height: 1.4;
}

/* 🔥 LABEL STYLE */
#modal_education_summary strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

/* =======================================
   RIGHT SIDE FORM
======================================= */
.education-form-scroll {
    max-height: none;
    overflow: visible;
}

/* =======================================
   ROW SPACING
======================================= */
#educationModal .row.g-4 {
    --bs-gutter-y: 0.8rem;
}

#educationModal .row.g-3 {
    --bs-gutter-y: 0.6rem;
}

/* =======================================
   FILE UPLOAD DESIGN
======================================= */
.education-modal-border-dashed {
    border: 2px dashed #ced4da;
    transition: 0.2s;
}

.education-modal-border-dashed:hover {
    border-color: #0d6efd;
    background-color: #f8f9fa;
}

/* =======================================
   INPUT BORDER CLEAN
======================================= */
.education-modal-border {
    border: 1px solid #ced4da;
    border-radius: 6px;
}

/* =======================================
   SMALL TEXT
======================================= */
.education-modal-form-text {
    font-size: 12px;
    color: #6c757d;
}

/* =======================================
   MOBILE FIX
======================================= */
@media (max-width: 768px) {

    #educationModal {
        font-size: 0.85rem;
    }

    .education-rubrics-sticky {
        position: relative;
        top: 0;
    }

    #educationModal .col-md-4,
    #educationModal .col-md-3,
    #educationModal .col-md-5 {
        width: 100%;
    }
}
/* ================= TRAINING MODAL DESIGN ================= */

/* ================= LEFT SIDE ================= */
.training-summary-sticky {
  position: sticky;   /* panatilihing nakasticky */
  top: 1rem;          /* offset mula top */
  flex-shrink: 0;     /* di papayagang lumiit */
  width: 100%;        /* occupy full col width */
  max-height: calc(100vh - 140px); /* di lalampas modal height */
  overflow: visible;  /* walang scroll sa left */
}

/* ================= RIGHT SIDE ================= */
.modal-body > .col-md-8 {
  overflow-y: auto;   /* dito lang mag-scroll */
  max-height: calc(100vh - 140px);
  font-size: 0.9rem;
}

/* ================= OPTIONAL: ADDITIONAL STYLING ================= */
.training-item .badge,
.training-item .remove-training i {
  font-size: 0.8rem;
  padding: 0.3em 0.5em;
}
.eligibility-summary-sticky .card {
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-left: 4px solid #28a745; /* green border like Training/Experience */
}

.eligibility-summary-sticky .card-header {
    font-weight: 600;
    color: #1e7e34; /* green text */
    background-color: #e9f7ef; /* light green background, NO DARK BLUE */
}

.eligibility-summary-sticky .list-group-item {
    border: none;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    color: #1e7e34; /* green text */
}

.eligibility-summary-sticky .badge {
    font-size: 0.85rem;
    padding: 0.35em 0.65em;
    font-weight: 600;
    color: #fff;
}

.bg-light-green {
  background-color: #e9f7ef !important;
}

.border-light-green {
  border-left: 4px solid #28a745 !important;
}

.text-green {
  color: #1e7e34 !important;
}
/* EVALUATION SPINNER DESIGN */
/* ================================
   SWEETALERT BLUR BACKDROP
   Same style as qsLoadingOverlay
================================ */

.qs-blur-backdrop {
    backdrop-filter: blur(6px) !important;
    background: rgba(255, 255, 255, 0.65) !important;
}

/* Corporate Popup */
.qs-corporate-popup {
    border-radius: 12px;
    padding: 35px 30px;
    background: #ffffff;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
    border-top: 5px solid #1E3F66;
}

/* Title */
.qs-corporate-title {
    font-size: 18px;
    font-weight: 600;
    color: #1E3F66;
    letter-spacing: 0.5px;
}

/* Wrapper */
.qs-corporate-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

/* Spinner */
.qs-corporate-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(0,0,0,0.08);
    border-top: 5px solid #1E3F66;
    border-radius: 50%;
    animation: spinCorporate 0.9s linear infinite;
}

/* Text */
.qs-corporate-text {
    margin-top: 18px;
    font-size: 14px;
    color: #444;
    text-align: center;
    max-width: 280px;
    opacity: 0.9;
    animation: fadePulse 1.6s ease-in-out infinite;
}

/* Animations */
@keyframes spinCorporate {
    to { transform: rotate(360deg); }
}

@keyframes fadePulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}
/* Subtle breathing animation */
@keyframes fadePulse {
    0% { opacity: 0.4; }
    50% { opacity: 0.9; }
    100% { opacity: 0.4; }
}
/* === RESPONSIVE TWEAKS === */
@media (max-width: 576px) {
  .doc-top { flex-direction: column; gap: 6px; }
  .dep-logo { width: 64px; }
}
