:root {
  --color-page-background: #f4f4f4;

  --color-green-main: #4caf50; /* El verde principal, se usa por ejemplo para el botón CLEAR y es el color de las teclas presionadas */
  --color-green-main-hover: #45a049;
  --color-green-main-border: #388E3C;
  --color-green-main-highlight: #2ce632;
  --color-green-blackKeys: #095F30; /* El verde más oscuro para las teclas negras y otros usos*/
  --color-green-blackKeys-hover: #084b26;
  --color-green-blackKeys-highlight: #13914c; /* El verde más oscuro para las teclas negras y otros usos*/
  --color-green-strong: #0daf63; /* Un verde más fuerte, se usa por ejemplo para bordes */
  --color-green-soft: #dbffe4; /* Verde muy suave, por ejemplo para el fondo de un botón */
  --color-green-soft-hover: #b9eec2;
  --color-green-footer: #2f6e31;

  --color-purple-main: #2c115f;
  --color-purple-main-hover: #170735;
  --color-purple-strong: #3c0baf;
  --color-purple-secondary: #543d7a;
  --color-purple-light: #a57eff;
  --color-purple-soft-a: #f2ecff;
  --color-purple-soft-b: #ece4fc;
  --color-purple-soft-hover: #dfd2fc;
  --color-purple-footer: #260d53;

  --color-red-strong: #af0d0d;

  --color-white-hover: #e0e0e0;
  --color-white-labels: #eeeeee;

  --color-grey-labels-a: #777777;
  --color-grey-labels-b: #888888;  
  --color-grey-borderButton: #aaaaaa;

  --color-lightgrey-a: #e9e9e9;
  --color-lightgrey-divider: #dadada;
  --color-lightgrey-pre-footer: #dadada;

  --color-darkgrey-actionButton: #3b3b3b; /*El gris para los botones como PlayChord, Mute, y otros, que usan MaterialIcons*/
  --color-darkgrey-labels-a: #333333; /* El gris para los textos */
  --color-darkgrey-labels-b: #222222; /* El gris para otros textos */  
}

html {
  overflow-x: hidden!important;
}

