/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */

a.navbar-brand {
  white-space: normal;
  text-align: center;
  word-break: break-all;
}

/* Provide sufficient contrast against white background */
a {
  color: #0366d6;
}

.btn-primary {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
  font-size: 14px;
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.border-top {
  border-top: 1px solid #e5e5e5;
}
.border-bottom {
  border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
  font-size: 1rem;
  line-height: inherit;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
  position: relative;
  min-height: 100%;
}

body {
  /* Margin bottom by footer height */
  margin-bottom: 60px;
}
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px; /* Vertically center the text there */
}

/* Match Select2 visual style with Bootstrap form-control */
.select2-container {
  width: 100% !important;
}

.select2-container--default .select2-selection--single {
  height: calc(1.5em + 0.75rem + 2px) !important;
  min-height: calc(1.5em + 0.75rem + 2px) !important;
  padding: 0.375rem 0.75rem !important;
  border: 1px solid #ced4da !important;
  border-radius: 0.25rem !important;
  background-color: #fff !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 1.5 !important;
  color: #495057 !important;
  padding-left: 0 !important;
  padding-right: 1.5rem !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: calc(1.5em + 0.75rem + 2px) !important;
  right: 0.5rem !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #6c757d;
}

.select2-container--default.select2-container--disabled .select2-selection--single {
  background-color: #e9ecef;
  cursor: not-allowed;
}

/* Hiển thị trạng thái validate của Bootstrap (was-validated) lên Select2 wrapper.
   Select2 chèn .select2-container ngay sau native <select>; native select bị ẩn
   nên cần áp style :invalid/:valid sang container kế bên cho người dùng thấy. */
.was-validated select.form-control:invalid + .select2-container--default .select2-selection--single,
.was-validated select.form-control.is-invalid + .select2-container--default .select2-selection--single {
  border-color: #dc3545 !important;
}

.was-validated select.form-control:invalid + .select2-container--default.select2-container--focus .select2-selection--single,
.was-validated select.form-control:invalid + .select2-container--default.select2-container--open .select2-selection--single {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.was-validated select.form-control:valid + .select2-container--default .select2-selection--single,
.was-validated select.form-control.is-valid + .select2-container--default .select2-selection--single {
  border-color: #28a745 !important;
}

.was-validated select.form-control:valid + .select2-container--default.select2-container--focus .select2-selection--single,
.was-validated select.form-control:valid + .select2-container--default.select2-container--open .select2-selection--single {
  border-color: #28a745 !important;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

/* Ảnh thẻ: <input type="file"> bị ẩn (.d-none); cần thể hiện trạng thái invalid/valid
   trên #anhPreviewContainer cùng .form-group cha bằng :has(). */
.was-validated .form-group:has(> input[type="file"]:invalid) > #anhPreviewContainer {
  border-color: #dc3545 !important;
}

.was-validated .form-group:has(> input[type="file"]:valid) > #anhPreviewContainer {
  border-color: #28a745 !important;
}

/* Nhóm radio (vd: Giới tính): radio nằm trong <label> nên adjacent selector mặc định
   của Bootstrap không tô đỏ label. Dùng :has() để tô đỏ cả label và radio. */
.was-validated .form-check-input:invalid {
  border-color: #dc3545;
}

.was-validated label.form-check-label:has(.form-check-input:invalid) {
  color: #dc3545;
}

.was-validated label.form-check-label:has(.form-check-input:valid) {
  color: #28a745;
}

/* @@media print {
        body * {
            visibility: hidden;
        }

        #formDangKy, #formDangKy * {
            visibility: visible;
        }

        #formDangKy {
            position: absolute;
            left: 0;
            top: 0;
        }
        input[type=file], button, .hide-print {
            visibility: hidden !important;
        }
    }*/
label.required:after {
    color: #ff0000;
    content: ' *';
    display: inline;
}

