:root {
    --icon-color: #777;
    --icon-disabled-color: #ccc;
    --icon-remove-color: #c1272d;
}

.icon-container:hover {
    --icon-color: #555;
}

html {
    font-size: 62.5%;
}

body {
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.4rem;
    margin: 0px;
    padding: 0px;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
}


/*#region Disable iOS button/anchor behavior*/

button,
a {
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
    pointer-events: all;
}


/*disabled double-tap to zoom on iOS*/

html,
body,
div {
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation!important;
    -webkit-touch-action: manipulation!important;
    pointer-events: none;
}


/*#endregion*/


/*Prevent Scrolling*/


/* body, html { position: fixed; } */

.welcome-screen,
.unsupported-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
}

.welcome-screen,
.state-ready .recording-screen,
.state-unsupported .unsupported-screen {
    opacity: 1.0;
    pointer-events: all;
}

.recording-screen,
.unsupported-screen,
.state-unsupported .welcome-screen,
.state-ready .welcome-screen {
    opacity: 0.0;
    pointer-events: none;
}

.unsupported-screen .content {
    max-width: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.2);
    margin: 10px;
}

.unsupported-screen span {
    padding: 0px;
    text-align: center;
}

.unsupported-screen .separator {
    margin-top: 20px;
    border-bottom: solid 1px rgba(0, 0, 0, 0.2);
    align-self: stretch;
}

.unsupported-screen ul {
    padding-left: 15px;
}

.unsupported-screen ul>li {
    margin-bottom: 10px;
}

.welcome-screen h1 {
    letter-spacing: -2px;
}

.welcome-screen {
    will-change: contents;
}

.welcome-screen .logo {
    margin-bottom: 10px;
}

.state-loading .welcome-screen .logo {
    transform: scale3d(0, 0, 0);
    opacity: 0.0;
    transition: transform linear 7.5s, opacity linear 1.5s;
}

.state-loading .welcome-screen span {
    opacity: 0.0;
    transform: translateY(50px);
    transition: opacity linear 0.5s, transform ease-in 0.5s;
}

.volume-indicator {
    position: absolute;
    display: block;
    width: 100px;
    height: 100px;
    border-radius: 100%;
    top: 50%;
    left: 50%;
    margin-top: -50px;
    margin-left: -50px;
    background-color: rgba(151, 1, 1, 0.7);
    transform: scale(1.0);
}

.testcanvas {
    display: block;
    background-color: #ccc;
    position: relative;
    border: solid 4px black;
}

.recording-screen {
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    justify-content: stretch;
    align-items: stretch;
}

.recording-testpanel {
    flex-grow: 0;
    flex-shrink: 0;
    min-width: 300px;
    background-color: black;
}

.recording-canvas {
    flex-grow: 1;
    padding: 10px;
    position: absolute;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;
    overflow: hidden;
}


/*#region icons*/

.icon {
    display: block;
    overflow: hidden;
}

.icon>svg {
    height: 100%;
    width: 100%;
}

.icon-size32 {
    width: 32px;
    height: 32px;
}

.icon-container.disabled {
    pointer-events: none;
    --icon-color: rgba(0, 0, 0, 0.1);
    --icon-disabled-color: rgba(0, 0, 0, 0.1);
    --icon-remove-color: rgba(0, 0, 0, 0.1);
}


/*#endregion*/


/*#region Images*/

.icon-switching-container {
    position: relative;
}

.icon-switching-container>.icon {
    position: absolute;
    top: 0px;
    left: 0px;
}


/*#endregion*/


/*#region generic screen styles*/

.screen {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    position: absolute;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;
}

.screen-toolbar {
    flex-shrink: 0;
}

.screen-content {
    flex-shrink: 0;
    flex-grow: 1;
    position: relative;
}


/*#endregion*/


/*#region toolbar*/

.toolbar {
    height: 50px;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0px 10px;
}

.toolbar.screen-toolbar {
    border-bottom: solid 1px rgba(0, 0, 0, 0.2);
    background-color: #ddd;
    align-items: stretch;
}

.toolbar-group {
    /* border: solid 1px rgba(0,0,0,0.2); */
    border-radius: 100px;
    display: flex;
    flex-grow: 1;
    flex-shrink: 1;
    align-items: center;
}

.toolbar-group .icon-size32 {
    flex-shrink: 0;
}

.toolbar-group.left {
    justify-content: flex-start;
    flex-basis: 50%;
}

.toolbar-group.right {
    justify-content: flex-end;
    flex-basis: 50%;
}

.toolbar-group.center {
    justify-content: center;
}


/*#endregion toolbar*/


/*#region buttons*/

.icon-button {
    outline: none;
    background: none;
    border: none;
    height: auto;
    width: auto;
    display: flex;
    /*for testing multiple icons next to each other, can be removed.*/
    position: relative;
    padding: 0px;
}

.play-button .icon {
    opacity: 0;
}

.play-button:not(.state-recorded):not(.state-recording):not(.state-pre-recording) .ic-record {
    opacity: 1.0;
    pointer-events: all;
}

.play-button.state-stopped .ic-play,
.play-button.state-recorded:not(.state-started) .ic-play {
    opacity: 1.0;
    pointer-events: all;
}

.play-button.state-playing .ic-stop,

/*used by loopgroup*/

.play-button.state-started.state-recorded .ic-stop,
.play-button.state-pre-recording .ic-stop,
.play-button.state-recording .ic-stop {
    opacity: 1.0;
    pointer-events: all;
}


/*#endregion*/


/*#region duration control*/

.duration-control {
    align-self: stretch;
    display: flex;
    align-items: center;
    /* border-radius: 100px; */
    border-right: solid 1px rgba(0, 0, 0, 0.2);
    border-left: solid 1px rgba(0, 0, 0, 0.2);
}

.duration-number-container {
    width: 50px;
    align-self: stretch;
    background-color: rgba(0, 0, 0, 0.2);
    border-right: solid 1px rgba(0, 0, 0, 0.2);
    border-left: solid 1px rgba(0, 0, 0, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.duration-control .icon-button {
    padding: 5px 10px;
}

.duration-control .icon-button:first-child {
    border-top-left-radius: 100px;
    border-bottom-left-radius: 100px;
    padding-left: 15px;
}

.duration-control .icon-button:last-child {
    border-top-right-radius: 100px;
    border-bottom-right-radius: 100px;
    padding-right: 15px;
}


/*#endregion*/


/*#region debug console*/

.debug-console {
    position: absolute;
    bottom: 0px;
    left: 0px;
    right: 0px;
    height: 150px;
    background-color: black;
    color: white;
    overflow-y: auto;
    display: none;
}

.state-debug .debug-console {
    display: block;
}


/*#endregion*/


/*#region Phone Size*/

@media only screen
/* and (orientation: portrait) { */

and (max-width: 812px) {
    .screen {
        flex-direction: column-reverse;
    }
    .toolbar.screen-toolbar {
        border-top: solid 1px rgba(0, 0, 0, 0.2);
        border-bottom: none;
    }
    .duration-control .PART_BtnMinus,
    .duration-control .PART_BtnPlus {
        display: none;
    }
}


/*#endregion*/