/* style.css 25*/

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Stiluri generale pentru pagina */
html, body {
  height: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  font-size: 1.05rem;
  background-color: #e0ded6;
  color: #000;
  display: flex;
  flex-direction: column;
}

.site-header {
  background-color: #BBB9B2;
  padding: 2px 2px;
}

main {
  flex: 1; /* Ocupă tot spațiul rămas între header și footer */
}

.container {
  width: 100%;
 /* min-width: 320px; */
  max-width: 1080px;
  margin: 0.3em auto;
  padding: 15px 15px;
  background-color: #F9F8F4;
  color: #000;
  font-family: Arial, sans-serif;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.box {
    background-color: #f3edce;
    padding:1em;
    border:2px solid #ccc;
    border-radius:8px;
    max-width:500px;
    margin: 0 auto;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

table {
    margin: 0 auto;
}
table, th, td {
  border: 1px solid #bbb;
  border-collapse: collapse;
}

th, td {
  padding: 6px 8px;
  text-align: center;
}

/*primele coloane aliniata la stanga sticky*/
td:first-child, th:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 2;
  background: #e7ddb5;
}

th:nth-child(2), td:nth-child(2) {
  position: sticky;
  left: 166px;
  z-index: 2;
  background: #e7ddb5;
}

thead th {
  z-index: 3;
}

/* Titluri si text */
H1 {
  padding: 1em 0 0.8em 0;
  font-size: 1.5rem;
  font-weight: bold;
  color: #A00;
}

H2 {
  padding: 0.8em 0 0.6em 0;
  font-size: 1.3rem;
  font-weight: bold;
}

H3 {
  padding: 0.6em 0 0.4em 0;
  font-size: 1.2rem;
  font-weight: bold;
}

ul {
  padding-left: 2em; /* sau 2.5em, 3em – după preferință */
}

ul li {
  margin-bottom: 0.6em;
}

p {
  margin-bottom: 0.6em;
}

a {
  color: #458100; /* verde natural */
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #A00000; /* bordo pentru interacțiune */
  text-decoration: underline;
}
/* mov vizitat 
a:visited {
  color: #8f258f; 
}
*/

/* Stil general pentru <hr> */
hr {
  border: none;
  height: 2px;
  width: 80%;
  margin: 2em auto;
  background: linear-gradient(
    to right, 
    transparent,      /* stânga */
    #a00000 40%,      /* zona de trecere */
    #a00000 50%,      /* centru  */
    #a00000 60%,      /* zona de trecere */
    transparent       /* dreapta */
  );
  border-radius: 2px;
  opacity: 1;
}

/* Linie punctată */
.hr-dashed {
  border: none;
  border-top: 2px dashed #757164;
  border-radius: 0;
}

/* Linie subțire și discretă */
.hr-thin {
  border: none;
  border-top: 1px solid #bbb9b2;
  margin: 1.5em auto;
  opacity: 0.3;
  width: 80%;
}

/* Linie completă pe toată lățimea */
.hr-full {
  border: none;
  border-top: 2px solid #a00000;
  width: 100%;
  margin: 2em 0;
}

/* Linie scurtă (de exemplu, 40%) */
.hr-short {
  border: none;
  border-top: 2px solid #a00000;
  width: 40%;
  margin: 2em auto;
  border-radius: 2px;
}


.button {
  height: 38px;
  background-color: #f3edce;
  padding: 6px 10px; 
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #000;
  text-align: center;
  display: inline-block;
  font-size: 1.2rem;
  transition: background 0.3s, transform 0.2s;
  text-decoration: none; /* elimină sublinierea */
}

.button:hover {
  background-color: #FFD200;
  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
}

.button:active {
  transform: scale(0.98);
}

.button-primary {
  background-color: #FFD200; /* galben banana */
  color: #000;
  padding: 0.5em 1em;
  margin: 10px;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);
  display: inline-block;
  text-decoration: none;
  transition: transform 0.1s, box-shadow 0.1s;
  cursor: pointer;
}

.button-primary:hover {
  color: #000;
  transform: translateY(-1px);
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.25);
  text-decoration: none;
}

.button-primary:active {
  color: #000;
  transform: scale(0.98);
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);
}


/* Buton logout */
.button.logout {
  color: #A00;
}

.button.logout:hover {
  background-color: #FFD200;
  color: #A00;
  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
}

/* footer */
.site-footer {
  background-color: #e0ded6;
  padding: 2px;
  text-align: center;
}

