/**
 * Style
 * 
 * @author Mario Sakamoto <mskamot@gmail.com>
 * @license MIT http://www.opensource.org/licenses/MIT
 * @see https://wtag.com.br/divmon
 * @see https://wtag.com.br/flygon
 */

/*
 * Reset
 */
html,
body,
div,
span,
table,
thead,
tbody,
tfoot,
tr,
th,
td,
form,
label,
input,
textarea,
select,
option,
button,
ul,
li,
h1,
h2,
h3,
h4,
h5,
h6,
p,
img,
a {}

html {}

body {}

div {}

span {}

table {}

thead {}

tbody {}

tfoot {}

tr {}

th {}

td {}

form {}

label {}

input {
  border: solid 1px #dcdcdc;
}

textarea {
  border: solid 1px #dcdcdc;
}

select {
  border: solid 1px #dcdcdc;
}

option {}

button {}

ul {}

ul li {}

ul li:hover {
  text-decoration: underline;
}

ul li:hover ul {
  display: block;
}

ul li ul {
  display: none;
  position: absolute;
  z-index: 1;
  width: 160px;
}

ul li ul li {}

ul li ul li:hover ul {
  display: block !important;
}

ul li ul li ul {
  display: none !important;
  position: absolute;
  z-index: 2;
  margin-left: 160px;
  margin-top: -40px;
}

h1 {}

h2 {}

h3 {}

h4 {}

h5 {}

h6 {}

p {}

img {}

a {}

/**
 * Id
 */
#menu {
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 999;
}

.is-hidden {
  display: none !important;
}

/*
 * Class
 */
.landscape {
  position: relative;
  overflow: hidden;
  height: 192px;
}

.portrait {
  position: relative;
  overflow: hidden;
  height: 320px;
}

.border-top {
  border-top: solid 1px #dcdcdc;
}

.border-bottom {
  border-bottom: solid 1px #dcdcdc;
}

.border {
  border: solid 1px #dcdcdc;
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    background: #26C3DA;
  }
}

.button:active {
  background: #26C3DA;
}

.justify {
  text-align: justify;
}

.full-size {
  width: 100%;
}

.content {
  width: 800px;
  /* overflow: hidden; removido para permitir sticky funcionar */
}

@media only screen and (max-width: 1023px) {

  .content {
    width: 100%;
    /* overflow: hidden removido para permitir sticky funcionar */
  }

}

/*
 * Background
 */
.header-bg {
  background: url("../img/header-bg.jpg") no-repeat center center;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

.benefits-bg {
  background: url("../img/benefits-bg.jpg") no-repeat center center;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

.opacity {
  overflow: hidden;
  background-color: rgba(0, 0, 0, .8);
}

.red-opacity {
  overflow: hidden;
  background-color: rgba(239, 42, 49, .8);
}

.gray-bg {
  background: #f1f2f3;
}

.gray-border {
  border: solid 1px #757575;
}

.blue-bg {
  background: #303f9f;
}

.blue-light-bg {
  background: #26C3DA;
}

.yellow-bg {
  background: #ffb900;
}

.red-bg {
  background: #ee2b2f;
}

.red-border {
  border: solid 1px #ee2b2f;
}

.green-bg {
  background: #1db954;
}

.green-border {
  border: solid 1px #1db954;
}

/*
 * Color
 */
.blue {
  color: #303f9f;
}

.yellow {
  color: #ffb900;
}

.red {
  color: #ee2b2f;
}

.green {
  color: #1db954;
}

.line-break {
  clear: both;
}

.vertical-align-middle {
  vertical-align: middle;
}

.display-inline {
  display: inline-block;
}

.line {
  display: flex;
}

.line .column {
  flex: 1;
}

.line .horizontal-align-right {
  display: flex;
  justify-content: flex-end;
}

.line .horizontal-align-center {
  display: flex;
  justify-content: center;
}

.line .horizontal-align-left {
  display: flex;
  justify-content: flex-start;
}

.line .dv-vertical-align-center {
  display: flex;
  align-items: center;
}

/* --- ESTILO DO FLIP CARD (Versão Mobile Friendly) --- */

.flip-container {
  /* Prefixo obrigatório para alguns Androids antigos/WebViews */
  -webkit-perspective: 100vw;
  perspective: 100vw;
  /* padding: 0px 32px; */
  box-sizing: border-box;
  display: flex;

  width: 100%;
  margin: 20px auto;

  /* Remove o flash azul ao tocar no Android */
  -webkit-tap-highlight-color: transparent;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  /* min-height: 300px; Garanta que tem altura! */
  text-align: center;

  /* Transição suave */
  transition: transform 0.6s;
  -webkit-transition: -webkit-transform 0.6s;

  /* Preserva o 3D */
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;

  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 15px;

  opacity: 0;
  transition: opacity 0.4s ease-in-out, transform 0.6s;
}

.flip-card-inner.ready {
  opacity: 1;
}

/* Estado virado */
.flip-container.flipped .flip-card-inner {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 15px;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 20px !important;
  box-sizing: border-box !important;

  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;

  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
}

.flip-card-front img,
.flip-card-back img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.flip-card-front #ver-resposta,
.flip-card-front #ver-pergunta,
.flip-card-back #ver-resposta,
.flip-card-back #ver-pergunta {
  margin-top: auto;
  user-select: none;
}

.flip-card-front {
  background-color: #303f9f20 !important;
  color: #333;
  border: 2px solid #e0e0e0;

  z-index: 2;
}

.flip-card-back {
  background-color: #23c3da20 !important;
  transform: rotateY(180deg) translate3d(0, 0, 0);
  -webkit-transform: rotateY(180deg) translate3d(0, 0, 0);

  z-index: 1;
}

#comentario {
  text-align: justify;
  padding: 0px 20px;
  line-height: normal;
  display: none;
}

