/*
 * CSS for Ginga pg widgets
 */

* {
    box-sizing: border-box;
}


html {
    height: 100%;
}

body {
    height: 100%;
    margin: 0px;
}


.hbox, .vbox {
    box-sizing: border-box;

    margin: 0px;

    display: -webkit-flex;
    display: -ms-flexbox;  /* IE 10 */
    display: -ms-flex;     /* IE 11 */
    display: -moz-flex;
    display: flex;

    justify-content: flex-start;
    overflow: visible;
    align-items: stretch;
    align-content: stretch;
}

.hbox {
    -webkit-flex-flow: row;
    -ms-flex-flow: row;
    -moz-flex-flow: row;
    flex-flow: row;
    width: 100%;
}

.vbox {
    -webkit-flex-flow: column;
    -ms-flex-flow: column;
    -moz-flex-flow: column;
    flex-flow: column;
    height: 100%;
}

div {
    box-sizing: border-box;
    white-space: nowrap;
    overflow: visible;
}

canvas {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.ui-dialog .ui-dialog-content  {
    /* Fix Dialog resizing issue where resize shrinks the content too
     * much.  See https://stackoverflow.com/questions/31584544/jquery-ui-dialog-on-resizing-shrinks-the-content-of-the-dialog
     */
    padding: 3.5px;
}

.ui-dialog .ui-dialog-titlebar  {
    /* Adjust the titlebar so it is equal to the content fix */
    margin: 3.5px;
}

/* ToggleButton CSS via https://www.w3schools.com/howto/howto_css_switch.asp */
.switch {
    position: relative;
    display: inline-block;
    width: 45px;
    height: 24px;
}
  
.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}
  
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}
  
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
 }
  
input:checked + .slider {
    background-color: #2196F3;
}
  
input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}
  
input:checked + .slider:before {
    -webkit-transform: translateX(21px);
    -ms-transform: translateX(21px);
    transform: translateX(21px);
}
  
/* Rounded sliders */
  .slider.round {
    border-radius: 24px;
}
  
.slider.round:before {
    border-radius: 50%;
}

/* CSS for Frame Widget */
.frame {
    border: 1px solid gray;
    width: 100%;
    height: 100%;
    position: relative;
}

.frame-widget {
    position: absolute;
    bottom: 0;
    width: 100%;
    flex-grow: 1;
    flex-shrink: 1;
    padding-bottom: 5%;
}

.frame-text {
    text-align: center;
    margin-top: 0;
}

/* StackWidget CSS */
.stackbox {
    display: grid;
    justify-items: center;
    align-items: center;
}

/*END*/
