/* Joinchat settings page */
#joinchat_form {
  --joinchat-ico: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="36" height="36"><path fill="%23fff" d="M3.516 3.516c4.686-4.686 12.284-4.686 16.97 0 4.686 4.686 4.686 12.283 0 16.97a12.004 12.004 0 01-13.754 2.299l-5.814.735a.392.392 0 01-.438-.44l.748-5.788A12.002 12.002 0 013.517 3.517zm3.61 17.043l.3.158a9.846 9.846 0 0011.534-1.758c3.843-3.843 3.843-10.074 0-13.918-3.843-3.843-10.075-3.843-13.918 0a9.846 9.846 0 00-1.747 11.554l.16.303-.51 3.942a.196.196 0 00.219.22l3.961-.501zm6.534-7.003l-.933 1.164a9.843 9.843 0 01-3.497-3.495l1.166-.933a.792.792 0 00.23-.94L9.561 6.96a.793.793 0 00-.924-.445 1291.6 1291.6 0 00-2.023.524.797.797 0 00-.588.88 11.754 11.754 0 0010.005 10.005.797.797 0 00.88-.587l.525-2.023a.793.793 0 00-.445-.923L14.6 13.327a.792.792 0 00-.94.23z"/></svg>');
  --color: hsl(var(--ch, 142) var(--cs, 70%) var(--cl, 49%));
  --text: hsl(0 0% clamp(0%, var(--bw, 1)*1000%, 100%) / clamp(70%, var(--bw, 1)*1000%, 100%));
}

.joinchat-hidden {
  display: none !important;
}

.joinchat-dimmed {
  opacity: .33;
  transition: opacity 0.2s;
}

#joinchat_form ::-moz-placeholder {
  font-style: italic;
  opacity: .5;
}

#joinchat_form ::placeholder {
  font-style: italic;
  opacity: .5;
}

#joinchat_form hr {
  margin: 20px 0 40px;
}

.js #joinchat_form textarea {
  overflow: hidden;
  min-height: 100px;
}

.joinchat-tab {
  display: none;
}

.joinchat-tab-active {
  display: block !important;
}

#navtab_premium {
  color: #f9603a;
}

#joinchat_form .joinchat__visibility__wrapper hr {
  margin: 5px 0;
}

.joinchat__visibility__wrapper tr:hover {
  background: rgba(0, 0, 0, .05);
}

.joinchat__visibility__wrapper th,
.joinchat__visibility__wrapper td {
  padding: 7px 15px;
}

.joinchat__visibility__wrapper label {
  margin-right: 15px;
}

.joinchat__visibility__wrapper .dashicons {
  opacity: .5;
}

.joinchat__visibility__wrapper input[type=radio]+span {
  transition: all 200ms;
}

.joinchat__visibility__wrapper input[type=radio]:checked+span {
  color: #79ba49;
  opacity: 1;
}

.joinchat__visibility__wrapper input[type=radio]:checked+.dashicons-hidden {
  color: #ca4a1f;
}

.joinchat-show-help {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  line-height: 1.1em;
  border-radius: 50%;
  background: #999;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
}

.joinchat-show-help:hover,
.joinchat-show-help:active,
.joinchat-show-help:focus {
  background: #444;
  color: #fff;
}

#tab-panel-styles-and-vars span {
  white-space: nowrap;
}

.form-table td p.joinchat-addon {
  display: inline-block;
  padding: 0 6px;
  border-radius: 3px;
  background: #fffbe5;
  font-size: 13px;
}

/* Button ico field */
.form-table td .joinchat__button_ico label {
  margin: 0 0.5em 0.25em 0 !important;
}

.joinchat__button_ico input {
  position: absolute;
  opacity: 0;
}

.joinchat__button_ico span {
  display: block;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color, #25d366);
  overflow: hidden;
  /* for SVG fill */
  color: var(--text, #fff);
}

.joinchat__button_ico svg {
  width: 100%;
  height: 100%;
  margin: 0;
}

.joinchat__button_ico label:first-child span {
  background: #25d366 var(--joinchat-ico) no-repeat center;
}

.joinchat__button_ico label:hover span {
  box-shadow: 0 0 0 3px #5b9dd9;
}

.joinchat__button_ico input:checked+span {
  box-shadow: 0 0 0 3px #0073aa;
}

.joinchat__button_ico input:focus+span {
  box-shadow: 0 0 0 3px #0073aa, 0 0 2px 4px rgba(30, 140, 190, 0.8);
}

/* Button image field */
#joinchat_button_image_wrapper {
  position: relative;
  min-height: 60px;
  padding: 2px 0 0 80px;
}

