:root {
  --mdev-color: #0c548d;
}

.mdev {
  & a {
    text-decoration: none;
    box-shadow: none !important;
  }
  .dn {
    display: none;
  }
}

.mdv-builder {
  position: relative;
  & * {
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
  }
}

.mdv-table {
  display: table;
  width: 100%;
  height: 100%;
}

.mdv-cell {
  display: table-cell;
  vertical-align: middle;
  width: 100%;
  height: 100%;
}
.mdv-modal {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  background: #0000008a;
  overflow: auto;
  height: 100%;
  z-index: 99999;
  .mdv-base {
    width: 800px;
    margin: 0 auto;
    position: relative;
    padding: 30px;
  }
  .mdv-container {
    background: #FFF;
    padding: 40px;
    border-radius: 10px;
    position: relative;
    > .mdv-close {
        position: absolute;
        right: 5px;
        top: 3px;
        font-size: 22px;
        color: #f25e54;
        border: 0;
        background: none;
        cursor: pointer;
        &:hover {
            color: #000;
        }
    }
  }
}
.mdv-modal.dn {
  display: none;
}
.mdv-modal-open {
  overflow: hidden;
}

.mdv-tab {
  position: relative;
  clear: both;
  border: 1px solid #000;
  border-radius: 5px;
  background: #FFF;
  > ul {
    padding: 0 !important;
    margin: 0 !important;
    list-style: none;
    display: flex;
    border-bottom: 1px solid #000;
    > li {
      margin: 0;
      padding: 0;
      > a {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 12px;
        border-right: 1px solid #000;
        color: #000;
        position: relative;
        box-shadow: none !important;
      }
    }
    > .active a:after {
      content: "";
      position: absolute;
      background: #FFF;
      height: 4px;
      left: 0;
      right: 0;
      bottom: -2px;

    }
  }
  > .mdv-panel {
    padding: 30px;
    display: none;
  }
  > .active {
    display: block;
  }
}

.mdv-notice, 
.mdv-success, 
.mdv-error {
  background: #b4dbfa;
  padding: 15px 20px;
  color: #000;
  margin-bottom: 20px;
  border-radius: 5px;
}
.mdv-success {
  background: #eaf8db;
}
.mdv-error {
  background: #fce7e4;
}
.err.mdv-error {
  padding: 5px 8px;
  font-size: 12px;
  line-height: 12px;
  display: inline-block;
  position: absolute;
  right: 5px;
  height: 22px;
  margin: -27px 0 0;
  z-index: 2;
}
.sn .err.mdv-error {
  font-size: 0;
  &:before {
    content: "*";
    font-size: 12px;
  }
}

.mdv-notice.bot {
  margin: 20px 0 0;
}

.mdv-form {
  position: relative;
  .mdv-title {
    margin: 0;
    padding-bottom: 20px;
  }
}

.mdv-fields {
  position: relative;
  margin: 0 -10px 25px;
  &:after {
    content: "";
    display: block;
    clear: both;
  }
}

.dn.mdv-field  {
  display: none;
}

.mdv-button, 
.mdv-field :where( input, select, textarea ) {
  display: block;
  font-size: 100%;
  font-family: inherit;
  font-weight: inherit;
  line-height: inherit;
  width: 100%;
  max-width: inherit;
  padding: 12px;
  border: 1px solid #000;
  background: #FFFFFF;
  outline: none;
  height: 48px;
  border-radius: 5px;
}


.mdv-field {
  & input[type=email], 
  & input[type=password], 
  & input[type=number], 
  & input[type=text], 
  & input[type=checkbox], 
  & input, 
  & select, 
  & textarea {
    padding: 12px;
    border: 1px solid #000; 
  }
}

.mdv-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  position: relative;
  gap: 8px;
  width: auto;
  color: #FFF;
  cursor: pointer;
  background: #000;
  border-color: #000;
  &:hover {
    background: var(--mdev-color);
    border-color: var(--mdev-color);
  }
}