.avaliacao-container {
  display: none;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.avaliacao-container div {
  width: 100%;
  height: 100px;
  margin-bottom: 10px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.avaliacao-container div .avaliacao-check {
  margin: 10px 0px -50px 0px;
  opacity: 0;
  transition: all 0.3s ease-in-out;
}

.avaliacao-container div p {
  line-height: normal;
}

.check-selected {
  opacity: 1 !important;
  transform: translateY(-38px);
  /* transition: all 1s ease-in-out allow-discrete; */
}


.nivel-4 {
  /* Não rever mais */
  background-color: #E0F2F1;
}

.nivel-4 p {
  color: #00695C;
}

.nivel-1 {
  /* Fácil */
  background-color: #B2DFDB;
}

.nivel-1 p {
  color: #004D40;
}

.nivel-2 {
  /* Médio */
  background-color: #FFF176;
}

.nivel-3 {
  /* Difícil */
  background-color: #FFCC80;
}

.nivel-5 {
  /*Super Difícil */
  background-color: #E57373;
}


.selected {
  background: #26C3DA !important;
  scale: 1.07;
  transform: translateY(-0.3rem);
  transition: all 0.3s ease-in-out;
}

.disciplina-status {
  color: #fff;
  padding: 8px 16px;
  box-shadow: 2px 2px 8px black;
  border-radius: 8px;
}

.nivel-2 p {
  color: #000000;
}

.nivel-3 p {
  color: #000000;
}

.nivel-5 p {
  color: #FFFFFF;
}

.selected p {
  color: #fff !important;
  font-weight: bolder;
}

.disciplina-status:hover {
  background-color: #26C3DA;
}

.disciplina-status.ativo {
  background-color: #1db954;
}

.disciplina-status.inativo {
  background-color: #ee2b2f;
}

.assunto-row td:first-child {
  padding-left: 32px;
}

.assunto-label {
  color: #4b4b4b;
  font-size: 0.95em;
}

.assunto-toggle span {
  font-size: 0.9em;
}

.assunto-toggle,
.disciplina-toggle {
  padding: 8px;
  ;
}

.bulk-actions-container {
  display: flex;
  justify-content: space-between;
  position: relative;
  max-width: 1200px;
  margin: auto;
  z-index: 100;
  background-color: #f1f2f3;
  padding: 16px 0;
  gap: 48px;
}

.bulk-actions-container.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  box-shadow: 0 20px 20px rgba(0, 0, 0, 0.3);
  padding: 16px 32px;
  box-sizing: border-box;
}

body.bulk-sticky-active {
  margin-top: 80px;
}

@media only screen and (max-width: 500px) {
  .bulk-actions-container {
    justify-content: center;
  }

  .bulk-actions-container.is-sticky {
    justify-content: center;
  }
}


.bulk-actions-buttons {
  display: flex;
}

.advanced-filters {
  margin-top: 16px;
}

.advanced-filters__summary {
  cursor: pointer;
  font-weight: bold;
  background: #303f9f;
  color: #ffffff;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@media only screen and (min-width: 768px) {
  .advanced-filters__summary {
    margin: 0px 30%;
  }
}

.advanced-filters__content {
  margin-top: 12px;
}

/* ===== Custom Checkbox Styling ===== */
.status-checkbox {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 24px;
  height: 24px;
  border: 2px solid #666;
  border-radius: 4px;
  cursor: pointer;
  background-color: #f5f5f5;
  transition: all 0.3s ease;
  vertical-align: middle;
  position: relative;
  display: inline-block;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}

.status-checkbox:hover {
  border-color: #1db954;
  box-shadow: 0 0 6px rgba(29, 185, 84, 0.4);
}

.status-checkbox:checked {
  background-color: #1db954;
  border-color: #1db954;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px;
}

.status-checkbox:focus {
  outline: 2px solid #1db954;
  outline-offset: 2px;
}

.status-checkbox:active {
  transform: scale(0.95);
}

.status-checkbox:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #ccc;
  background-color: #e8e8e8;
}