.site-footer p {
  font-size: 0.7rem;
  color: #757164;
  margin: 0; 
}

/*modal*/
.modal-general {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.modal-content {
  background: #F9F8F4;
  width: 90vw;
  max-width: 1000px;
  height: 90vh;
  padding: 10px;
  border-radius: 10px;
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* controlăm overflow-ul */
}

.modal-manual .container {
  flex-grow: 1;
  overflow-y: auto;
  width: 100%;
  background-color: #F9F8F4;
  padding: 0.5em 1.5em 0.5em 0.5em;
  box-sizing: border-box;
}

.close-btn {
  position: absolute;
  top: 0.2rem;
  right: 1.6rem;
  font-size: 1.3em;
  background: none;
  color: #000;
  border: none;
  cursor: pointer;
  z-index: 10;
}
.close-btn:hover {
  transform: scale(1.1);
}

/* meniu local conversatie */
.context-menu {
  position: absolute;
  background: #F3F2EC;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  z-index: 10000;
  width: 240px;
}
.context-menu input {
  width: 100%;
  padding: 6px;
  margin-bottom: 6px;
  font-size: 0.9em;
}
.context-menu button {
  width: 100%;
  font-size: 0.9em;
  margin-bottom: 5px;
}

/* mobile */
/* modal */
@media (max-width: 600px) {
  .modal-content {
    width: 95vw;
    height: calc(95vh - 50px); /* înălțime mai mică pentru bara de jos*/
    margin-bottom: 60px;        /* loc pentru bara */
    margin-bottom: calc(60px + env(safe-area-inset-bottom));/* zona de siguranta la iOS */
    padding: 10px;
    max-width: none;
  }
  .close-btn {
  top: 0.2rem;
  right: 1.2rem;
  }
}

/* === Cookies + selecție limbă (modal global) === */
#cookie-overlay {
  position: absolute; /* sau relative dacă îl pui în container */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent; /* fără culoare, dar activ */
  z-index: 9998;
  pointer-events: auto;
  cursor: not-allowed;
}

#cookie-modal {
  position: fixed;
  top: 44px;              /* cât headerul */
  bottom: 20px;           /* cât footerul */
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1080px;
  background: #f5f4f3;
  color: #000;
  padding: 1rem;
  z-index: 9999;
  overflow-y: auto;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  text-align: center;
}

  #cookie-modal select {
    /*selectorul de limba*/
    font-size: 1rem;
    padding: 6px 10px;
    margin-top: 2px;
    background: #F9F8F4;
    color: #000;
  }

  #cookie-modal a {
    color: #458100;
    text-decoration: underline;
  }
  
/* 🌐 Selector de limbă personalizat în modal cookie */
.cookie-lang-selector {
  position: relative;
  display: inline-block;
  font-size: 1rem;
  border-radius: 8px;
  font-family: inherit;
  margin: 1em 0;
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);
  width: auto;
}

/* 🔘 Butonul de selecție limbă (toggle) */
.cookie-lang-toggle {
  background: #f9f8f4;
  color: #000;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  min-width: 150px;
  height: 2.25rem;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  line-height: 1;
}

.cookie-lang-toggle:hover {
  background: #FFD200;
}

/* ⬇️ Dropdown-ul listă de limbi + input */
.cookie-lang-dropdown {
  position: absolute;
  top: 100%;
  left: 0; /* ❗ aliniere la stânga */
  z-index: 999;
  padding: 2px 2px 0 2px;
  background: #bbb9b2;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: -4px 4px 20px rgba(0, 0, 0, 0.7);
  width: 100%;
  display: none;
  max-height: 240px;
  overflow-y: auto;
}

/* 🔍 Input de căutare */
#cookieLangSearch {
  width: 100%;
  padding: 6px 10px;
  font-size: 1rem;
  border: none;
  border-bottom: 1px solid #ccc;
  box-sizing: border-box;
  outline: none;
  margin-bottom: 2px;
  background: #fff;
}

/* 🗂 Lista limbilor */
#cookieLangList {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
}

#cookieLangList li {
  padding: 6px 10px;
  cursor: pointer;
  text-align: left;
  background: #f3edce;
  margin-bottom: 2px;
}

#cookieLangList li:hover {
  background: #FFD200;
}

#cookieLangList li.selected {
  background: #FFD200;
  font-weight: bold;
}

#cookieLangList li.disabled {
  opacity: 0.5;
  pointer-events: none;
}


/* ======= navbar.css ======= */

