html {
  position: relative;
  min-height: 100%;
}
body {
  /* Margin bottom by footer height */
  margin-bottom: 60px;
}
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  /* Set the fixed height of the footer here */
  height: 60px;
  line-height: 60px; /* Vertically center the text there */
  background-color: #f5f5f5;
}

.hidden {
    display: none;
}

.dialog__main {
    background: rgba(0,0,0,0.6);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1501;
}
.dialog__back {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1500;
    background: #000;
    opacity: 0.7;
}
.dialog {
    position: absolute;
    max-height: 84%;
    overflow-y: auto;
    width: 80%;
    left: 50%;
    margin-left: -40%;
    z-index: 1501;
    background: #fff;
    border: 1px solid #777;
    border-radius: 4px;
    padding: 10px;
}
.dialog__close {
    cursor:pointer;
    padding:10px;
    font-weight:bold;
    background: url(../img/dialog_close.png) no-repeat 100%;
    color: #9e9e9e;
    text-align: right;
    padding-right: 37px;
    line-height: 32px;
    margin: 0 10px;
}
.dialog__close:hover {
    background: url(../img/dialog_close_over.png) no-repeat 100%;
    color: #fff;
}
/************************ SWITCHER ****************************/
.onoff {
}
input#toggle {
    max-height: 0;
    max-width: 0;
    opacity: 0;
}
input#toggle + label {
    display: inline-block;
    position: relative;
    box-shadow: inset 0 0 0px 1px #d5d5d5;
    text-indent: 43px;
    height: 30px;
    width: 80px;
    border-radius: 15px;
    font-weight: bold;
    color: #999;
    text-shadow: 1px 1px 0px #fff;
}
input#toggle + label.toggled {
    text-indent: 13px;
    color: #fff;
    text-shadow: 1px 1px 0px #999;
}
input#toggle + label:before {
    content: "";
    position: absolute;
    display: block;
    height: 30px;
    width: 60px;
    top: 0;
    left: 0;
    border-radius: 15px;
    background: rgba(19,191,17,0);
    -moz-transition: .25s ease-in-out;
    -webkit-transition: .25s ease-in-out;
    transition: .25s ease-in-out;
}
input#toggle + label.toggled:before {
    content: "Да";
}
input#toggle + label:after {
    content: "";
    position: absolute;
    display: block;
    height: 30px;
    width: 40px;
    top: 0;
    left: 0px;
    border-radius: 15px;
    background: white;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.2), 0 2px 4px rgba(0,0,0,.2);
    -moz-transition: .25s ease-in-out;
    -webkit-transition: .25s ease-in-out;
    transition: .25s ease-in-out;
}
input#toggle:checked + label:before {
    width: 60px;
    background: #ccc;
}
input#toggle:checked + label:after {
    left: 40px;
    box-shadow: inset 0 0 0 1px #aaa, 0 2px 4px rgba(0,0,0,.2);
}
/**************************************************************/
.loading {
    background: url(../img/loading.gif) no-repeat center center;
    width: 64px;
    height: 64px;
    margin: 0 auto;
}
#main {
    font-size: 18px;
}
.main__centered {
    padding: 3rem 1.5rem;
    text-align: center;
}
.top-messages {
    position: fixed;
    overflow: hidden;
    top: 25px;
    right: 25px;
    z-index: 2000;
}
.top-messages li {
    list-style-type: none;
}

.form-center {
    max-width: 330px;
    margin: auto;
    padding: 15px;
}
.lg-center, .sm-center {
    margin: 0 auto;
}
.sm-center {
    max-width: 420px;
}
.lg-center {
    max-width: 620px;
}

.card-num {
    position: absolute;
    top: -12px;
    left: -7px;
}
.card-remove {
    position: absolute;
    top: -12px;
    right: -7px;
}
.card input[type="text"] {
    width: 70%;
}

body > .container {
  padding: 10px 15px 0;
}

.footer > .container {
  padding-right: 15px;
  padding-left: 15px;
}

code {
  font-size: 80%;
}

.trapeza {
    text-align: right;
}
.trapeza-img {
    width: 64px;
    height: 64px;
    display: inline-block;
    background-image: url('../img/trapeza_64.png');
}
.trapeza-img.tr-1 {background-position: 0px 0px;}
.trapeza-img.tr-2 {background-position: -64px 0px;}
.trapeza-img.tr-3 {background-position: -128px 0px;}
.trapeza-img.tr-4 {background-position: -192px 0px;}
.trapeza-img.tr-5 {background-position: -256px 0px;}
.trapeza-img.tr-6 {background-position: 0px -64px;}
.trapeza-img.tr-7 {background-position: -64px -64px;}
.trapeza-img.tr-8 {background-position: -128px -64px;}

.trapeza-img-32 {
    width: 32px;
    height: 32px;
    background-image: url('../img/trapeza_32.png');
}
.trapeza-img-32.tr-1 {background-position: 0px 0px;}
.trapeza-img-32.tr-2 {background-position: -32px 0px;}
.trapeza-img-32.tr-3 {background-position: -64px 0px;}
.trapeza-img-32.tr-4 {background-position: -96px 0px;}
.trapeza-img-32.tr-5 {background-position: -128px 0px;}
.trapeza-img-32.tr-6 {background-position: 0px -32px;}
.trapeza-img-32.tr-7 {background-position: -32px -32px;}
.trapeza-img-32.tr-8 {background-position: -64px -32px;}

.reading {
    margin: 0 15%;
    text-align: center;
}
.reading span {
    margin-right: 10px;
    display: inline-block;
}

.scroll_to_top {
    display: none;
    position: fixed;
    width: 36px;
    height: 36px;
    bottom: 38px;
    right: 20px;
    border-radius: 18px;
    background: #777;
    z-index: 100;
    opacity: 0.3;
    text-align: center;
    font-size: 1.5rem;
}
.scroll_to_top:hover {
    opacity: 1;
}
.scroll_to_top a {
    color: #fff;
}


.i32_1 {background-position:0px 0px;}
.i32_2 {background-position:-32px 0px;}

/******************************* DISPLAY ***********************************/
@media (max-width: 576px) {
    .dialog {
        width: 98%;
        margin-left: -49%;
    }
}
@media (min-width: 768px) {
    .dialog {
        width: 600px;
        margin-left: -300px;
    }
}
