/* General */
.newsx-flex {
  display: flex;
  flex-wrap: wrap;
}

.newsx-inline-flex {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  align-content: center;
}

.newsx-svg-icon svg {
  width: 100%;
  height: 100%;
}

.newsx-control-tooltip {
  display: none;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -115%);
  z-index: 2;
  width: 100px;
  padding: 3px 7px 6px;
  font-size: 12px;
  line-height: 1;
  background: #333;
  color: #fff;
  border-radius: 3px;
}

/* TODO: Experimental */
.wp-customizer .wp-block-legacy-widget__edit-form {
  overflow: visible;
  max-height: none;
}

.wp-block-legacy-widget__edit-form .widget-inside {
  padding-left: 0;
  padding-right: 0;
}

/* Disable Preview for better Visibility */
.block-editor-block-list__layout .wp-block {
  margin-bottom: 20px;
}

.wp-block-legacy-widget__edit-form[hidden] {
  display: block;
  cursor: pointer;
}

.wp-block-legacy-widget__edit-form[hidden]:after {
  content: "Edit Widget";
  position: relative;
  top: -7px;
  color: #5d5d5d;
  font-size: 12px;
}

.wp-block-legacy-widget__edit-form[hidden] .widget.open,
.wp-block-legacy-widget__edit-preview {
  display: none;
}

/* Sections */
.newsx-widget-section-title.active + .newsx-widget-section-content {
  display: block;
}

.newsx-widget-section-content {
  display: none;
}

.newsx-widget-section-title {
  position: relative;
  padding: 7px 10px 9px;
  color: #444;
  background-color: #f9f9f9;
  border: none;
  border-left: 2px solid #d2d2d2;
  font-size: 13px !important;
  font-weight: 500;
  cursor: pointer;
}

.newsx-widget-section-title.active {
  border-color: #0284C7;
}

.newsx-widget-section-title:after {
  content: "\f139";
  font-family: dashicons;
  position: absolute;
  right: 8px;
  font-size: 16px;
}

.newsx-widget-section-title.active:after {
  content: "\f140";
  font-family: dashicons;
}

.wp-block-legacy-widget__edit-form .widget-inside .newsx-widget-field input,
.wp-block-legacy-widget__edit-form .widget-inside .newsx-widget-field select,
.wp-block-legacy-widget__edit-form .widget-inside .newsx-widget-field .select2-selection {
  color: #232323 !important;
  border-color: #e8e8e8 !important;
  padding: 0 7px !important;
  line-height: 16px !important;
}

/* Fields */
.newsx-widget-field {
  margin-bottom: 10px;
}

.newsx-widget-section-content .newsx-widget-field:last-child {
  margin-bottom: 25px;
}

.newsx-widget-field-label {
  display: flex;
}

.newsx-widget-field-label,
.wp-block-legacy-widget__edit-form .widget-inside .newsx-widget-field input,
.wp-block-legacy-widget__edit-form .widget-inside .newsx-widget-field select,
.wp-block-legacy-widget__edit-form .widget-inside .newsx-widget-field .select2-selection {
  color: #4c4c4c !important;
}

.newsx-widget-field-description {
    display: block;
    font-size: 12px;
    color: #777;
    line-height: 1.3;
    margin-top: 10px;
}

.newsx-widget-field-description a {
    color: #0e6a9e !important;
}

/* Separator */
.newsx-widget-field-separator {
  height: 1px;
  background: #dcdcdc;
  margin: 20px 0;
}

/* Controls Group Title (Inside Section) */
.newsx-widget-control-group-title {
  position: relative;
  margin: 18px 0 0 0;
  font-size: 13px;
  color: #444;
}

.newsx-widget-control-group-title span {
  background-color: #fff;
  position: relative;
  z-index: 1;
  padding-right: 10px;
}

.newsx-widget-control-group-title:after {
  content: ' ';
  display: block;
  position: absolute;
  top: 60%;
  left: 0;
  height: 1px;
  width: 100%;
  background-color: #e8e8e8;
}

#accordion-section-newsx_section_hd_bottom,
#accordion-section-newsx_section_ft_bottom {
  margin-bottom: 20px;
}

#accordion-section-newsx-site-identity {
  margin-top: 20px;
}

/* Responsive Control */
.newsx-responsive-control {
  display: none !important;
}

.newsx-responsive-control.active {
  display: block !important;
}

.newsx-responsive-switcher {
  padding: 0;
  margin: 5px 10px;
}

.newsx-responsive-switcher li {
  align-items: center;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  height: 22px;
  justify-content: center;
  margin-right: 3px;
  position: relative;
  transition: all .2s;
  width: 22px;
}