/* Container principal pentru navbar */
.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Logo pe stânga, meniu pe dreapta */
  flex-wrap: wrap;
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
}

/* Logo și titlul din navbar */
.navbar-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: bold;
  color: #000;
  padding-left: 5px;
}

.logo-img {
  height: 32px;
  margin-right: 10px;
  display: block;
}

/* Navbar meniu */

.navbar-menu {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

.navbar-menu a {
  text-decoration: none;
  color: #000;
}

.navbar-menu a:hover {
  color: #000;
  text-decoration: none;
}

/* 🔁 Selector limbă personalizat (înlocuiește <select>) */
.custom-lang-selector {
  position: relative;
  display: inline-block;
  font-size: 1.2rem;
  font-family: inherit;
}

#langSelectorToggle {
  background: #f3edce;
  color: #000;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  min-width: 150px;
  width: auto; 
  line-height: 1;
  height: 2.25rem;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

#langSelectorToggle:hover {
  background: #FFD200;
}

#langDropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 999;
  padding: 2px 2px 0 2px;/* ====2px?*/
  background: #bbb9b2;
  border: 2px solid #bbb9b2;
  border-radius: 4px;
  box-shadow: -4px 4px 20px rgba(0, 0, 0, 0.7);
  width: 100%;
  display: none;
  max-height: 240px;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

/* input de căutare în dropdown */
#langSearchInput {
  width: 100%;
  padding: 6px 10px;
  font-size: 1rem;
  border: none;
  border-bottom: 1px solid #ccc;
  box-sizing: border-box;
  outline: none;
  margin-bottom: 2px;
}

/* lista limbilor */
#langList {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
}

#langList li {
  padding: 6px 10px;
  cursor: pointer;
  text-align: left;
  background: #f3edce;
  margin-bottom: 2px;
}

#langList li:hover {
  background: #FFD200;
}

/* opțional: marcăm limba curentă */
#langList li.selected {
  background: #FFD200;
  font-weight: bold;
}

#langList li.disabled {
  opacity: 0.5;
  pointer-events: none;
  font-style: normal;
}

/* Navbar mobil */
@media (max-width: 768px) {
  /* Pregătim poziționarea absolută pentru meniu */
  .navbar-container {
    position: relative;
  }

  /* Meniul este ascuns inițial și poziționat ca dropdown */
  .navbar-menu {
    display: none;
    position: absolute;
    top: 110%;
    right: 4px;
    flex-direction: column;
    width: 200px;
    padding: 2px;
    border-radius: 4px;
    background-color: #bbb9b2; /* Fundal gri ca si header */
    box-shadow: -4px 4px 20px rgba(0, 0, 0, 0.7);
    z-index: 1000;
    text-align: center;
  }

  /* Clasa aplicată din JS pentru afișarea meniului */
  .navbar-menu.show {
    display: flex;
  }

  /* Butonul hamburger devine vizibil pe mobil */
  .navbar-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    margin-right: 3px;
  }

  /* Stiluri pentru linkurile din meniu pe mobil */
  .navbar-menu a {
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
  }

  /* inaltime buton */
  .button {
    height: 45px;
  }
  
  /* Selector de limba */
  .navbar-menu .lang-form select#navLangSelect {
    width: 100%;
    height: 45px;
  }
  
  /* Lățime completă selector limba personalizat */
    .navbar-menu .custom-lang-selector {
      width: 100%;
      height: 45px;
    }
    
    .navbar-menu .custom-lang-selector #langSelectorToggle {
      width: 100%;
      height: 45px;
    }

  #langDropdown {
    position: fixed;
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 100px;
    max-width: 90vw;
    border-radius: 8px;
    box-shadow: 4px 4px 20px rgba(0,0,0,0.7);
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    z-index: 999;
  }
}

/* Navbar desktop */
@media (min-width: 769px) {
  .navbar-menu {
    display: flex !important;
    position: static;
    box-shadow: none;
    background: none;
    padding: 0;
  }

  .navbar-toggle {
    display: none !important;
  }
}


/* ======= chat.css ======= */

/* Aplică box-sizing global: mai curat, mai previzibil */
*, *::before, *::after {
  box-sizing: border-box;
}
* {
  scrollbar-width: thin; /* scrollbar subțire pentru Firefox */
}
    
button {    /* Evită selectarea textului butoanelor */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
    }
