/*
body, html {
    background-color:#2a3698;
    margin:0
    padding:0;
	font-family:Verdana, Arial, Helvetica, sans-serif;
}*/

.no-touch {
    touch-action: none;
}

#grid {
    user-select: none;
}

.grid {
    background-color: #056788;/*#2a3698;*/
    margin: 0;
    padding: 0;
   /* font-family: Verdana, Arial, Helvetica, sans-serif;*/
    transition: 1s opacity;
    margin: auto;
    background: linear-gradient(to top, #1d2675 0%, #2a3698 100%);
    border: 3px solid black;
}

* {
    box-sizing: border-box;
}

.hidden-by-default {
    display: none;
}

.cell-group {
    /*
    backface-visibility:hidden;
	transform-style: preserve-3d;
    -webkit-perspective: 0;
    -webkit-backface-visibility: hidden;
	perspective: 1000px;*/
    /*touch-action:none;*/
    user-select: none;
    -webkit-user-select: none;
    outline: none;
}

.cell {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    backface-visibility: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
    -webkit-perspective: 0;
    -webkit-backface-visibility: hidden;
    width: 10px;
    height: 10px;
}
.cell:not(.category){
    border: 3px solid #0796c7;
    /*overflow: hidden;*/
    background-color: #06789f;
    transition: .3s;
   /* flex: 1;*/
    border-radius: 10px;
}
.cell a:link,
.cell a:visited,
.cell a:hover {
    color: white;
    text-decoration: underline;
}

.cell-inner {
    /*transform: rotateX(0deg);*/
    /*
    backface-visibility:hidden;
	transform-style: preserve-3d;*/
}

/*
.cell iframe {
    backface-visibility:hidden;
}*/

.animate {
    transition: 1s;
}

.cell-group {
    position: absolute;
}

.back {
    transform: rotateY(180deg);
}

.front {
    z-index: 2;
}

.back,
.front {
    cursor: pointer;
    overflow: hidden;
}

.back,
.front,
.cell-group,
.category {
    /*transition: .3s transform border;*/
    transition-property: transform, border, top;
    transition-duration: .3s;
    will-change: transform;
}

.cell-group {}

.cell-group:focus .front,
.cell-group:focus .back {
    /*border:3px dotted yellow;*/
    background-color:#39b9e4;
}

.category {
    align-items: flex-end;
    border-color: transparent;
    /*border-bottom-color:black;*/
}

.cell-group.hover .front {
    transform: rotateY(180deg);
}

.cell-group.hover .back {
    transform: rotateY(0deg);
}

.cell-group.hover .back,
.cell-group.hover .front {
   /* border-color: yellow;*/
   background-color: #39b9e4;
    border-style: solid;
}

.cell-group.hover .back,
.cell-group.hover .front {
    transition-property: transform, border;
    transition-duration: .6s;
}

.contains-points {
    visibility: hidden;
}

.empty .cell {
    color: rgba(255, 255, 255, .2);
}

.empty .contains-answer {
    display: none;
}

.empty .contains-points {
    visibility: visible;
}

.cell-group.empty.hover .front {
    transform: rotateY(0deg);
}

.cell-group.empty .back {
    transform: rotateY(180deg);
    display: none;
}

.col-tab {
    bottom: -80px;
    height: 80px;
    width: 100%;
    /*left:calc(50% - 20px);*/
    position: absolute;
    text-align: center;
    /*border:3px solid black;*/
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    cursor: auto;
}

.col-tab>div {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(0, 0, 0, .07);
    padding: 0px 10px;
    cursor: auto;
}

.col-tab,
.row-tab {
    /*background-color:orange;*/
}

.row-tab {
    right: -80px;
    /*top:calc(50% - 20px);*/
    width: 80px;
    height: 100%;
    position: absolute;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: auto;
}

.row-tab>div {
    background-color: rgba(0, 0, 0, .07);
    width: 100%;
    padding: 10px 0px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: auto;
}

.row-tab img,
.col-tab img {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.drag-row-cell {
    width: 25px;
    height: 100%;
    display: block;
    cursor: ns-resize !important;
    position: relative;
    touch-action: none;
    margin-left: 5px;
}

/*
.drag-row-cell:before {
	content: '';
	width: 0px;
	height: 0px;
	border-style: solid;
	border-width: 0px 10px 10px 10px;
	border-color: transparent transparent black transparent;
	margin-right: 0px;
    position:absolute;
    top:calc(50% - 12px);
    right:0;
}

.drag-row-cell:after {
	content: '';
	width: 0px;
	height: 0px;
	border-style: solid;
	border-width: 10px 10px 0px 10px;
	border-color: black transparent transparent transparent;
	margin-right: 0px;
    position:absolute;
    bottom:calc(50% - 12px);
    right:0;
}*/

.drag-col-cell {
    position: relative;
    height: 25px;
    width: 100%;
    /*background-color:orange;*/
    display: block;
    cursor: ew-resize !important;
    touch-action: none;
    padding-top: 5px;
}

.drag-cell-cell {
    position: absolute;
    bottom: 0;
    right: 0;
    /*
    margin-bottom:3px;
    margin-right:3px;*/
    max-width: 25%;
    max-height: 25%;
    text-align: right;
    display: flex;
    visibility: hidden;
    justify-content: flex-end;
    opacity: 0;
    /*transition:.5s;*/
    min-width: 25px;
    min-height: 25px;
    cursor: grab;
    background-color: transparent;
    padding: 3px;
    touch-action: none;
}

/*
.empty .drag-cell-cell {
    opacity:0;
    visibility:hidden;
}*/

.delete-cell-cell {
    position: absolute;
    bottom: 0;
    left: 0;
    /*
    margin-bottom:5px;
    margin-left:5px;*/
    text-align: left;
    display: flex;
    visibility: hidden;
    justify-content: flex-start;
    opacity: 0;
    /*transition:.5s;*/
    max-width: 25%;
    max-height: 25%;
    min-width: 25px;
    min-height: 25px;
    cursor: pointer;
    background-color: transparent;
    padding: 3px;
}

.delete-cell-cell img {
    /*
    max-width:100%;
    max-height:100%;*/
}

.points-cell {
    opacity: 1;
    position: absolute;
    left: -75px;
    width: 75px;
    height: 100%;
    /*transform:translate(0, 50%);*/
    /*background-color:yellow;*/
    display: flex;
    align-items: center;
}

.points-field {
    background-color: transparent;
    border: none;
    border-bottom: 2px solid black;
    text-align: center;
    color: white;
}

.points-cell input {
    display: block;
    width: 100%;
    font-size: 16px;
    max-height:55px;
}

.points-cell,
.col-tab,
.row-tab,
.drag-row-cell,
.drag-col-cell {
    opacity: 0;
    visibility: hidden;
}

.last-row.in-col .col-tab{
    opacity: 1;
    visibility: visible;
}


.last-col.in-row .row-tab, .hover .row-tab  {
    opacity: 1;
    visibility: visible;
}

.last-col.in-row .drag-row-cell, .hover .drag-row-cell {
    opacity: 1;
    visibility: visible;
}

.last-row.in-col .drag-col-cell {
    opacity: 1;
    visibility: visible;
}

.in-drag-state .last-row.in-col .col-tab,
.in-drag-state .last-col.in-row .row-tab,
.in-drag-state .last-col.in-row .drag-row-cell,
.in-drag-state .last-row.in-col .drag-col-cell {
    opacity: 0;
    visibility: hidden;
}

.in-drag-state-col .last-row.in-col .drag-col-cell {
    opacity: 1;
    visibility: visible;
}

.in-drag-state-row .last-col.in-row .drag-row-cell {
    opacity: 1;
    visibility: visible;
}

.in-drag-state .cell-group,
.in-drag-state .category {
    /*transition:.25s;*/
}

.in-drag-state-col .cell-group.in-col,
.in-drag-state-col .category.in-col,
.in-drag-state-row .cell-group.in-row,
.in-drag-state-row .category.in-row {
    transition: none;
}

.first-col .points-cell {
    opacity: 1;
    visibility: visible;
}

.cell-group.moving .front {
    border: 2px solid yellow;
}

.in-resize-state .cell-group,
.in-resize-state .back,
.in-resize-state .front,
.in-resize-state .category {
    transition: none !important;
}

.in-drag-state .points-cell {
    opacity: 0;
    visibility: hidden;
}

.cell-group.hover .drag-cell-cell,
.cell-group.hover .delete-cell-cell {
    visibility: visible;
    opacity: 1;
}

.cell-group.hover.empty .drag-cell-cell,
.cell-group.hover.empty .delete-cell-cell {
    visibility: hidden;
    opacity: 0;
}

.cell-group.moving {
    background-color: #2a3698;
    z-index: 10;
    transition: 0s;
    cursor: grabbing;
}

.category.moving {
    z-index: 10;
    transition: 0s;
}

.cell-group.moving .delete-cell-cell,
.cell-group.moving .drag-cell-cell {
    opacity: 0;
}

.cell-group.moving.hover .front {
    transform: rotateY(0deg);
}

.cell-group.moving.hover .back {
    transform: rotateY(180deg);
}

.hidden {
    display: none;
}

.move-to-below .cell {
    border-bottom-color: white;
}

.move-to-above .cell {
    border-top-color: white;
}

.in-drag-state-cell .empty .front {
    opacity:.5;
}

.in-drag-state-cell .dropzone .front {
    opacity:.5;
    border:2px dashed #efefef;
 
}

.answer-holder,
.question-holder
/*, .category-holder*/

    {
    display: none;
}

.noanimate {
    transition: none !important;
}

.cell-inner p:last-child {
    margin-bottom: 0;
}
.drag-col-cell, .delete-col-button, .drag-row-cell, .delete-row-button, .drag-cell-cell, .delete-cell-cell {
    color:white;
    max-width: 20px;
    max-height: 20px;
}

/* PAYMENT MODAL STUFF */

.card-error {
    color: #ff0000;
    font-weight: bold;
    font-size: 14px;
}

.error {
    color: #ff0000;
    font-weight: bold;
}

.promise {
    background-color: #fff587;
    padding: 10px;
    line-height: 1.3;
    color: #000;
    /*margin-top:10px;*/
}

/**
 * The CSS shown here will not be introduced in the Quickstart guide, but shows
 * how you can use CSS to style your Element's container.
 */

.StripeElement {
    display: block;
    font-size: 20px;
    width: 100%;
    border: 1px solid #b8c3cc;
    border-radius: 3px;
    padding: 3px;
    /*font-family: 'Cormorant Garamond', serif;*/
    background-color: #fff;
}

.StripeElement--focus {}

.StripeElement--invalid {
    border-color: #fa755a;
}

.StripeElement--webkit-autofill {
    background-color: #fefde5 !important;
}

#payment-modal .modal-close {
    font-weight: bold;
}

#payment-modal .modal-inner {
    padding: 20px;
}