.unselectable {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

@font-face {
  font-family: 'custom-sriracha';
  src: url('../../_assets/fonts//sriracha/sriracha-regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

.divider {
  width: 80%;
  height: 2px;
  background-color: var(--color-lightgrey-divider);
  margin: 10px 0;
}

.divider-vertical {
  width: 1px;
  background-color: var(--color-lightgrey-divider);
  margin: 10px;
}

.spacer {
  flex-grow: 1;
}

.background-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Coloca el SVG detrás del contenido */
}

body {
  font-family: "Poppins", serif;
  /*display: flex;*/
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  background-color: var(--color-page-background);
}

button {
  font-family: "Poppins", serif;
}

/* ---------- COMIENZA KEY SIGNATURES ------ */

.titles-texts {
  display: flex;
  flex-direction: column;
  color: var(--color-darkgrey-labels-b);
  margin-left: 128px;
  margin-top: 32px;
  margin-bottom: 64px;
}

.title {
  display: flex;
  flex-direction: row;
  font-size: 40px;
  font-weight: bold;
  flex-wrap: wrap;
}

.title-keyword {
  color: var(--color-green-main);
  margin-right: 10px;
  margin-bottom: -8px; /* Esto sirve para cuando el titulo ocupa 2 lineas */
}

#txtTitle12 { /* etiqueta obsoleta */
  color: var(--color-green-main);
}

.container-main {
  margin-left: 128px;
  font-family: "Poppins", serif;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  width: 85%;
}

.mainColumn {
  flex: 1;
  flex-grow: 1;
}

.container-main-left {
  display: flex;
  flex-direction: row;
}

.container-left-column {
  padding: 16px;
  display: flex;
  flex-direction: column;
  margin-left: 10px;
  width: 280px;
}

.image-container {
  /*width: 300px;*/
  height: 500px;
  display: flex;
/*  justify-content: center;*/
 /* align-items: center;*/
}

.image-container img {
  height: 100%;
  -webkit-filter: invert(1);
  filter: invert(1);
}

.cst-selector-main {
  display: flex;

  background-color: rgb(255, 255, 255);
  border: 2px solid var(--color-lightgrey-divider);
  border-radius: 10px;
  padding: 10px;
  padding-left: 20px;
  width: 80%;

  font-size: 16px;
  font-weight: 500;
  position: relative;
}

.cst-mainBox {
  display: flex;
  width: 100%;
  position: relative;
  cursor: pointer;
}

.cst-selector-dropdown {
  position: absolute;
  flex-direction: column;
  
  margin-top: 40px;
  display: none;

  background-color: rgb(255, 255, 255);
  border: 2px solid var(--color-lightgrey-divider);
  border-radius: 10px;
  padding: 4px 0px 4px 0px;
  /*padding-left: 20px;*/
  left: 0;
  width: fit-content;
  z-index: 3;
}

.cst-row {
  display: flex;
  flex-direction: row;
}

.cst-column {
  display: flex;
  flex-direction: column;
  width: 222px;
}

.cst-option {
  padding: 6px 0 6px 16px;
  margin: 4px 4px 4px 4px;
  font-size: 14px;
  /*background-color: var(--color-green-soft-hover);*/
  border-radius: 8px;
  cursor: pointer;
  color: var(--color-darkgrey-labels-b);
}

.cst-option:hover {
  background-color: var(--color-white-hover);
}

.cst-option.selected {
  background-color: var(--color-purple-soft-hover);
  color: var(--color-purple-main);
}

.cst-option.selected:hover {
  background-color: var(--color-purple-soft-b);
}


.selector-main {
  display: flex;
  flex-direction: row;

  justify-content: center;
  align-items: center;
  cursor: pointer;
  margin-top: 10px;
  padding: 10px;
}

select {
  font-family: "Poppins", serif;
}

.key-selector {
  font-size: 20px;
  /*border: 2px solid #ccc;*/
  border-radius: 5px;
  background-color: transparent;
  border: none;
  color: #333;
  font-weight: 600;
  text-align: start;
  appearance: none; /* Elimina el estilo predeterminado en algunos navegadores */
  cursor: pointer;
}

.key-selector:focus {
  outline: none;
  border-color: #4CAF50;
}

.key-selector option {
  background-color: #fff;
  font-size: 16px;
  color: #333;
}

.sf-toggle-buttons {
  display: flex;
  margin-top: 16px;
  width: 85px;
  /*gap: 10px; Espaciado entre los botones */
}

.sf-toggle-btn {
  font-family: 'Arial', sans-serif;
  border-top: 2px solid var(--color-grey-borderButton);
  border-bottom: 2px solid var(--color-grey-borderButton);
  background-color: var(--color-page-background);
  color: var(--color-grey-labels-a);
  padding: 12px 26px; 
  font-size: 16px;
  cursor: pointer;
}

#sharpButton {
  border-left: 2px solid var(--color-grey-borderButton);
  border-right: 0px solid;
  /*border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;*/
  border-style: solid;
}

#flatButton {
  border-right: 2px solid var(--color-grey-borderButton);
  border-left: 0px solid;
  /*border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;*/
}

#sharpButton.active {
  border-right: 2px solid;
  border-color: var(--color-green-strong);
}

#flatButton.active {
  border-left: 2px solid;
  border-color: var(--color-green-strong);
}

.sf-toggle-btn.active {
  background-color: var(--color-green-soft); /* Verde para el botón activo */
  color: var(--color-green-strong);
  font-weight: bold;
}

.sf-toggle-btn:hover {
  background-color: var(--color-white-hover); /* Color de fondo al pasar el mouse */
}