.newsx-responsive-switcher .dashicons {
  font-size: 11px;
  width: 11px;
  height: 11px;
}

.newsx-responsive-switcher li.active {
  background-color: #eee;
}

/* Radio Image */
.newsx-radio-image-inner {
  max-width: 300px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.newsx-radio-image-inner > div {
  position: relative;
}

.newsx-radio-image-inner > div:hover .newsx-control-tooltip {
  display: block;
  text-align: center;
}

.wp-customizer .newsx-radio-image-inner {
  gap: 5px;
}

.newsx-radio-image-inner input {
  display: none;
}

.newsx-radio-image-inner input + label {
  display: inline-flex;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  border-radius: 3px;
  padding: 5px;
  border-radius: 3px;
  cursor: pointer;
}

.newsx-radio-image-inner input + label svg {
  border-radius: 3px;
}

.wp-customizer .newsx-radio-image-inner input + label {
  padding: 3px 3px 0 3px;
}

.newsx-radio-image-inner input[type="radio"]:checked + label {
  background-color: #0284c7;
  border-color: #0284c7;
  box-shadow: 0 10px 18px -8px rgb(0 0 0 / 20%);
  opacity: 0.9;
}

.newsx-radio-image-inner input:checked + label svg .st0 {
  fill: #0284c7;
}

.newsx-radio-image-inner input:checked + label svg .st1 {
  fill: #fff;
}

/* Switcher Control */
.newsx-widget-field-switcher .newsx-widget-field-label {
  justify-content: space-between;
  align-items: center;
}

.newsx-widget-field-label .switcher {
  display: none;
}

.newsx-widget-field-label .switcher + .switcher-label {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  background-color: #d9d8d8;
  border-radius: 10px;
  cursor: pointer;
}

.newsx-widget-field-label .switcher:checked + .switcher-label {
  background-color: #0284C7;
}

.newsx-widget-field-label .switcher-label::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  background-color: #fff;
  transition: 0.3s;
}

.newsx-widget-field-label .switcher:checked + .switcher-label::before {
  transform: translateX(16px);
}

/* Visibility Control */
.newsx-widget-field .newsx-visibility ul {
  padding: 0;
}

.newsx-widget-field .newsx-visibility ul li label:before {
  font: normal 13px/27px dashicons;
}

.newsx-widget-field .newsx-visibility ul li label:hover:after {
  top: -80%;
  line-height: 1;
}

.wp-customizer .newsx-widget-field .newsx-visibility ul li label span {
  display: none;
}

/* Select2 */
.select2-selection--multiple {
  padding: 10px !important;
}

.select2-container--open {
  z-index: 999999999;
}

.select2-search__field {
  border: none !important;
}

.select2-container--open .select2-dropdown {
  border-color: #e8e8e8;
}

.select2-results__option--selected {
  background-color: #f0f0f0 !important;
  color: #333 !important;
}

.select2-results__option--selected:hover {
  color: #f44 !important;
}

.select2-selection__choice {
  font-size: 12px !important;
  padding: 1px 10px 3px 16px !important;
  border-radius: 3px !important;
  border: none !important;
  background-color: #f0f0f0 !important;
}

.select2-selection__choice__remove {
  border: none !important;
  font-size: 13px !important;
  line-height: 1 !important;
  background: transparent !important;
  color: #555 !important;
  margin-top: 2px !important;
}

.select2-selection__choice__remove:hover {
  color: #f03030 !important;
}

/* Pro Features */
.newsx-widget-section-title.newsx-pro-section {
  display: flex;
  align-items: center;
  color: #ea2a0d;
  border-color: #ea2a0d !important;
}

.newsx-widget-section-title.newsx-pro-section .dashicons-star-filled {
  width: 11px;
  height: 11px;
  font-size: 11px;
  margin-left: 3px;
}

.newsx-widget-control-pro-features ul {
  padding: 0;
  padding-top: 10px;
  list-style-type: none;
  color: #444;
}

.newsx-widget-control-pro-features ul li {
  display: flex;
  align-items: center;
  font-size: 12px;
  margin-bottom: 8px;
}

.newsx-widget-control-pro-features ul li .dashicons {
  width: 14px;
  height: 14px;
  font-size: 14px;
  color: #1583c3;
}

.newsx-widget-control-pro-features a.newsx-upgrade-pro-button {
  display: block;
  margin-top: 20px;
  margin-left: 5px;
  font-size: 13px;
  font-weight: bold !important;
  color: #1583c3 !important;
}