/*
* demo.css
* File include item demo only specific css only
******************************************************************************/

.light-style .menu .app-brand.demo {
  height: 64px;
}

.dark-style .menu .app-brand.demo {
  height: 64px;
}

.app-brand-logo.demo {
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  display: -ms-flexbox;
  display: flex;
  width: auto;
  height: auto;
}

.app-brand-logo.demo svg {
  width: 35px;
  height: 24px;
}

.app-brand-text.demo {
  font-size: 1.375rem;
}

/* ! For .layout-navbar-fixed added fix padding top tpo .layout-page */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 64px !important;
}
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 78px !important;
}
/* Navbar page z-index issue solution */
.content-wrapper .navbar {
  z-index: auto;
}

/*
* Content
******************************************************************************/

.demo-blocks > * {
  display: block !important;
}

.demo-inline-spacing > * {
  margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
.demo-vertical-spacing > * {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg > * {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-lg.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-xl > * {
  margin-top: 5rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-xl.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.rtl-only {
  display: none !important;
  text-align: left !important;
  direction: ltr !important;
}

[dir='rtl'] .rtl-only {
  display: block !important;
}

/* Dropdown buttons going out of small screens */
@media (max-width: 576px) {
  #dropdown-variation-demo .btn-group .text-truncate {
    width: 254px;
    position: relative;
  }
  #dropdown-variation-demo .btn-group .text-truncate::after {
    position: absolute;
    top: 45%;
    right: 0.65rem;
  }
}

/*
* Layout demo
******************************************************************************/

.layout-demo-wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin-top: 1rem;
}
.layout-demo-placeholder img {
  width: 900px;
}
.layout-demo-info {
  text-align: center;
  margin-top: 1rem;
}

/* Case wizard on desktop: header keeps its width, content may shrink below its widest child (Quill toolbar) instead of spilling over the steps column. */
@media (min-width: 768px) {
  #Case_Wizard .bs-stepper-header { flex: 0 0 18rem; }
  #Case_Wizard .bs-stepper-content { flex: 1 1 0; min-width: 0; width: auto; }
  #Case_Wizard .bs-stepper-header .step-trigger { white-space: normal; text-align: left; }
  #Case_Wizard .bs-stepper-label { min-width: 0; }
  #Case_Wizard .bs-stepper-circle { flex-shrink: 0; }
  #Case_Wizard .bs-stepper-header { padding-right: 1.5rem; }
}

/* Case wizard on phones: six stacked steps pushed the form below the fold. One row of icons, only the active step is named. */
@media (max-width: 767.98px) {
  #Case_Wizard .bs-stepper-header { flex-direction: row; flex-wrap: nowrap; justify-content: space-between; gap: .25rem; padding: .75rem 1rem; overflow-x: auto; }
  #Case_Wizard .bs-stepper-header .line { display: none; }
  #Case_Wizard .bs-stepper-header .step:not(.active) .bs-stepper-label,
  #Case_Wizard .bs-stepper-header .step.active .bs-stepper-subtitle { display: none; }
  #Case_Wizard .bs-stepper-header .step-trigger { padding: .25rem; }
}

/* Touch devices: small icon buttons (delete, add) stay at least 40px so they can be hit. */
@media (pointer: coarse) {
  .btn-icon.btn-sm, .btn.btn-sm { min-height: 40px; }
  .btn-icon.btn-sm { min-width: 40px; }
}

/* Keyboard focus must be visible on custom controls (stepper, pills, theme buttons). */
.step-trigger:focus-visible, .nav-link:focus-visible, .page-link:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--bs-primary); outline-offset: 2px;
}