.mdv-field {
  position: relative;
  margin-bottom: 20px;
  clear: both;
  &:last-child {
    margin-bottom: 0;
  }
  & img {
    max-width: 100%;
  }
  & :where([type=checkbox], [type=radio]) {
    width: 25px !important;
    height: 25px !important;
    padding: 0 !important;
    text-indent: 0 !important;
    margin: 0 5px 0 0 !important;
    position: relative;
    background: #FFF;
    text-indent: 0;
    float: left;
    display: flex !important;
    align-items: center;
    justify-content: center;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    line-height: inherit;
    &:checked:before { 
      content: "\f00c" !important;
      font-family: "Font Awesome 6 Free";
      font-weight: 900;
      font-size: 16px;
      margin: 0 !important;
      width: auto !important;
      height: auto !important;
      line-height: 16px !important;
      float: none !important;
      display: block !important;
      background: none !important;
    } 
  }
  & [type=radio] {
    border-radius: 100px !important;
    &:checked:before {
      content: "\f111" !important;
    }
  }
  & select {
    padding: 12px 8px;
  }
  & textarea {
    height: 150px !important;
  }
  & :disabled {
    background: #0000000f;
    border-color: #0000000f;
  }
  .mdv-content {
    position: relative;
    margin: 0 10px;
    &:after {
      content: "";
      display: block;
      clear: both;
    }
    & label {
      display: block;
      margin-bottom: 5px;
      & i {
        margin-right: 5px;
      }
      & em {
        color: red;
      }
    }
    .mdv-fields {
      margin-bottom: 0;
    }
  }
  .mdv-description {
    clear: both;
    z-index: 1;
    > i {
      margin-left: 5px;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    > div {
      position: absolute;
      background: var(--mdev-color);
      color: #FFF;
      padding: 15px;
      border-radius: 5px;
      margin: -34px 0 0 12px;
      display: none;
    }
    &:hover {
      > i:before {
        color: #FFF;
        border-radius: 10px;
        background: var(--mdev-color);
          }
      > div {
        display: block;
      }
    }
    &:hover {
      > i {
        z-index: 2;
      }
      > div {
        z-index: 1;
      }
    }
  }
  .mdv-description.bot {
    clear: both;
    padding-top: 3px;
    > i {
      display: none;
    }
    > div {
      background: none;
      position: initial;
      padding: 0;
      margin: 0;
      display: block !important;
      color: #666;
      font-size: 13px;
    }
  }
  .mdv-description.top {
    display: inline-block;
  }
  .mdv-description.side {
    > i {
      float: right;
      position: relative;
    }
    > div {
      margin: -17px 7px 0 0;
      right: 0;
    }
  }
  .nl {
    > i, > .side > i {
      position: absolute;
      height: 48px;
      width: 48px;
      left: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 100%;
      z-index: 1;
    }
  }
  .nl > .side {
    > i {
      left: auto;
      right: 0;
      z-index: 2;
    }
    > div {
      margin: 0 24px 0 0;
    }
  }
  .wi :where( input, select ) {
    text-indent: 30px;
  }
  .wi textarea {
    padding-left: 43px;
  }
  .mdv-action {
    position: absolute;
    display: none;
    align-items: center;
    justify-content: center;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    height: 30px;
    width: 65px;
    z-index: 1;
    & :where( a, div ) {
      color: #000;
      border: 1px solid #000;
      display: block;
      height: 100%;
      width: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 12px;
      background: #FFF;
      &:last-child {
        border-left: 0;
      }
    }
    & div {
      width: auto;
      padding: 0 10px;
      gap: 5px;
      & a {
        width: auto;
        border: 0;
        font-size: 11px;
        padding: 0;
        &:first-child:before {
          content: 'Yes'
        }
        &:last-child:before {
          content: 'No'
        }
        &:hover {
          color: var(--mdev-color);
        }
      }
    }
  }
  .mdv-item {
    position: relative;
    margin-bottom: 5px !important;
    &:last-child {
      margin-bottom: 0 !important;
    }
    .mdv-action {
      left: auto;
      top: auto;
      bottom: 0;
      right: 0;
      flex-direction: column-reverse;
      border-radius: 0 5px 5px 0;
      width: auto;
      height: 48px;
      display: flex;
      & a {
        border-radius: 0 0 5px 0;
        font-size: 12px;
        padding: 0;
        &:last-child {
          border-radius: 0 5px 0 0;
          border-left: 1px solid;
          border-bottom: 0;
        }
      }
    }
  }
  .mdv-checkbox, .mdv-radio {
    > label {
      margin-bottom: 0;
      padding-top: 4px;
    }
    .err.mdv-error {
      position: initial;
      clear: both;
      display: block;
      float: left;
      margin: 4px 0 0;
    }
    .mdv-item {
      &:after {
        content: "";
        display: block;
        clear: both;
      }
      > div {
        padding-top: 4px;
      }
    }
  }
  .mdv-checkbox.wo, 
  .mdv-radio.wo {
    > label {
      margin-bottom: 5px;
      padding-top: 0;
    }
  }
  .mdv-email .mdv-field, 
  .mdv-password .mdv-field {
	margin-bottom: 0;
  }
  .mdv-time, .mdv-date {
    .err.mdv-error {
      right: 35px;
    }
  }
  .mdv-time.nl .side, 
  .mdv-date.nl .side {
    > i {
      right: 20px;
    }
    > div {
      margin-right: 44px;
    }
  }
  .mdv-time.wi input, 
  .mdv-date.wi input {
    text-indent: 14.5px;
  }
}

.mdv-medium-large,
.mdv-medium,
.mdv-small, 
.mdv-custom,
.fit .mdv-field {
  float: left;
  clear: none;
  .mdv-fields {
    margin: 0;
  }
}
.mdv-medium-large {
  width: 66.66%;
}
.mdv-medium,
.fit .mdv-field {
  width: 50%;
}
.mdv-small {
  width: 33.33%;
}
.mdv-content.fit {
  .mdv-field {
    margin-bottom: 0;
    &:nth-child(1) input {
      border-radius: 5px 0 0 5px;
      border-right-width: 0;
    }
    &:nth-child(2) input {
      border-radius: 0 5px 5px 0;
    }
    .mdv-content {
      margin: 0;
    }
  }
  .mdv-fields {
    margin: 0;
  }
}

form.load button.mdv-button {
  &:after  {
    content: "";
    width: 4.8px;
    height: 4.8px;
    border-radius: 3.8px;
    box-shadow: 12px 0px 0 0 rgba(255, 255, 255, 0.2), 9.7px 7.1px 0 0 rgba(255, 255, 255, 0.4), 3.7199999999999998px 11.4px 0 0 rgba(255, 255, 255, 0.6), -3.7199999999999998px 11.4px 0 0 rgba(255, 255, 255, 0.8), -9.7px 7.1px 0 0 #FFF;
    animation: spinner-b87k6z 1s infinite linear;
    position: absolute;
  }
  & :where( i, span ) {
    visibility: hidden;
    opacity: 0;
  }
}
.mdv-builder {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  height: 100vh;
  .mdv-base {
    display: flex;
    flex-wrap: wrap;
    margin: 0 auto;
    max-width: 1366px;
    position: relative;
  }
  .mdv-header {
    width: 100%;
    background: #FFF;
    position: sticky;
    top: 0;
    border-bottom: 1px solid #ddd;
    -webkit-box-shadow: 0 5px 30px rgba(43, 135, 218, .2);
    box-shadow: 0 5px 30px rgba(43, 135, 218, .2);
	z-index: 11;
    .mdv-base {
      height: 58px;
      > div {
        display: flex;
        align-items: center;
        gap: 30px;
        padding: 0 25px;
      }
      .mdv-left {
        position: relative;
        & input {
          padding: 8px 15px;
          border-radius: 1000px;
          border: 0;
          width: 300px;
          background: #f0f0f1;
        }
        & code {
          position: absolute;
          right: 50px;
        }
      }
      .mdv-right {
        height: 100%;
        a {
          display: flex;
          align-items: center;
          gap: 10px;
          color: #000;
          font-weight: bold;
          &:hover {
            color: var(--mdev-color);
          }
        }
        button {
          position: absolute;
          right: 0;
          border-radius: 100px 0 0 100px;
        }
      }
    }
    .mdv-logo {
      display: flex;
      align-items: center;
      gap: 5px;
      font-weight: bold;
      font-size: 20px;
      & img {
        width: 70px;
      }
    }
    .mdv-view {
      position: absolute;
      right: 25px;
    }
  }
  .mdv-content {
    position: relative;
    .mdv-base {
      > div {
        overflow: auto;
        height: calc(100vh - 58px);
        padding: 25px;
      }
    }
    .mdv-left .mdv-field:hover {
      &:before  {
        content: "";
        position: absolute;
        top: -10px;
        bottom: -10px;    
        right: 0;
        left: 0;
        background: #2196f32e;
        border-radius: 5px;
      }
      >div>.mdv-action {
        display: flex;
      }
      .mdv-field:before {
        display: none;
      }
    }
    .mdv-button {
      display: none;
    }
  }        
  .mdv-left {
    width: 100%;
    margin-right: 450px;
    .mdv-preview .dn {
        display: block;
    }
  }
  .mdv-right {
    width: 450px;
    position: absolute;
    right: 0;
    -webkit-box-shadow: 0 5px 30px rgba(43, 135, 218, .2);
    box-shadow: 0 5px 30px rgba(43, 135, 218, .2);
    > div {
      display: none;
      & i.icn {
        height: 44px;
        padding: 12px;
        position: absolute;
        left: auto;
        right: 2px;
        margin-top: -46px;
        display: flex;
        align-items: center;
        background: #FFF;
        border-radius: 0 5px 5px 0;
      }
      .icnfrm {
        width: 100%;
        margin-top: 5px;
        position: absolute;
        z-index: 1;
        & iframe {
          width: 100%;
          height: 150px;
          border: 1px solid #000;
          background: #FFF;
          border-radius: 5px;
          z-index: 1;
        }
      }
    }
    .mdv-add-field {
      display: flex;
      flex-wrap: wrap;
      margin: -5px;
      & a {
        display: block;
        width: 50%;
        color: #000;
        & span {
          text-align: center;
          border: 1px solid;
          text-align: center;
          display: block;
          margin: 5px;
          padding: 15px 10px 10px;
          text-transform: capitalize;
          & i {
            display: block;
            margin-bottom: 5px;
          }
        }
        &:hover {
          color: var(--mdev-color);
        }
      }
    }
  }
  .mdv-title {
      margin: 0;
      padding-bottom: 20px;
  }
  .mdv-field-setting select {
    text-transform: capitalize;
  }
  .f-html {
      #setting-class-field-field, 
      .mdv-description {
        display: none;
      }
      #setting-class-container-field {
        width: 100%;
        float: none;
        & input {
          border-radius: 5px;
        }
      }
  }
  #setting-confirmation-field .mdv-fields {
    border: 1px solid;
    margin: 0;
    padding: 15px 10px 25px;
    border-radius: 5px;
  }
  #setting_custom_size {
    margin-top: 5px;
    display: none;
  }
  #setting-description-content-field {
    margin-bottom: 5px;
  }
  #setting-description-placement-field {
    display: none;
  }
  #form-mail-field {
    .mdv-tab {
      margin-top: 15px;
      display: none;
    }
    .mdv-tags {
      display: none;
      position: relative;
      & a {
        display: block;
      }
      > i {
        position: absolute;
        top: -48px;
        right: 0;
        border: 1px solid;
        height: 48px;
        padding: 12px;
        display: flex;
        align-items: center;
        background: #FFF;
        border-radius: 0 5px 5px 0;
        cursor: pointer;
      }
      > div {
        display: none;
        padding-top: 5px;
        width: 100%;
        position: absolute;
        z-index: 2;
        > div {
          border: 1px solid #000;
          border-radius: 5px;
          padding: 20px;
          background: #FFF;
          > a {
            display: block;
            cursor: pointer;
            &:hover {
              font-weight: bold;
            }
          }
        }
      }
      &:hover > div {
        display: block;
      }
    }
    .mdv-textarea .mdv-tags {
      top: -102px;
      > i {
        border-radius: 0 5px 0 0;
      }
    }
    .mdv-field:hover .mdv-tags {
      display: block;
    }
  }
  #form-ajax-field code {
    display: block;
    padding: 20px;
  }
}

