@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

h1{
    color: #41464d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}


body {
  padding-top: 70px;
  background: #f5f7fa;
  color: #1f2937;
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  background-image: url("../images/backdrop-small-contrast.png");
  background-position: center;
  background-attachment: fixed;
}


/* mobile css hidden */

.mobile-logo,
.hamburger {
    display: none;
}

/* end */

.nav-links {
    display: flex;
    gap: 18px;
    align-items: center;
}


#file-upload.primary-button::file-selector-button {
    background: transparent;
    color: inherit;
    border: none;
    font: inherit;
    cursor: pointer;
    content: "Selecione arquivo";
}

#file-upload.primary-button::-webkit-file-upload-button {
    background: transparent;
    color: inherit;
    border: none;
    font: inherit;
    cursor: pointer;
    content: "Selecione arquivo";
}

.user_profile{
  padding-left: 20px;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 16px 32px;

  background: white;
  border-bottom: 1px solid #e5e7eb;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.top-nav nav {
  display: flex;
  gap: 20px;
 
}

.top-nav a {
  text-decoration: none;
  color: #013f3f;
  font-size: 18px;
  font-weight: 500;
}

.top-nav a:hover {
  color: #82cac5;
}

main {
  max-width: 1000px;
  margin: auto;
  padding: 40px 20px;
}

.hero-carousel {
  margin-top: 90px;
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  z-index: 1;
}

.hero-slide {
  position: absolute;
  max-width: 720px;
  opacity: 0;
  animation: fadeCarousel 30s infinite;
  z-index: 1;
}

.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 6s; }
.hero-slide:nth-child(3) { animation-delay: 12s; }
.hero-slide:nth-child(4) { animation-delay: 18s; }
.hero-slide:nth-child(5) { animation-delay: 24s; }

.hero-slide h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  margin-bottom: 16px;
  color: #486b6b;
  
}

.hero-slide p {
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: #486b6b;
  line-height: 1.6;
}

.hero-carousel,
.hero-carousel-slide-left {
    width: 75%;
    margin-left: auto;
    margin-right: auto;
}

@keyframes fadeCarousel {
  0% { opacity: 0; transform: translateY(10px); }
  5% { opacity: 1; transform: translateY(0); }
  15% { opacity: 1; transform: translateY(0); }
  20% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 0; }
}


p {
  color: #4b5563;
  line-height: 1.6;
}

button,
input,
textarea {
  font-family: inherit;
}

input,
textarea {
  width: 100%;
  padding: 12px;

  border-radius: 10px;
  border: 2px solid #a2fafa;

  background: white;
  color: #111827;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #94a3b8;
}

main {
  display: flex;
  justify-content: center;
  padding: 32px;
}

.logo {
    position:fixed;
    top: 30px;
    left: 20px;
    z-index: 10;
}

.logo img {
    width: 500px;
    height: auto;
}