.errorlist2 {
    padding-left: 0;
    color: #ff0000;
    list-style-type: none;
    font-size: 14px;
}

.payment-tabs {
    align-items: center;
    font-size: 14px;
}

.payment-tabs>a {
    display: inline-block;
    margin: 0 5px;
    padding: 5px;
    background-color: #efefef;
    cursor: pointer;
    margin-bottom: 10px;
    text-decoration: none;
    color: black;
}

.payment-tabs>a:hover {}

.payment-tab {
    display: none;
}

a.payment-tab-active {
    background-color: #fff587;
}

#payment-modal .modal {
    background-color: white;
}

#payment-modal {
    z-index: 1002;
}

#order-total {
    width: 100%;
    line-height: 1.3;
    border-collapse: collapse;
}

#order-total tr td:last-child {
    text-align: right;
    padding-left: 10px;
}

#order-total tr td {
    padding-bottom: 5px;
    padding-top: 5px;
}

#order-total .total td {
    border-top: 3px solid black;
}

.form-row label {
    display: block;
    font-weight: bold;
    margin-bottom: 2px;
}

/* END PAYMENT MODAL STUFF */

/* User interface elements */

.modal-active {
    overflow: hidden;
}

#control-panel {
    margin-top: 20px;
    background-color: #044b64;/*rgba(255, 255, 255, .9);*/
    color:#fff;
    z-index: 1;
    /*border-top-right-radius:25px;
    border-top-left-radius:25px;*/
    box-shadow: 0 7px 14px 0 rgba(50, 50, 93, .1), 0 3px 6px 0 rgba(0, 0, 0, .07);
    border-radius: 3px;
    margin-left: 20px;
    margin-right: 20px;
    padding: 0px 15px;
    line-height: 1.3;
}