.mdev .ui-menu, 
.mdev .ui-helper-hidden-accessible {
  display: none !important;
}

.mdv-core {
  display: none;
}

.page {
  .mdv-preview {
    width: 800px;
    max-width: 100%;
    padding: 20px;
    margin: 0 auto;
  }
  .mdv-checkbox, .mdv-radio {
    & label {
	  padding-top: 2px;
	}
  }
}

.wp-admin {
  & :where(.column-fields, .column-view) {
    text-align: center !important;
  }
  .mdv-field {
    & :where( input,textarea,select ) {
      padding: 12px;
      border: 1px solid #000;
      height: 48px;
      border-radius: 5px;
    }
    & select {
      padding: 0 12px;
      min-width: 100%;
      color: #2c3338;
    }
    & input[type=file] {
      padding: 12px;
    }
  }
  .create.mdv-form {
    .mdv-fields {
      margin-bottom: 0;
    }
    .mdv-button {
      position: absolute;
      top: 0;
      right: -1px;
      border-radius: 0 5px 5px 0;
    }
    .ntc {
      margin-bottom: 0;
    }
    .err.mdv-error {
      right: 60px;
      height: auto;
    }
    > .mdv-error {
      margin: 5px 0 0;
    }
  }
  .cf.mdv-modal .ntc {
    margin-bottom: 0;
  }
}

.post-php.post-type-mdevform {
  #wpcontent {
    padding: 0;
    margin-top: -32px;
    .mdev {
      display: block !important;
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
    }
    .mdv-header {
      top: 32px;
      .mdev-left .mdv-btn {
        padding: 8px 15px;
        border-radius: 100px;
        border: 0;
        height: auto;
      }
    }
    .mdv-content > .mdv-base > div {
      padding-top: 57px;
    }
  }
  #wpfooter {
    display: none;
  }
}

@media (max-width:680px) {
  .mdv-medium-large, 
  .mdv-medium, 
  .mdv-small, 
  .mdv-custom, 
  .fit .mdv-field {
    float: none;
    clear: both;
    width: auto !important;
  }
  .err.mdv-error {
    position: initial;
    margin: 5px 0 0
  }
  .sn .err.mdv-error {
    font-size: 12px;
    &:before {
      display: none;
    }
  }
}

@keyframes spinner-b87k6z {
  to {
     transform: rotate(360deg);
  }
}

@keyframes spinner-c7wet2 {
   100% {
      transform: rotate(1turn);
   }
}