/* Pentru Chrome, Safari, Edge: Setează scrollbar-ul vertical la 6px */
    ::-webkit-scrollbar:vertical {
        width: 33px;
    }

    /* Containerul principal */
    #chat-container {
      display: flex;
      flex-direction: column;
      height: calc(100dvh - 63px); /*100dvh minus header si footer 44+19*/
      max-width: 1080px;
      margin: 0 auto;
      padding: 3px 0px 0px 0px;
      overflow: hidden; /* Evită scroll-ul inutil */
    }
    /* Zona de chat */
    #chat-log {
      flex: 1;
      overflow-y: auto;
      height: auto; /* Îi permite să se adapteze */
        /* min-height: 200px; Evită ca chat-ul să fie prea mic */
      max-height: calc(100vh - 80px); /* Se ajustează dupa de input */
      padding: 8px;
      border: 1px solid #ddd;
      background: #F9F8F4;
      margin-bottom: 3px;/* Intre chat si input */
    }
    /* Wrapper-uri pentru mesaje */
    .message-wrapper {
      display: flex;
      margin: 4px 0;
    }
    .user-wrapper {
      justify-content: flex-end;
    }
    .bot-wrapper {
      justify-content: flex-start;
    }
    /* Baloanele de mesaje */
    .message {
      max-width: 90%;
      padding: 8px 12px;
      border-radius: 12px;
      word-wrap: break-word;
      line-height: 1.3;
      display: inline-block;
    }
    .user-message {
      background-color: #F3F0E7;
      text-align: left;
      margin-left: auto;
    }
    .bot-message {
      background-color: #f3edce;
      text-align: left;
      margin-right: auto;
    }

/* Wrapper pentru input și buton */
#input-area {
  display: flex;
  align-items: flex-end; /* Aliniază la bază */
  width: 100%;
  padding: 0; /* Spațiu în jurul întregii zone de input */
  gap: 3px; /* spațiu între input și buton */
}

/* Caseta de input */
#user-input {
  flex: 1;
  font-size: 1.05rem;
  font-family: Arial, sans-serif;
  min-height: 2.2rem;
  max-height: 12rem;
  padding: 0px 5px; 
  margin: 1px 0; /* aliniat cu butoanele */
  border: 1px solid #ddd;
  resize: none;
  outline: none;
  overflow-y: auto; /* Activ scrollbar (scroll=obligatoriu. auto=la nevoie) */
}
 
textarea:disabled {
  background-color: #f8ddff !important;
  text-align: center;
  cursor: not-allowed;
  opacity: 1;               /* să nu fie gri transparent */
}

/* Când utilizatorul face click în textarea */
#user-input:focus {
  box-shadow: 0 0 5px rgba(187, 185, 178, 0.8);
}

/* Butoane CHAT */
#button-column {
  display: flex;
  flex-direction: row;
}

#button-column button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 2.4rem;            /*latime fixa*/
  height: 2.4rem;           /*inaltime fixa*/
  background-color: #f3edce;
  color: #6c6753;
  border: none;
  padding: 3px 0px 1px 0px;
  font-size: 1.75rem;
  line-height: 2.15rem;  
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.1s, box-shadow 0.1s;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
  margin: 2px;
}

#button-column button:hover {
  background-color: #FFD200;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
}

#button-column button:active {
  transform: scale(0.95); /* Menține poziția la apăsare */
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

    /* Indicatorul de gândire – 3 puncte mici gri, dispuse orizontal, animate vertical (val) */
    .thinking {
      display: inline-block;
    }
    .thinking .dot {
      display: inline-block;
      width: 6px;
      height: 6px;
      margin: 0;
      background-color: #777;
      border-radius: 50%;
      animation: wave 1.2s infinite ease-in-out;
    }
    
    .thinking .dot:nth-child(1) { animation-delay: 0s; }
    .thinking .dot:nth-child(2) { animation-delay: 0.2s; }
    .thinking .dot:nth-child(3) { animation-delay: 0.4s; }
    
    @keyframes wave {
      0%, 60%, 100% { transform: translateY(0); }
      30% { transform: translateY(-5px); }
    }


.message.copied {
  outline: 2px dashed #458100;
  background-color: #f1ffe6;
}

/* Stiluri pentru elementele Markdown din mesajele botului */

