/* styles.css */

html,
body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  min-height: 100%;
  margin: 0;
  background: linear-gradient(to top, #000 10%, #222 90%);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 20px;
  padding: 10px;
}
.box-value {
  font-size: 150%;
}
.status-value {
  font-size: 28px;
  font-weight: medium;
}
.status {
  font-weight: 100;
}
h1 {
  text-align: center;
  font-weight: lighter;
  font-size: 2rem;
  margin-bottom: 10px;
}

.video-container {
  position: relative;
  width: 80%;
  max-width: 480px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
}

video,
canvas {
  width: 100%;
  height: auto;
  max-width: 480px;
  border-radius: 16px;
}

.info-box {
  width: 90%;
  margin-top: 10px;
  border-radius: 10px;
  padding: 4px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.grid-container {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 600px;
  margin-top: 10px;
  text-align: center;
}

.emotion-box-name {
  font-weight: lighter;
  font-size: 100%;
}

.grid-1x3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2x3 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, auto);
}

.box {
  background: rgba(255, 255, 255, 0.2);
  font-weight: lighter;
  padding: 10px;
  border-radius: 10px;
  word-wrap: break-word;
  overflow: hidden;
}

.focus-box {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-color: #a1de9e;
}
.cellphone-box {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-color: #82eaff;
}
.writing-box {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-color: #f9adff;
}
.first-emotion-box {
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.1) 50%,
    #800080 100%
  );
}
.second-emotion-box {
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.1) 50%,
    #008000 100%
  );
}
.third-emotion-box {
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.1) 50%,
    #007ba7 100%
  );
}
.fourth-emotion-box {
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.1) 50%,
    #808080 100%
  );
}
.fifth-emotion-box {
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.1) 50%,
    #ff4500 100%
  );
}
.sixt-emotion-box {
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.1) 50%,
    #ff1493 100%
  );
}
.emotional-spectrum-title,
.attention-level-title {
  margin-top: 20px;
  font-weight: lighter;
}

@media (max-width: 768px) {
  .grid-1x3,
  .grid-2x3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .grid-1x3,
  .grid-2x3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .emotion-box-name {
    font-weight: lighter;
    font-size: 100%;
  }
  video,
  canvas {
    width: 50%;
    height: 50%;
    border-radius: 16px;
  }
  .status-value {
    font-size: 20px;
    font-weight: medium;
  }
}
.cicero-logo {
  margin-bottom: 10px;
}

/* ---- Sovrascrivi queste regole esistenti ---- */
/* pannello nascosto */
.slide-panel {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);   /* centrato orizzontalmente */
  width: 80%;                     /* come video-container */
  max-width: 480px;               /* idem */
  max-height: 0;                  /* altezza zero quando nascosto */
  overflow: hidden;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  transition: max-height 0.3s ease-out;
  z-index: 999;
  border-radius: 10px;            /* se vuoi arrotondare i bordi */
}


/* quando aperto */
.slide-panel.open {
  max-height: 80vh;               /* fino all’80% dell’altezza finestra */
  overflow-y: auto;               /* abilita lo scroll verticale */
  transition: max-height 0.3s ease-in;
}

/* facoltativo: un po’ di padding extra per fare spazio allo scrollbar */
.slide-panel .panel-content {
  padding: 1em;
  box-sizing: border-box;
}

/* rende gli input full-width e separati */
#config-form label {
  display: block;
  margin: 0.5em 0;
}

#config-form input[type="text"],
#config-form input[type="number"],
#config-form select {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.2em;
}

.form-buttons {
  margin-top: 1em;
  text-align: right;
}

.form-buttons button {
  margin-left: 0.5em;
}

.config-field {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.config-field legend {
  font-weight: 700;
  padding: 0 0.5rem;
}

.config-field input[type="text"],
.config-field input[type="number"] {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.25rem;
  box-sizing: border-box;
}

.config-field label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.config-field input[type="checkbox"] {
  margin-right: 0.5rem;
}

.url-with-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.url-with-icon a#open-sheet-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: black;
  color: white;
  font-size: 1.2em;
  width: 2em;
  height: 2em;
  text-decoration: none;
  border-radius: 4px;
  flex-shrink: 0;
  cursor: pointer;
}

.url-with-icon input {
  flex: 1;
  padding: 0.5rem;
  box-sizing: border-box;
}

.open-label {
  margin-left: 0.5em;
  font-size: 0.85em;
  color: #555;
}

/* style.css */
.form-buttons {
  display: flex;
  justify-content: space-between;
}
.form-buttons button {
  width: 45%;
  border-radius: 8px;
  padding: 0.5em;
}
.save-message {
  margin-top: 0.5em;
  font-size: 0.9em;
  font-weight: bold;
}