#joinchat_button_image_wrapper p {
  margin-top: 8px;
  transition: opacity 0.2s;
}

#joinchat_button_image_wrapper p label+label {
  margin-left: 10px;
}

#joinchat_button_image_wrapper.no-image #joinchat_button_image_remove {
  display: none;
}

#joinchat_button_image_wrapper.no-image p {
  opacity: .33;
}

#joinchat_button_image_holder {
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  width: 60px;
  height: 60px;
  border: 1px solid #25d366;
  border-radius: 50%;
  background: #25d366 var(--joinchat-ico) no-repeat center;
  box-shadow: 1px 6px 24px 0 rgba(7, 94, 84, .24);
  overflow: hidden;
}

#joinchat_button_image_holder img,
#joinchat_button_image_holder video {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: center;
     object-position: center;
}

[dir=rtl] #joinchat_button_image_wrapper {
  padding: 8px 80px 0 0;
}

[dir=rtl] #joinchat_button_image_holder {
  right: 0;
  left: auto;
}

.joinchat_vars_help {
  margin-top: 5px;
  font-size: 11px;
  font-weight: normal;
  line-height: 1.9;
  opacity: 0;
  transition: opacity 0.2s ease-out 0.2s;
}

tr:hover .joinchat_vars_help,
tr.joinchat--focus .joinchat_vars_help {
  opacity: 1;
  transition-delay: 0.5s;
}

.joinchat_vars_help code {
  -webkit-user-select: all;
  -moz-user-select: all;
  user-select: all;
  padding: 2px 1px;
  font-size: inherit;
  vertical-align: bottom;
}

.joinchat_vars_help code:hover {
  background: rgba(0, 0, 0, 0.2);
}

@media screen and (max-width: 782px) {
  .joinchat_vars_help {
    margin-top: 2px;
    opacity: 1;
  }

  .joinchat_vars_help br {
    display: none;
  }

  .iti {
    width: 18em;
  }

  .iti--fullscreen-popup {
    width: auto;
    z-index: 99999;
  }
}

#joinchat_form .button.dashicons-before::before {
  vertical-align: -27%;
  margin-right: 6px;
}

#joinchat_form .large-text {
  max-width: 800px;
}

#joinchat_form .iris-picker {
  visibility: visible;
}

#joinchat_form .joinchat_color_text {
  vertical-align: top;
}

#joinchat_form .joinchat_color_text .button::after {
  content: 'T';
  display: inline-block;
  color: #fff;
  text-shadow: 0 1px 2px #0008;
  font-size: 22px;
  font-weight: bold;
  line-height: 1;
  vertical-align: -10%;
}

#joinchat_form .joinchat_color_text .button.black::after {
  color: rgba(0, 0, 0, 0.7);
}

#joinchat_form .joinchat_color_text .button:has(input:checked) {
  background-color: #dcdcde;
  color: #135e96;
  border-color: #0a4b78;
  box-shadow: inset 0 2px 5px -3px #0a4b78;
}

#wp-joinchat_optin_text-editor-container {
  max-width: 800px;
}

.joinchat-gads {
  display: inline-block;
  padding: 0 0 0 8px;
  margin: 0 1px;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  background-color: #fff;
  color: #2c3338;
  line-height: 2;
  box-shadow: 0 0 0 transparent;
  cursor: text;
}

.joinchat-gads:focus-within {
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
  outline: 2px solid transparent;
}

.joinchat-gads input {
  display: inline-block !important;
  padding: 0 6px;
  border: none;
  background: transparent;
}

#joinchat_form .CodeMirror {
  font-size: 13px;
}

/* Help */

.toplevel_page_joinchat .help-tab-content li ul,
.settings_page_joinchat .help-tab-content li ul {
  margin-top: 6px;
}

.toplevel_page_joinchat .help-tab-content li li,
.settings_page_joinchat .help-tab-content li li {
  list-style-type: circle;
}

.toplevel_page_joinchat .help-tab-content code,
.settings_page_joinchat .help-tab-content code {
  -webkit-user-select: all;
  -moz-user-select: all;
  user-select: all;
}

/* Joinchat metabox */

.joinchat-metabox .iti,
.joinchat-metabox .iti input,
.joinchat-metabox textarea {
  max-width: 99%;
}

.joinchat-metabox code {
  -webkit-user-select: all;
  -moz-user-select: all;
  user-select: all;
  padding: 2px 1px;
  font-size: smaller;
  vertical-align: baseline;
}

.joinchat-metabox .dashicons {
  opacity: .5;
}

.joinchat-metabox ::-moz-placeholder {
  opacity: .5;
}

.joinchat-metabox ::placeholder {
  opacity: .5;
}