/* Contrast: Vuexy's info/success/danger text on white or on its pale label tint measured 1.7-3:1. These darker shades reach 4.5:1+. */
.text-info, .bg-label-info, .btn-label-info:not(:hover):not(:focus):not(:active):not(.active) { color: #00758a !important; }
.text-success, .bg-label-success, .btn-label-success:not(:hover):not(:focus):not(:active):not(.active) { color: #137536 !important; }
.text-danger, .bg-label-danger, .btn-label-danger:not(:hover):not(:focus):not(:active):not(.active) { color: #b93334 !important; }
.bg-label-warning, .btn-label-warning:not(:hover):not(:focus):not(:active):not(.active) { color: #9a5a00 !important; }
.bg-label-primary, .btn-label-primary:not(:hover):not(:focus):not(:active):not(.active) { color: #5b4fd6 !important; }
.btn-info { background-color: #007689 !important; border-color: #007689 !important; color: #fff !important; }
.btn-success { background-color: #197c3f !important; border-color: #197c3f !important; color: #fff !important; }
.btn-info:hover, .btn-success:hover { filter: brightness(1.1); }

/* Exam timer stays in view while reading long cases, but only where there is room for it. */
@media (min-width: 768px) { .exam-status { position: sticky; top: 5.5rem; z-index: 4; } }
.alert-success, .alert-success .alert-heading { color: #137536; }
.alert-info, .alert-info .alert-heading { color: #00758a; }
.alert-danger, .alert-danger .alert-heading { color: #b93334; }
.text-muted { color: #6f6b7d !important; } /* Vuexy's #a5a3ae on white is 2.5:1 */

/* no-side-menu pages: navbar spans the same width as the px-0 page content */
@media (min-width: 1200px) {
  .layout-without-menu .layout-navbar.navbar-detached.container-xxl { width: 100% !important; max-width: 1440px; }
}

/* IRANSans for Persian text only (unicode-range: Latin keeps the theme font); opt in with .cc-persian */
@font-face { font-family: IRANSansFa; font-weight: 400; src: url('../fonts/farsi-fonts/woff2/iransansx-regular.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: IRANSansFa; font-weight: 500; src: url('../fonts/farsi-fonts/woff2/iransansx-medium.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: IRANSansFa; font-weight: 700; src: url('../fonts/farsi-fonts/woff2/iransansx-bold.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
.cc-persian, .cc-persian * { font-family: IRANSansFa, "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.cc-persian .ti, .cc-persian [class^="ti-"], .cc-persian [class*=" ti-"] { font-family: "tabler-icons" !important; }

/* Phones/tablets: navbar keeps the same 1rem inset as the page content on all sides */
@media (max-width: 1199.98px) {
  .layout-navbar.navbar-detached,
  .layout-navbar-fixed .layout-navbar.navbar-detached,
  .layout-without-menu .layout-navbar.navbar-detached.container-xxl {
    top: 0 !important;
    margin: 1rem 1rem 0 !important;
    width: calc(100% - 2rem) !important;
    max-width: none;
    min-height: 56px;
    padding: 0 1rem;
    border-radius: .5rem;
  }
  .layout-without-menu .layout-page { padding-top: 78px !important; }
  .content-wrapper > .container-xxl { padding-left: 1rem !important; padding-right: 1rem !important; }
  /* hides content scrolling through the 1rem gap above the fixed navbar */
  .layout-navbar-fixed .layout-page::before {
    content: ""; position: fixed; top: 0; left: 0; right: 0; height: 1rem;
    background: var(--bs-body-bg); z-index: 1074;
  }
  .layout-navbar .navbar-brand img { height: 28px; }
}

/* Grid: a .row directly inside a padding-less container hangs its -gutter margin 12px outside the viewport
   (horizontal scrollbar on desktop). Clip that bleed (no scroll container, so sticky still works); cards stay flush. */
.container-xxl.px-0 { overflow-x: clip; }

/* Narrow columns (category sidebars, exam cards): wrap long labels/badges instead of overflowing. */
.badge.bg-label-primary, .form-check-label { white-space: normal; text-align: start; overflow-wrap: anywhere; }

/* Desktop (menu fixed at >=xl): the layout stops padding the container, so px-0 pages sat flush against the menu and the
   right column ran past the viewport. Restore the page gutter so cards align with the navbar (24px). */
@media (min-width: 1200px) {
  .container-xxl.px-0 { padding-inline: 1.5rem !important; }
  .container-xxl.px-0 .container-xxl.px-0 { padding-inline: 0 !important; } /* nested page container: pad once */
}

/* Login/registration: larger brand logo (the PNG is trimmed to the mark; THEME_LOGIN_LOGO sets an inline height, overridden here). */
.authentication-wrapper .app-brand-logo.demo img { height: auto !important; width: 340px; max-width: 100%; }

/* Number inputs used as counters: no native spinner arrows (the -/+ buttons do the stepping). */
#Exam_Duration::-webkit-outer-spin-button, #Exam_Duration::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Compact chips (exam cards): smaller type/padding so long category lists stay short. */
.badge.cc-chip-sm { font-size: .75rem; padding: .3em .6em; }
details > summary { list-style-position: inside; }
