/* Reset box-sizing */
* {
  box-sizing: border-box;
}

/* Estilos para o Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    background-color: white;
    padding: 10px;
    z-index: 10;
    border-bottom: 1px solid #dee2e6;
}

.modal-title {
    font-size: 1.5em;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.modal-close {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    font-size: 1.8em;
    cursor: pointer;
    color: #666;
    padding: 5px;
    transition: all 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background-color: #e9ecef;
    color: #333;
}

.modal-content {
    margin-bottom: 20px;
}

.modal-section {
    margin-bottom: 30px;
}

.modal-section-title {
    font-size: 1.3em;
    font-weight: 500;
    color: #444;
    margin-bottom: 15px;
}

.explicacao-texto {
    font-size: 1.1em;
    line-height: 1.6;
}

/* Botão Entenda */
.btn-entenda {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s;
}

.btn-entenda:hover {
    background-color: #45a049;
}

/* Estilos das Perguntas e Respostas */
.pergunta {
  margin-bottom: 25px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.pergunta strong {
  display: block;
  margin-bottom: 15px;
  color: #2c3e50;
  font-size: 1.1em;
}

.respostas {
  display: flex;
  gap: 10px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.respostas img {
  width: 50px;
  height: 50px;
  border-radius: 25px;
  cursor: pointer;
  transition: transform 0.2s;
  border: 2px solid #ddd;
}

.respostas img:hover {
  transform: scale(1.1);
  border-color: #4CAF50;
}

.resposta-texto {
  display: none;
  margin-top: 15px;
  padding: 15px;
  background-color: white;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  font-size: 1em;
  line-height: 1.5;
}

.resposta-texto hr {
  margin: 15px 0;
  border: none;
  border-top: 1px solid #ddd;
}

/* Ajustes para responsividade */
@media (max-width: 768px) {
    .modal {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        padding: 0;
        top: 0;
        left: 0;
        transform: none;
        margin: 0;
    }

    .modal-content {
        padding: 15px;
        padding-bottom: 80px; /* Espaço para os botões fixos */
    }

    .modal-header {
        padding: 15px;
        margin: 0;
        width: 100%;
    }

    .professores {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0;
    }

    .professor span {
        font-size: 0.8em;
    }

    /* Botões fixos na parte inferior */
    .botoes {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 10px;
        margin: 0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        display: flex;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
    }

    .botoes button {
        flex: 1;
        margin: 0;
        font-size: 1.2em;
        padding: 12px;
        min-width: 0;
    }

    /* Ajuste para o conteúdo não ficar atrás dos botões fixos */
    .container {
        padding-bottom: 70px;
    }
}

/* Botões de Perguntas */
.pergunta-btn {
  display: block;
  width: 100%;
  padding: 15px;
  margin-bottom: 10px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  text-align: left;
  font-size: 1.1em;
  color: #2c3e50;
  cursor: pointer;
  transition: all 0.2s;
}

.pergunta-btn:hover {
  background-color: #e9ecef;
  border-color: #4CAF50;
}

/* Modal de Respostas */
.modal-resposta .quem-texto {
  font-size: 1.2em;
  color: #2c3e50;
  margin-bottom: 20px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.professores {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.professor {
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.professor:hover {
  transform: scale(1.05);
}

.professor img {
  width: 60px;
  height: 60px;
  border-radius: 30px;
  border: 2px solid #ddd;
  margin-bottom: 5px;
}

.professor span {
  display: block;
  font-size: 0.85em;
  color: #666;
  text-transform: capitalize;
}

/* Estilo Chat */
.respostas-container {
  margin-top: 20px;
}

.resposta-chat {
  display: none;
  margin-top: 20px;
  display: flex;
  gap: 15px;
}

.chat-professor img {
  width: 50px;
  height: 50px;
  border-radius: 25px;
}

.chat-texto {
  flex: 1;
  background-color: #e9ecef;
  padding: 15px;
  border-radius: 12px;
  position: relative;
  font-size: 1.1em;
  line-height: 1.5;
}

.chat-texto::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 15px;
  border-style: solid;
  border-width: 10px 10px 10px 0;
  border-color: transparent #e9ecef transparent transparent;
}

.explicacao-professora {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #dee2e6;
}

.sem-respostas {
  text-align: center;
  padding: 30px;
  color: #666;
  font-style: italic;
  background-color: #f8f9fa;
  border-radius: 8px;
  margin: 20px 0;
} 