.sf-toggle-btn.active:hover {
  background-color: var(--color-green-soft-hover); /* Color de fondo al pasar el mouse */
}

.container-addrevbuttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
  margin-bottom: 16px;
}

.control-btn {
  /*background-color: #4CAF50;*/
  /*background-color: var(--color-purple-main);*/
  background-color: transparent;
  color: var(--color-purple-main);
  font-family: "Poppins", serif;
  font-weight: 500;
  border: none;
  height: fit-content;
  width: fit-content;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
  align-items: start;
  justify-content: start;
  text-align: start;
  transition: background-color 0.3s ease;
}

.control-btn:hover {
  /*background-color: var(--color-purple-main-hover);*/
  color: var(--color-green-blackKeys);
}

.container-secondary {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

/* styles.css */
.toggle-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.toggle-btn {
  background-color: #f4f4f9;
  color: #333;
  border: 2px solid #ccc;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.toggle-btn.active {
  background-color: #4CAF50;
  color: white;
}

.toggle-btn:hover {
  background-color: #45a049;
}

.accidentals-text {
  margin-top: 16px;
  font-weight: 500;
}
  
.pitches-text {
  margin-top: 0px;
  font-size: 20px;
  font-weight: 700;
}

.pitches-notes {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 400;
}


.piano-mini {
  display: flex;
  position: relative;
}

.cmr-relative-piano {
  display: flex;
  position: relative;
}

.key {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
}

.piano-mini .key {
  height: 70px;
}

.cmr-relative-piano .key {
  height: 88px;
}

.key.white {
  position: relative;
  background-color: white;
  border: 1px solid var(--color-darkgrey-labels-b);
  z-index: 1;
}

.piano-mini .key.white {
  width: 16px;
}

.cmr-relative-piano .key.white {
  width: 22px;
}

.key.white:hover {
  background-color: var(--color-white-hover);
}

.key.black {
  background-color: black;
  z-index: 2;
  position: relative;
  border-bottom-right-radius: 25px;
  border-bottom-left-radius: 25px;
}

.piano-mini .key.black {
  width: 12px;
  height: 48px;
  margin-left: -6px;
  margin-right: -6px;
}

.cmr-relative-piano .key.black {
  width: 14px;
  height: 62px;
  margin-left: -7px;
  margin-right: -7px;
}

.key.white.active {
  background-color: var(--color-green-main) !important;
}

.key.white.active:hover {
  background-color: var(--color-green-main-hover) !important;
}

.key.black.active {
  background-color: var(--color-green-blackKeys) !important;
}

.key.black.active:hover {
  background-color: var(--color-green-blackKeys-hover) !important;
}

.key.white.active.highlight {
  background-color: var(--color-green-main-highlight) !important; /* Amarillo para teclas blancas */
  transition: transform 0.2s ease;
  transform: scale(1.04);
}

.key.black.active.highlight {
  background-color: var(--color-green-blackKeys-highlight) !important; /* Naranja para teclas negras */
  transition: transform 0.2s ease;
  transform: scale(1.04);
}

.note-label {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-weight: bold;
  color: var(--color-darkgrey-labels-b);
}

.piano-mini .note-label {
  font-size: 10px;
}

.cmr-relative-piano .note-label {
  font-size: 12px;
}

.note-label-black {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-white-labels);
}

.container-main-right {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: flex-start;
  align-items: flex-start;
  margin-left: 64px;
}

/*.container-main,
.container-main-right,
.container-main-left {
  border: 1px dashed red;
}*/

.cmr-relative {
  font-size: 18px;
}

.cmr-relative.minor {
  margin-top: 48px;
}

.cmr-relative-chord {
  margin-left: 2px;
  color: var(--color-purple-main);
  font-weight: 600;
}

.container-main-texts {
  display: flex;
  flex-direction: column;
  text-align: justify;
  min-width: 450px;
  max-width: 90%;
  margin-top: 16px;
}
/*
.container-main-texts.down {
  margin-right: 16px;
  width: 90%;
  margin-top: 32px;
  order: 3;
}  */