.card {

  margin: 40px auto;
  max-width: 800px;
  background: white;
  border: 1px solid #a2fafa;
  border-radius: 16px;

  padding: 32px;

  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.card h1 {
  font-size: 28px;
  margin-bottom: 12px;
}

.card p {
  color: #6b7280;
  margin-bottom: 20px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.user-message {
  background: #039191;
  color: #caf7f7;
  padding: 10px 16px;
  border-radius: 12px 12px 2px 12px;
  max-width: 75%;
  margin-left: auto;
  margin-bottom: 12px;
}

.bot-message {
  background: #e8ffff;
  color: #013f3f;
  padding: 12px 16px;
  border: 1px solid #a2fafa;
  border-radius: 12px 12px 12px 2px;
  max-width: 75%;
  margin-bottom: 12px;
}

.question-box {
  background: #f9fafb;

  border: 1px solid #e5e7eb;
  border-radius: 12px;

  padding: 20px; 

  margin-bottom: 24px;
}

.question-box h3 {
  margin-bottom: 12px;
}

.page-title {
  font-size: 24px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 20px;
  margin: 24px 0 16px;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-textarea {
  min-height: 120px;
  border: 2px solid #a2fafa;
}

.answer_type {
  padding: 8px; 
  font-size: 14px; 
  border-radius: 4px; 
  border: 1px solid #a2fafa; 
  background-color: #013f3f;
  color: white; 
}

.answer_type:hover{
  background: #018680;
  color: white;
}


.answer_type option {
    background-color: white;
    color: black;
}

.answer_type option:focus {
    background-color: #018680;
    color: white;
}


.checkbox-container {
  --alignment: center;
  display: flex;
  align-items: var(--alignment);
  margin-left: 20px;
  margin-right: 30px;
}

.primary-lable {
  --alignment: center;
  display: flex;
  align-items: var(--alignment);
  margin-left: 20px;
  margin-right: 30px;
}

.primary-checkbox {
  width: fit-content;
  padding: 10px;
  min-width: 30px;
  min-height: 30px;
  accent-color: #018680;
  color: white;

  cursor: pointer;
  font-weight: 600;
}

.primary-checkbox:focus {
  background: #018680;
}


.primary-button {
  width: fit-content;
  padding: 12px 18px;

  background: #013f3f;
  color: white;

  border: none;
  border-radius: 10px;

  cursor: pointer;
  font-weight: 600;
}

.primary-button:hover {
  background: #018680;
}

.table-wrapper {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  text-align: left;
  padding: 12px;

  color: #013d3d;
  background: #f9fafb;

  border-bottom: 1px solid #e5e7eb;
}

.admin-table td {
  padding: 12px;
  vertical-align: top;

  color: #013d3d;
  border-bottom: 1px solid #e5e7eb;
}

.admin-table tr:hover td {
  background: #026d68;
}

.admin-table input[type="checkbox"] {
  width: auto;
}

.logout-card {
  text-align: center;
}

.narrow-card {
  max-width: 680px;
}

.compact-box {
  margin-bottom: 20px;
}

.question-table {
    width: 100%;
    border-collapse: collapse;
}

.question-table td {
    padding: 6px;
    vertical-align: top;
}

.question-table td:first-child {
    width: 30px;
}

.question-label {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;

  display: inline-block;
  margin-bottom: 10px;
}

.question-text {
  color: #111827;
  line-height: 1.6;
}

.page-title {
  margin-bottom: 24px;
}

.compact-card {
  min-height: auto;
}

.status-message {
  margin-top: 20px;
  color: #2563eb;
  font-weight: 500;
}

.conversation {
  max-width: 400px;
  width: 100%;
  height: 700px;
  overflow-y: auto;
  margin: 0 auto;
  box-sizing: border-box;
  overflow-y: auto;
}

#form {
  margin-top: 20px;
}

#question {
  width: 100%;
  box-sizing: border-box;
}


.subtitle {
  margin-bottom: 24px;
}

.status-message {
  margin-top: 16px;
  color: #2563eb;
}

.question-box {
  margin-top: 16px;

  padding: 14px;

  border-radius: 12px;

  background: #f9fafb;
}

.token-box {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.token-box strong {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-all;
}

.tutorial-page {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.tutorial-card {
    width: 100%;
    max-width: 800px;
    min-width: 0;
    background: #ffffff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    line-height: 1.6;
    box-sizing: border-box;
}

.tutorial-card h1 {
    text-align: center;
    margin-bottom: 24px;
}

.tutorial-card h2 {
    margin-top: 28px;
}

.example-box {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
}

.example-box pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    box-sizing: border-box;
}

.example-box {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    margin: 20px 0;
}

.final-note {
    font-weight: bold;
    margin-top: 28px;
}

@media (max-width: 600px) and (orientation: portrait) {
    .card {
        width: 95%;
        max-width: 95%;
        margin: 16px auto;
        padding: 16px;
        box-sizing: border-box;
    }

    .card input,
    .card textarea,
    .card select,
    .card button {
        width: 100%;
        box-sizing: border-box;
    }

    .card pre {
        overflow-x: auto;
        white-space: pre-wrap;
        word-wrap: break-word;
    }

    .top-nav .logo,
    header .logo {
        display: block;
    }
}

@media (max-width: 768px) {
    .logo {
        display: none;
    }

    .top-nav {
        flex-direction: row;
        align-items: center;
        gap: 0;
        padding: 6px 12px;
        min-height: 48px;
    }

    .mobile-logo {
        display: flex;
        align-items: center;
        width: 100%;
    }

    .mobile-logo > div {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .mobile-logo img {
        width: 130px;
        height: auto;
    }

    .hamburger {
        display: flex;
        width: auto;
        margin-left: auto;
        background: none;
        border: none;
        font-size: 26px;
        color: #013f3f;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        background: #ffffff;
        border: 1px solid #a2fafa;
        border-radius: 12px;
        padding: 8px;
        z-index: 1002;
        flex-direction: column;
        gap: 8px;
        max-height: 680px;
        left: 30%;
        right:30%;
    }
    .nav-links a {
        font-size: 18px;
    }

    body:has(.nav-links.active) .hero-carousel {
    display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .tutorial-page {
        padding: 16px 10px;
    }

    .tutorial-card {
        max-width: 100%;
        padding: 18px;
        border-radius: 10px;
    }

    .tutorial-card h1 {
        font-size: 1.5rem;
    }

    .tutorial-card h2 {
        font-size: 1.25rem;
    }

    .example-box pre {
        font-size: 0.85rem;
    }
}


.popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
}

.popup.active {
    display: flex;
}

.popup-content {
    position: relative;
    width: 90%;
    max-width: 480px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    text-align: center;
}

.popup-close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: none;
    background: none;
    font-size: 28px;
    cursor: pointer;
}

.primary-button-close{
  width: fit-content;
  padding: 10px 10px;

  background: #013f3f;
  color: white;

  border: none;
  border-radius: 10px;

  cursor: pointer;
  font-weight: 600;
  margin-left: 80%;
}


.primary-button-close:hover {
  background: #018680;
}

.evaluation-yes {
    animation: evaluationPulse 1.4s ease-in-out infinite;
}

.evaluation-no{
  animation: evaluationPulse 1.4s ease-in-out infinite;
}

@keyframes evaluationPulse {
    0%, 8%, 16%, 100%  {
        transform: scale(1);
    }

    4%, 12% {
        transform: scale(1.12);
    }
}