:root {
	font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
	line-height: 1.5;
	font-weight: 400;
    font-size: 2em !important;

	color: #222;
	background-color: #ffffff;

	font-synthesis: none;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
}

#app {
	display: flex;
	flex-direction: column; 
}

header {
	display: flex;
	justify-content: center; 
    position: fixed;
    top: 0; 
    max-height: 100%;
    overflow-y: auto;
}

header nav {
	display: flex;
}

header a {
	color: #fff;
	padding: 5px 13px;
	text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.3s;
}

header a.active {
	background-color: #0005;
}

header a:hover {
	background-color: #0008;
}
 

@media (max-width: 639px) {
	main {
		margin: 2rem;
	}
}

@media (prefers-color-scheme: dark) {
	:root {
		color: #ccc;
		background-color: #1a1a1a;
	}
}

div.numbered-children {
    counter-reset: child-index; /* Initialize the counter */
  }
  div.numbered-children > *
  {
    position: relative;
    display: inline-block;
  }
  div.numbered-children > *:before {
    counter-increment: child-index; /* Increment counter for each child */
    content: counter(child-index) ; /* Display the counter value */
    position:absolute;
    top:0;
    z-index: 999;
    left:0;
    background: #ccc;
    color:#666;
    font-weight: bold;
    border-radius: 50px;
    padding: 3px 10px;
    font-size: .6em;
  }

  div.numbered-children > div:first-child {
    grid-column: span 2; 
  }


.thumbnails {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    cursor: move;
    z-index: 1;
} 

.thumbnails img {
    border: 3px solid transparent;
}

 

.menu a { 
    display: inline;
    box-shadow: 1px 3px rgba(0,0,0,0.3); 
    white-space: nowrap;;
    background-color: #444;
    border-radius: 20px;
}
.menu a > i {
    display: inline-block;  
}
.menu > * > * {
    display: inline-block;
}

.menu > .add { grid-area: add;}
.menu > .open { grid-area: open;}
.menu > .save { grid-area: save;}
.menu > .record { grid-area: record;}
.menu > .context { 
    grid-area: context; 
    background-color: transparent; 
}
.menu > .context a {
    display: block;
    padding-top: 10px;
    padding-bottom: 10px; 
    margin-top: 2px; 
    background-color: rgba(255,255,255,0.4);
}
.menu > .context a:hover {
    background-color: white;
    color: #333;
}
 
:root {
    --recording-opacity: 0.3;
  }

.recording .thumbnails ,
.recording .leyenda,
.recording .add ,
.recording .open ,
.recording .context,
.recording .save { 
    opacity: var(--recording-opacity); 
    pointer-events: none;
}

.menu > .context a.delete {
    color:red !important;
}
.menu > .context a.delete:hover {
    background-color: red;
    color:white !important;
}
.context a.setImg:hover {
    background-color: white !important;
    color: black !important;
}

@keyframes pulseSelection {
    0% {
      border-color: red; 
    }
    50% {
      border-color: transparent; 
    }
    100% {
      border-color: red; 
    }
  }

.record-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    border-radius: 40px;
    border: 15px solid transparent;
    background-color: red;
}
.record-button > i {
    font-size: 16em;;
}
.recording .record-button {
    background-color: black;
    animation: pulseSelection 0.5s ease-in-out infinite ; 
}

.leyenda {
    position: fixed;
    z-index: 9999;
    top: 0;
    right: 0;
    text-align: right;
    color: #666;
    padding: 20px;
    font-size: .8em;
    background-color: white;;
    border-radius: 10px;
}
.leyenda a { 
    text-decoration: underline;
}
.leyenda a:hover {
    background-color: blue;
    color: white;
}



.centeredMenu {
    position: fixed;
    width: 100vw;
    height: 100vh;
    left: 0px;
    display: flex; 
    justify-content: center;
    align-items: center;
    gap: 12px; 
}

.rightTopMenu {
    position: fixed;
    width: 100vw;
    right: 10px;
    top: 10px;
    display: flex; 
    justify-content: right;
    gap: 12px; 
    z-index: -1;
}

.contextualPageMenu {
    animation: pulseSelection 0.5s ease-in-out infinite ; 
    position: fixed;
    top: 50px;
    z-index: 100;
    display: flex; 
    flex-direction: column;
    gap: 5px; 
    align-content: flex-start;
    flex-wrap: wrap; 
    border: 3px solid red;
    padding: 5px;
    border-radius: 10px;
    margin-left: 20px;
}
.contextualPageMenu a {
    background-color: #eee;
    padding: 5px 20px;
    color:#444;
    border-radius: 5px;
    text-align: center;
}
.contextualPageMenu a > i {
    margin: 0px;
    transform: scale(1.3);
    display: inline-block; 
    margin: 5px;
}
.contextualPageMenu a:hover {
    background-color: black;
    color:white
}
.contextualPageMenu img {
    border: 5px dashed white;
    animation: pulseSelection 0.5s ease-in-out infinite;
}

.recording .thumbnails,
.recording .contextualPageMenu,
.recording .rightTopMenu
{
    display: none;
}