.bot-message p {
  margin: 0.4em 0;
}
.bot-message ul,
.bot-message ol {
  margin: 0.4em 0;
  padding-left: 20px;
  list-style-position: inside;
}
.bot-message li {
  margin: 0.2em 0;
  line-height: 1.2;
}
.bot-message ol {
  counter-reset: list-counter;
  list-style: none;
  margin: 0.4em 0;
  padding-left: 0;
}
.bot-message ol > li {
  counter-increment: list-counter;
  margin: 0.2em 0;
  padding-left: 30px;
  position: relative;
  line-height: 1.2;
}
.bot-message ol > li::before {
  content: counter(list-counter) ". ";
  position: absolute;
  left: 0;
  top: 0;
}
/* Clarifică că ul folosește bullets */
.bot-message ul {
  list-style-type: disc;
  padding-left: 20px;
}

/* Liste imbricate: ul în ol sau ul în ul — cerc în loc de disc */
.bot-message ul ul,
.bot-message ol ul {
  list-style-type: circle;
  padding-left: 20px;
}

/* Liste ordonate imbricate: ol în ol sau ol în ul — numerotare resetată */
.bot-message ul ol,
.bot-message ol ol {
  list-style-type: decimal;
  counter-reset: list-counter;
  padding-left: 20px;
}

.bot-message ol ol > li {
  counter-increment: list-counter;
  padding-left: 30px;
  position: relative;
}

.bot-message ol ol > li::before {
  content: counter(list-counter, decimal) ". ";
  counter-increment: list-counter;
  padding-left: 30px;
  position: relative;
}

/* Modal rename */
.modal {
  display: none;
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  background: #F3F2EC;
  padding: clamp(1em, 4vw, 20px);
  border: 1px solid #ccc;
  border-radius: 10px;
  z-index: 9999;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
}
.modal input {
  width: 100%;
  margin: 10px 0;
  padding: 5px;
  font-size: 0.9em;
}
.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Meniu contextual conversatie */
.context-menu-wrapper {
  position: absolute;
  z-index: 10000;
  width: 260px;
  background: #e0ded6;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: -4px -4px 20px 0px rgba(0, 0, 0, 0.7);
  padding: 2px 2px 0 2px;
  display: none;
}

.context-menu-wrapper.show {
  display: block;
}

.context-menu-wrapper button {
  width: 100%;
  font-size: 0.9em;
  margin-bottom: 2px;
  text-align: left;     /* aliniere text la stânga */
  padding-left: 10px;   /* puțin spațiu față de iconiță */

}

/* Toasts generale și de limită */
.toast {
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.7em 1.2em;
  border-radius: 6px;
  z-index: 9999;
  opacity: 0.95;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-width: 90vw;
  font-size: 0.95rem;
  line-height: 1.3em;
  transition: opacity 1.5s cubic-bezier(.4,0,.2,1);
}

.toast-default {
  background: #333;
  color: #fff;
}

.toast-limit { 
  background: #A00000;
  color: #fff;
}


/* Chat mobil */
@media (max-width: 768px) {
  #button-column button {
    padding: 2px 4px;
  }
  
  #user-input {
  margin: 0; /* aliniat cu butoanele */
  }
}

/* paginatia pentru chat la imprimare sau pdf */

/* În mod normal, ascunde subsolul complet */
#print-subsol {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  bottom: -9999px !important; /* Nu-l lăsa să apară în afacerea normală */
}

/* Stiluri aplicate doar la imprimare */
@media print {
  *, *::before, *::after {
    box-sizing: border-box;
  }

  body {
    background: white !important;
    color: black !important;
    font-family: Arial, sans-serif;
    font-size: 12px !important;
    margin: 0;
    padding: 0;
  }

  a {
    color: black !important;
    text-decoration: none;
  }

  hr {
    display: block;
    border: 0;
    height: 1px;
    background: #ccc;
    margin: 6px 0;
    page-break-before: avoid;
    page-break-after: avoid;
  }

  #chat-container,
  #chat-log {
    height: auto !important;
    overflow: visible !important;
  }

  #chat-log {
    padding-bottom: 60px;
  }

  /* Ascunde elementele interactive */
  #input-area,
  #button-column,
  textarea,
  button {
    display: none !important;
  }

  /* Activează subsolul doar la print */
  #print-subsol {
    display: block !important;
    visibility: visible !important;
    margin-top: 40px;
    padding-top: 10px;
    border-top: 1px solid #ccc;
    font-size: 11px;
    color: #555;
    text-align: center;
    background: white;
    page-break-inside: avoid;
  }
}

/* Pe mobil subsolul este ascuns */
@media (max-width: 768px) {
  #print-subsol {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;  /* nici măcar în fluxul de layout */
    bottom: -9999px !important;     /* foarte departe pentru a nu-l vedea */
  }
}