.form-control-file.is-invalid, .was-validated .form-control-file:invalid,
.form-check-input.is-invalid, .was-validated .form-check-input:invalid {
    border-color: #dc3545 !important;
    padding-right: calc(1.5em + .75rem);
    background-image: url(data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E);
    background-repeat: no-repeat;
    background-position: center right calc(.375em + .1875rem);
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

/*Hide all except first fieldset*/
.dangKyHoSo #msform fieldset:not(:first-of-type) {
    display: none;
}
/*progressbar*/
#progressbar {
    margin-bottom: 30px;
    overflow: hidden;
    color: lightgrey;
}

    #progressbar .active {
        color: #000000;
    }

    #progressbar li {
        list-style-type: none;
        font-size: 12px;
        width: 33.33%;
        float: left;
        position: relative;
    }

    /*Icons in the ProgressBar*/

    #progressbar #thongTinHoSo:before {
        font-family: FontAwesome;
        content: "\f007";
    }

    #progressbar #thanhToan:before {
        font-family: FontAwesome;
        content: "\f09d";
    }

    #progressbar #hoanThanh:before {
        font-family: FontAwesome;
        content: "\f00c";
    }

    /*ProgressBar before any progress*/
    #progressbar li:before {
        width: 50px;
        height: 50px;
        line-height: 45px;
        display: block;
        font-size: 18px;
        color: #ffffff;
        background: lightgray;
        border-radius: 50%;
        margin: 0 auto 10px auto;
        padding: 2px;
    }

    /*ProgressBar connectors*/
    #progressbar li:after {
        content: '';
        width: 100%;
        height: 2px;
        background: lightgray;
        position: absolute;
        left: 0;
        top: 25px;
        z-index: -1;
    }

    /*Color number of the step and the connector before it*/
    #progressbar li.active:before, #progressbar li.active:after {
        background: skyblue;
    }

/* --- Bước Hoàn thành (ChiTietHoSo) --- */
#step-hoanthanh .form-card {
    padding: 0.5rem 0 1rem;
}

#step-hoanthanh .hs-section {
    margin-bottom: 1.25rem;
}

#step-hoanthanh .hs-section:last-child {
    margin-bottom: 0;
}

#step-hoanthanh .hs-status-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    border-left-width: 4px;
    padding: 1rem 1.15rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

#step-hoanthanh .hs-status-card--success {
    border-left-color: #28a745;
}

#step-hoanthanh .hs-status-card--danger {
    border-left-color: #dc3545;
}

#step-hoanthanh .hs-status-card--warning {
    border-left-color: #ffc107;
}

#step-hoanthanh .hs-status-card--info {
    border-left-color: #17a2b8;
}

#step-hoanthanh .hs-status-card__title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#step-hoanthanh .hs-status-card__title .fa {
    opacity: 0.85;
}

#step-hoanthanh .hs-status-card__body {
    color: #495057;
    line-height: 1.55;
}

#step-hoanthanh .hs-status-card__body p:last-child {
    margin-bottom: 0;
}

#step-hoanthanh .hs-student-summary {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
}

#step-hoanthanh .hs-student-summary__title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.65rem;
}

#step-hoanthanh .hs-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

#step-hoanthanh .hs-student-summary .hs-metric-grid {
    margin-top: 0;
}

#step-hoanthanh .hs-metric {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    text-align: center;
}

#step-hoanthanh .hs-student-summary .hs-metric {
    background: #fff;
}

#step-hoanthanh .hs-metric__label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

#step-hoanthanh .hs-metric__value {
    font-size: 1.15rem;
    font-weight: 600;
    color: #212529;
    word-break: break-word;
}

#step-hoanthanh .hs-metric--highlight {
    background: #e8f4fd;
    border-color: #b8daff;
}

#step-hoanthanh .hs-metric--highlight .hs-metric__value {
    color: #004085;
}

#step-hoanthanh .hs-metric--mono .hs-metric__value {
    font-family: Consolas, "Courier New", monospace;
    letter-spacing: 0.02em;
}

#step-hoanthanh .hs-exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

#step-hoanthanh .hs-notice {
    background: #fffbf0;
    border: 1px solid #ffe8a1;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-top: 0.85rem;
    font-size: 0.92rem;
    color: #664d03;
}

#step-hoanthanh .hs-notice ul {
    margin-bottom: 0;
    padding-left: 1.15rem;
}

#step-hoanthanh .hs-notice li + li {
    margin-top: 0.35rem;
}

#step-hoanthanh .hs-result-banner {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 1.05rem;
}

#step-hoanthanh .hs-result-banner--success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#step-hoanthanh .hs-result-banner--danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#step-hoanthanh .hs-appeal-panel {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem 1.15rem;
    margin-top: 0.5rem;
}

#step-hoanthanh .hs-appeal-checks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
}

#step-hoanthanh .hs-pending-card {
    text-align: center;
    padding: 1.5rem 1rem;
}

#step-hoanthanh .hs-pending-card .fs-title {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 576px) {
    #step-hoanthanh .hs-metric-grid,
    #step-hoanthanh .hs-exam-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Ảnh nền trường — wwwroot/bg-ntl.jpg (_Layout body.layout-bg-ntl) */
body.layout-bg-ntl {
  position: relative;
  background-color: #e8f0f8;
}

body.layout-bg-ntl::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url("/bg-ntl.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

body.layout-bg-ntl::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.78);
  pointer-events: none;
}

body.layout-bg-ntl > .container {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  padding: 1rem 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}