#control-panel p {
    padding-top: 15px;
    line-height: 1.5;
    margin-bottom: 0;
}

/*
#save-continue {
    margin-left:auto;
    text-align:right;
    padding-left:50px;
    justify-self:center;
    align-self:center;
}*/

#control-panel button {
    white-space: nowrap;
    font-size: 16px;
}

#save-continue button {}

#save-button,
#finish-button {
    /*min-width:8ch;*/
}

#save-button {
    align-self: center;
    position: absolute;
    bottom: 0;
    right: 0;
    background: white;
    padding: 10px;
    display: inline-block;
}

#save-button.fade-out {
    opacity: 0;
    transition: opacity 3s ease-out;
}

/*
#add-row, #add-column {
    background:transparent;
    border:none;
	color:#2a3698;	
    font-weight:bold;
}*/

#permission-selector {
    align-self: center;
    /*position:relative;*/
}

#permission-button {
    padding: 5px;
    position: relative;
    z-index: 10;
    white-space: nowrap;
    cursor: pointer;
}

.permission-button-open {
    border-top: 1px solid black;
    border-left: 1px solid black;
    border-right: 1px solid black;
    background-color: #ffff5f;
}

#permission-selector-options {
    position: absolute;
    background-color: #ffff5f;
    z-index: 3;
    left: 0;
    right: 0;
    margin-top: 3px;
    max-width: 500px;
    /*transform: translate(-50%, 0);
    margin-right: 50%;*/
    border: 1px solid black;
    display: none;
}