.status-checkbox:disabled:checked {
  background-color: #90cfa0;
  border-color: #90cfa0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px;
}

.status-checkbox:disabled:hover {
  box-shadow: none;
  border-color: #ccc;
}


.disciplina-checkbox,
.assunto-checkbox {
  margin: 0 4px;
}

/* Estilos para linhas de disciplinas e assuntos */
tr.disciplina-row {
  background-color: white;
  border-top: 2px solid #f5f5f5;
}

tr.disciplina-row td:first-child {
  cursor: pointer;
}

tr.disciplina-row td:first-child:hover {
  text-decoration: underline;
}

tr.assunto-row {
  background-color: #f5f5f5;
  display: none;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition: max-height 0.2s ease-in-out, opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

tr.assunto-row.visible {
  display: table-row;
  max-height: 200px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#filtros-estudo-link {
  color: #26C3DA;
  font-weight: 900;
}

#filtros-estudo-link:hover {
  text-decoration: underline;
}

.modo-ordenacao-switch {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.modo-ordenacao-link {
  display: flex;
  text-decoration: none;
}

.modo-ordenacao-botao {
  min-width: 190px;
  text-align: center;
  border-radius: 12px;
  border: 2px solid transparent;
  letter-spacing: 0.2px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.22);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.modo-ordenacao-link:hover .modo-ordenacao-botao {
  transform: translateY(-1px);
  box-shadow: 0 12px 18px rgba(0, 0, 0, 0.26);
}

.modo-ordenacao-link:active .modo-ordenacao-botao {
  transform: translateY(0);
}

.modo-ordenacao-switch .modo-ordenacao-botao.blue-bg {
  opacity: 0.8;
  filter: saturate(0.85);
  border-color: rgba(255, 255, 255, 0.3);
}

.modo-ordenacao-switch .modo-ordenacao-botao.green-bg {
  opacity: 1;
  filter: saturate(1.12);
  border-color: #0f8f3f;
  box-shadow: 0 0 0 4px rgba(29, 185, 84, 0.28), 0 12px 22px rgba(9, 64, 32, 0.35);
  transform: translateY(-2px) scale(1.03);
}

@media only screen and (max-width: 560px) {
  .modo-ordenacao-switch {
    gap: 12px;
  }

  .modo-ordenacao-link {
    width: 100%;
  }

  .modo-ordenacao-botao {
    min-width: 0;
    width: 100%;
  }
}

.study-settings-link {
  display: inline-block;
  text-decoration: none;
  margin-top: 6px;
}

.study-settings-button {
  background: linear-gradient(180deg, #2f76dc 0%, #1f5eb8 100%);
  border: 1px solid #164a93;
  min-width: 220px;
  text-align: center;
  letter-spacing: 0.2px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.study-settings-link:hover .study-settings-button {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 10px 18px rgba(23, 73, 140, 0.35);
}

.study-settings-link:active .study-settings-button {
  transform: translateY(0);
  filter: brightness(0.98);
}

@media only screen and (max-width: 560px) {
  .study-settings-link {
    display: flex;
  }

  .study-settings-button {
    min-width: 0;
    width: 100%;
  }
}
/*
 * #txtPergunta e um <div>, nao um <p>: o conteudo vem do editor rico ja
 * embrulhado em <p>, e <p> dentro de <p> e invalido -- o navegador fecha o
 * externo e esvazia o elemento.
 *
 * Mas o reset do divmon2 aplica line-height: 0 a div e so devolve altura de
 * linha para p, li, td, th e h1-h6. div nao esta nessa lista. Sem a regra
 * abaixo, card cujo texto nao venha embrulhado em <p> empilha as linhas
 * umas sobre as outras.
 */
#txtPergunta {
	line-height: 170%;
}