.cmt-title {
  margin-left: 64px;
  color: var(--color-purple-main);
  font-size: 22px;
  font-weight: 700;
}

.cmt-description {
  width: 100%;
  margin-left: 24px;
  color: var(--color-darkgrey-labels-b);
  font-size: 18px;
  font-weight: 400;
}

.cmt-txtprimary {
  color: var(--color-green-main);
}

.cmt-txtsecondary {
  color: var(--color-purple-strong);
}

/* --------------- EMPIEZA EL FOOTER --------------- */

/* ------------ MOBILE SECTION ------------ */

@media (hover: none) {
  .key:hover {
    background-color: inherit; /* O el color por defecto */
  }
}

/* Responsivo para móviles */
@media (max-width: 767px) {
  .titles-texts {
    margin-left: 24px;
    margin-top: 96px;
    width: 85%;
  }

  .title {
    font-size: 30px;
  }

  .subtitle {
    font-size: 18px;
  }

  .container-main {
    margin: 0;
    margin-top: 32px;
    position: relative;
  }

  .container-left-column {
    width: 280px;
    margin-left: -16px;
    margin-top: 6px;
  }

  .image-container {
    height: 360px;
  }

  .cst-selector-main {
    margin: 0;
    padding: 10px 0;
    position: absolute;
    margin-top: -72px;

    padding-left: 20px;
    padding-right: 10px;
    width: 50vw;
    left: 50vw;

    /* El transform es para centrar */
    /* Los 15px es porque suma 20+10 de los paddings y divide 30 a la mitad */
    transform: translateX(calc(-25vw - 15px));
  }

  .cst-selector-dropdown {
    overflow-y: scroll;
    height: 260px;
    padding-right: 10px;
  }

  .divider-vertical {
    display: none;
  }

  .cst-row {
    display: flex;
    flex-direction: column;
  }

  .sf-toggle-buttons {
    margin: 0;
  }

  .container-addrevbuttons {
    margin: 0;
    margin-top: 16px;
  }

  .container-left-column .divider {
    margin: 0;
    margin-top: 8px;
  }

  .accidentals-text {
    margin: 0;
    margin-top: 6px;
  }

  .pitches-text {
    margin: 0;
  }

  .pitches-notes {
    margin-top: 0;
    max-width: 80%;
  }

  .piano-mini .key {
    height: 64px;
  }

  .piano-mini .key.white {
    width: 14px;
  }

  .piano-mini .key.black {
    width: 10px;
    height: 42px;
    margin-left: -5px;
    margin-right: -5px;
  }

  .container-main-right {
    display: flex;
    position: relative;
    margin: 0;
    margin-left: 32px;
    margin-top: 32px;
    margin-bottom: 16px;
  }

  .cmr-relative.minor {
    margin-top: 32px;
  }

  .container-main-texts {
    min-width: 100%;
  }
}


/* ------------- EMPIEZA MOBILE EN LANDSCAPE ------------- */

/* Los celulares suelen tener pointer: coarse,
   mientras que las computadoras generalmente
   usan pointer: fine. */

@media (orientation: landscape) and (pointer: coarse) {
  /* Estilos específicos para móviles en modo horizontal */

  .container-main {
    margin-left: 0;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: 85%;
  }

  .container-main-right {
    margin-top: 48px;
    margin-bottom: 32px;
    width: 100%;
    justify-content: center;
    align-items: center;
  }
}

/* iPad */
@media (min-width: 767px) and (orientation: portrait) and (pointer: coarse) {
  /* Estilos específicos para iPads y Tablets */
  
  .container-main-right {
    margin-top: 48px;
    margin-bottom: 32px;
    width: 100%;
  }

  .container-main-texts {
    margin-top: 32px;
    min-width: 100%;
    margin-left: -100px;
  }
}