.joinchat-metabox input[type=radio] {
  margin-right: 1px;
}

.joinchat-metabox input[type=radio]+span {
  margin-right: 5px;
  transition: all 200ms;
}

.joinchat-metabox input[type=radio]:checked+span {
  color: #79ba49;
  opacity: 1;
}

.joinchat-metabox input[type=radio]:checked+.dashicons-hidden {
  color: #ca4a1f;
}

.js .joinchat-metabox textarea {
  overflow: hidden;
  min-height: 3em;
}

/* Joinchat term metabox */

.form-field.joinchat-metabox input[type=radio] {
  margin-right: 4px;
}

.form-field.joinchat-metabox input[type=radio]+span {
  margin-right: 15px;
}

.form-field.joinchat-metabox .iti__search-input {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

/* Joinchat adminbar */

#jcadminbar {
  position: relative;
  min-height: 50px;
  background: #fff;
  filter: drop-shadow(0 0px 2px #0003);
}

#jcadminbar:before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  bottom: 0;
  left: -200px;
  width: 200px;
  background: inherit;
}

.joinchat-header {
  padding: 5px 30px 1px 0;
  overflow: auto;
}

#jcadminbar h1 {
  float: left;
  margin: 0;
}

#jcadminbar~#wpbody .wrap {
  margin-top: 30px;
}

#jcadminbar~#wpbody .wp-header-end+.notice {
  margin-top: 40px;
}

[dir=rtl] #jcadminbar:before {
  left: auto;
  right: -200px;
}

@media screen and (max-width: 600px) {
  #jcadminbar {
    top: 46px;
  }
}

/* Coupon */

.joinchat-coupon {
  float: right;
  margin: 10px 0;
  color: #000;
}

.joinchat-coupon span {
  display: inline-block;
  padding: 0 10px;
  margin: 0 10px;
  border: 2px dashed #F9603A;
  border-radius: 4px;
  background: rgba(249, 96, 58, 0.15);
}

.joinchat-coupon a {
  white-space: nowrap;
}

@media screen and (max-width: 600px) {
  .joinchat-coupon {
    display: none;
  }
}

/* Preview */

.joinchat_preview_control {
  position: -webkit-sticky;
  position: sticky;
  z-index: 10;
  top: 30px;
  height: 0;
  text-align: right;
}

#joinchat_preview_show {
  margin-top: 10px;
  vertical-align: top;
}

#joinchat_preview_show:before {
  content: "\f115";
}

:root {
  --preview-width: 380px;
  --preview-top: 46px;
}

#joinchatprev {
  display: none;
  position: fixed;
  z-index: 6;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--preview-width);
  padding-top: 32px;
  background: #fff;
  border-left: 1px solid #dcdcde;
}

.jcpreview #joinchatprev {
  display: block;
}

.jcpreview #wpcontent,
.jcpreview #wpfooter {
  margin-right: var(--preview-width);
}

#joinchatprev__resize {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  cursor: ew-resize;
}

#joinchatprev__devices {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--preview-top);
}

#joinchatprev__devices .dashicons {
  vertical-align: sub;
}

#joinchat_preview {
  width: 100%;
  height: calc(100% - var(--preview-top));
}

body.jcpreview-resize {
  cursor: ew-resize !important;
}

body.jcpreview-resize #joinchatprev__resize {
  width: 100%;
}

[dir=rtl] .joinchat_preview_control {
  text-align: left;
}

[dir=rtl] #joinchat_preview_show:before {
  margin-right: 0;
  margin-left: 5px;
}

[dir=rtl] #joinchatprev {
  left: 0;
  right: auto;
  border-left: none;
  border-right: 1px solid #dcdcde;
}

[dir=rtl] .jcpreview #wpcontent,
[dir=rtl] .jcpreview #wpfooter {
  margin-right: 160px;
  margin-left: var(--preview-width);
}

[dir=rtl] .folded.jcpreview #wpcontent,
[dir=rtl] .folded.jcpreview #wpfooter {
  margin-right: 36px;
}

[dir=rtl] #joinchatprev__resize {
  left: auto;
  right: 0;
}

@media screen and (max-width: 782px) {

  #joinchat_form .joinchat_color_text .button {
    min-height: 30px;
    line-height: 2.15384615;
  }

  :root {
    --preview-width: 0px !important;
    --preview-top: 0px;
  }

  #joinchatprev {
    width: 100%;
  }

  #joinchatprev__devices {
    display: none;
  }

  #joinchat_preview_show {
    margin-top: 20px;
  }
}

@media screen and (max-width: 600px) {
  .joinchat_preview_control {
    top: 0;
  }

  #joinchat_preview_show {
    margin-top: 10px;
  }
}
