/* set to homework popover */

.button-busy {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.button-busy::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  border: 2px solid var(--lightGrayHover);
  border-top-color: var(--gray);
  border-radius: 50%;
  animation: button-spinner 0.8s linear infinite;
}

/* Keyframe animation for spinner rotation */
@keyframes button-spinner {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* content */

/* .content-stripe {
    max-width: 900px;
} */
 /* use generalized content-stripe width classes */

.module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}
.module-header .title-group {
    display: flex;
    align-items: center;
}
.module-icon {
    width: 64px;
    height: 64px;
    margin-right: 0.75rem;
}
.module-icon-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
}
.module-icon-name img {
    width: 30px;
    margin-left: 4px;
}
.module-title {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.2;
}
.debug-link { /* Used in internal version.  */
    font-size: 0.9rem;
    color: #f39c12;
    text-decoration: none;
}

.module-overview {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.module-overview td {
    padding: 10px;
    vertical-align: top;
    border-bottom: 1px dotted #bdc3c7;
}

.module-overview tr:not(.d-none):not(:has(~ tr:not(.d-none))) td {
  border-bottom: none;
}

.module-overview td:first-child {
    font-weight: 600;
    width: 200px;
    background-color: var(--faintGray);
}

.module-overview .small-link {
    font-size: 12px;
}

.module-description {
  margin: 1rem 0;
  padding: 0.8rem;
  border-radius: 3px;
  font-weight: 300;
  font-style: italic;
  font-size: 17px;
}

.module-block {
   width: 100%;
   display: grid;
   grid-template-columns: .5fr 1fr .3fr .1fr;
   grid-template-rows: auto;
   grid-auto-rows: 1fr;
   margin-bottom: 50px;
}

.module-block:last-of-type {
   margin-bottom: 0;
}

.module-block .block-description td {
  font-weight: 300;
  font-style: italic;
  line-height: 1.6;
  padding-top: 5px;
  padding-bottom: 5px;
}

table.module-block tbody, table.module-block tr {display: contents;}
table.module-block tr td {display: flex; gap: 4px; justify-content: flex-start; flex-wrap: wrap; align-items: center;}

table.module-block tr:not(.block-heading):not(.block-description) td:last-of-type {justify-content: flex-end;}
table.module-block .block-heading td, table.module-block .block-description td {grid-column: 1 / -1;}

table.module-block i {
    margin-bottom: 0px;  /* to overwrite texting.css */
}

.module-block img.exercise-icon {
  width: 28px;
}

.module-block img.mastery-shield {
    width: 24px;
}

.icon-switch-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.icon-switch-button .button-image {
  width: 18px;
  height: 18px;
  background-color: var(--black);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.icon-switch-button.selected .button-image {
  background-color: var(--white);
}

.icon-switch-button .icon-list {
  mask-image: url('https://www.umimeto.org/asset/global/img/icons-umime/rozcestnik-cviceni-seznam.svg');
}

.icon-switch-button .icon-previews {
  mask-image: url('https://www.umimeto.org/asset/global/img/icons-umime/visibility-visible.svg');
}

.module-block td {
   min-height: 30px;
   margin-top: 0px;
   padding: 2px;
}
.module-block .block-heading td {
   /* background-color:#ecf0f1; */
   padding: 0;
}

/* shared look of block headings in both the table and the preview listing */
.block-heading-bar {
   font-size: 135%;
   padding-inline: 10px;
   padding-block: 13px;
   background: var(--faintGray);
   border-bottom: 1px solid var(--lightGrayHover);
}

.block-heading-bar .block-title {
   text-transform: uppercase;
   font-weight: 300;
   color: var(--black);
}

.module-block .special-set-type {
   text-transform: uppercase;
   font-weight: 300;
   color: #95a5a6;
}

.module-block .difficulty-level {
   font-weight: 300;
   color: #3498dbc0;
}

p.modules-overview-intro {
   margin-top: 1em;
   margin-bottom: 1.5em;
}

#module-grades-table, #module-content-table, #module-rvp-table  {
  border-collapse: collapse;
  margin: 0 auto;
  border: 1px solid #bdc3c7;
  border-radius: 5px;
}

#module-grades-table td, #module-content-table td, #module-content-table td {
  border-bottom: 1px dotted #bdc3c7;
}

#module-grades-table td, #module-content-table td {
  padding: 4px 8px;
}

#module-rvp-table td { /* This one has lot of white space anyway, so let's make the padding smaller. */
  padding: 0.3em 0.3em;
}

#module-grades-table td, #module-content-table td {
  min-width: 20px;
}

#module-rvp-table td {
  min-width: 150px;
}