#permission-selector-options p {
    margin-top: 0;
    padding-top: 0;
}

#permission-selector h5 {
    margin-bottom: 0;
    font-size: 16px;
}

.permission-selector-option {
    /*margin:10px;*/
    cursor: pointer;
    padding: 10px;
    display: flex;
    cursor: pointer;
}

.permission-selector-option div:first-child {
    margin-right: 5px;
}

.permission-selector-option:hover {
    background-color: #ff8800;
}

.editor-buttons {
    display: inline;
    flex-wrap: wrap;
}

.editor-buttons button {
    margin-right: 10px;
    min-height: 35px;
    margin-bottom: 15px;
    margin-top: 15px;
}

.editor-buttons button:last-child {
    margin-right: 0;
}

.modal-wrapper:not(.original-modal .modal-wrapper){
    background-color: rgba(0, 0, 0, .5);
    /*display:none;*/
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    height: 100%;
    /* stupid safari */
    transform-origin: top left;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#modal-wrapper .modal:not(.original-modal) {
    /*position:relative;*
    top: 50%;
    /*left:50%;*/
    /*right:5%;*/
    /*transform:translate(0%, -50%);*/
    z-index: 2;
    border-radius: 5px;
    background-color: #0796c7;
    overflow: auto;
    max-height: calc(100%);
    /*max-width: 1000px;
    /*
    margin-left:auto;
    margin-right:auto;*/
}

#modal-title {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    background-color: #044b64;
    color: #fff;
    font-size: 18px;
    padding: 5px;
    display: flex;
}

#modal-inner {
    padding: 20px;
    background-color: #0796c7;
    color:#fff;
}

.modal-close {
    float: right;
    cursor: pointer;
}

.jrow {
    display: block;/*flex;**/
}

.jrow>div {
    max-width: 100%;
}

label.big-label {
    display: block;
    font-size: 20px;
    line-height: 1.3;
}

#t-answer,
#t-question {
    display: block;
    width: 100%;
}

.jrow>div {
    /*margin-left: 10px;
    margin-right: 10px;*/
}

.jrow>div:first-child {
    margin-left: 0px;
    margin-bottom:3rem;
}

.jrow>div:last-child {
    margin-right: 0px;
}

.fr-box .mathy:before {
    content: "ASCIIMATH=";
    background-color: black;
    padding: 2px;
    color: white;
    margin-right: 5px;
}

.fr-box .mathy {
    font-weight: bold;
    /*font-family: monospace;
    /* padding: 5px; */
    /* background-color: #000; */
    /* color: #fff; */
    /*text-align: center;*/
    /* transform: rotate(2deg); */
    /*display: inline-block;*/
    /*text-align: center;*/
    /* margin: auto; */
    /* margin-left: auto; */
    /*margin-right: auto;*/
    /* width: 12px; */
    border: 1px dotted black;
}

#other-modal {
    padding: 20px;
    background-color: #fff;
}

textarea#title {
    font-size: 48px;
    /*margin:20px auto;*/
    display: block;
    /*width:calc(100% - 40px);*/
}

textarea {
    display: block;
    width: 100%;
    background-color: transparent;
    color: #fff;
    text-align: center;
    border: none;
    resize: none;
    padding: 5px;
}

#title:hover,
.category .cell-inner:hover {
    background-color: #39b9e4;
}

.category .cell-inner:focus,
#title:focus {
    background-color: white;
    color: #000;
}

textarea#title:focus,
#categories textarea:focus {
    /*background-color:#fff !important;
    color:#000 !important;*/
}

textarea.resizeme {
    overflow: hidden;
    padding: 0;
}

.resizeme.empty {
    color: rgba(255, 255, 255, .5);
}

.category .cell-inner {
    min-width: 100%;
}

.mathjax-preview {
    text-align: center;
}

.mathjax-help {
    font-size: 12px;
}

.mathjax-preview-text {
    font-size: 11px;
    margin-bottom: 5px;
    text-align: center;
}

.expanded {
    transition: .5s all ease;
    /*, .35s border-width step-end, 1s transform ease;*/
    border-width: 0;
}

@media (max-width:800px) {
    .hide-small {
        display: none;
    }
    /*
    .editor-buttons {
        flex-direction:column;
    }*/
}

@media (max-width: 768px),
(max-height: 500px) {
    .jrow {
        display: block;
    }
    body .jrow>div {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    #modal {
        left: 0;
        right: 0;
    }
    #question-grid .table-cell-inner h3 {
        font-size: 18px;
    }
    #question-title-wrapper span {
        display: block;
        margin-bottom: 5px;
    }
}

.animate-position {
    transition-duration: .3s;
    transition-property: top, left;
}

/*
* {
    transition:0s !important;
}*/
.points-text{
    color: #ffc107;
    font-family: 'Teko', sans-serif;
    font-weight: 700!important;
    letter-spacing: .02em;
}
textarea.form-control{
    background-color:transparent;
    padding:10px;
    border-color:transparent;
    color:white;
}