#module-grades-table tr.area-row td,  #module-content-table tr.area-row td, #module-rvp-table tr.area-row td {
  background-color: #ecf0f1;
}

#module-grades-table tr:not(.area-row) td:nth-child(even) {
  background-color: #fafafa;
}

.module-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.module-list li {
  margin-top: 0;
  line-height: 1.2em;
}

.en-dash-list {
  list-style: none;
  padding-left: 0.5em;
  padding-top: 0px;
  padding-bottom: 0px;
  margin-top: 0px;
}

.en-dash-list li {
  line-height: 1.2;
}

.en-dash-list li::before {
  content: "–";
  display: inline-block;
  width: 1em; /* reserve space */
  margin-left: -1em; /* pull the dash into left margin */
  margin-right: 0em;
}


/* TK nově responzivita */
@media screen and (max-width: 600px) {
.module-block {width: 100%;}
table.module-overview tbody tr {display: grid; grid-template-columns: 1fr; grid-auto-rows: auto;}
table.module-overview td {margin-top: 0;}
table.module-overview td:first-child {width: 100%;}

/* table.module-block tr:has(td:first-child:not(:empty)):not(:first-of-type) {border-top: 1px solid gray;} */
/* table.module-block tr:last-of-type {border-bottom: 1px solid gray;} */
table.module-block {grid-template-columns: 3fr min-content min-content;}
table.module-block tr > td:first-child:empty{display: none;}
table.module-block tr td:first-of-type{grid-column: span 3;}
table.module-block tbody tr td:nth-child(2){padding-left: 30px;}

#module-content-table tr {display: grid; grid-template-columns: 1fr; grid-auto-rows: auto;}
#module-content-table tr:not([class]) td:first-of-type {border-bottom: 0; padding-bottom: 0;}
#module-content-table tr.area-row td:nth-of-type(2n) {display: none;}

#module-grades-table {
  display: block;
  max-width: 100vw;
  overflow-x: scroll;
}

#module-grades-table tr td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
}

/* pravý okraj pro skrolování, border moc nefungoval kvůli collapse */
#module-grades-table tr td:first-child:before {
  display: block;
  height: 100%;
  width: 1px;
  position: absolute;
  top: 0; bottom: 0; right: 0;
  content: '';
  background: var(--gray);
  z-index: 10;
}

#module-grades-table tr:not(.area-row) td:first-child {
  background: white;
}
}

/* previews with summaries only used at module page */

/* vyřešené PS ztlumíme, aby v modulu vynikly ty zbývající */
.preview-box-png.preview-box-completed {
  opacity: 0.5;
}

.preview-box-png.preview-box-completed:hover {
  opacity: 1;
}

/* souhrn tématu místo png náhledu: zmenšený text useknutý s přechodem do bílé */
.preview-box-png .png-preview-summary{
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  overflow: hidden;
  padding: 5px 10px;
  font-size: 5px;
  line-height: 1.4;
  text-align: left;
}

/* náhled pracovního listu: obálka obrázku, aby se dal useknout stejným přechodem jako souhrn */
.preview-box-png .png-preview-printable{
  display: block;
  position: relative;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

.preview-box-png .png-preview-summary:after,
.preview-box-png .png-preview-printable:after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3em;
  pointer-events: none;
  background-image: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1) 90%);
}

.preview-box-png .png-preview-summary > *:first-child{
  margin-top: 0;
}

.preview-box-png .png-preview-summary img,
.preview-box-png .png-preview-summary div.descflex {
  margin-top: 3px;
  margin-bottom: 3px;
}

.preview-box-png .png-preview-summary img:not([class*="ir-"]),
.preview-box-png .png-preview-summary div.descflex {
  max-width: 100%;
}

.preview-box-png .png-preview-summary div.descflex img {
  max-height: 30px;
}

.preview-box-png .png-preview-summary div.descflex >div>div {
  display: none;
}

.preview-box-png .png-preview-summary p,
.preview-box-png .png-preview-summary ul,
.preview-box-png .png-preview-summary li,
.preview-box-png .png-preview-summary ol{
  margin: 0 0 3px 0;
  font-size: inherit;
  line-height: inherit;
}

.preview-box-png .png-preview-summary ul,
.preview-box-png .png-preview-summary ol{
  padding-left: 18px;
}

.preview-box-png .png-preview-summary h2,
.preview-box-png .png-preview-summary h3,
.preview-box-png .png-preview-summary h4{
  margin: 4px 0 2px 0;
  border-radius: 2px;
  display: inline-flex;
  padding: 1px;
  background-color: var(--lightGray);
  font-size: 7px;
  line-height: 1.3;
}