/* Version: 1.20.05 */
.wptag-input-enhanced > .wtemplateInput {
    padding-left: calc(10px + var(--wptag-input-left) * 36px);
    padding-right: calc(10px + var(--wptag-input-right) * 36px);
}
.wptag-input-actions {
    position: absolute;
    top: 0;
    display: flex;
    height: 40px;
    z-index: 1;
}
.wptag-input-actions-left { left: 0; }
.wptag-input-actions-right { right: 0; }
.wptag-input-actions .uk-form-icon {
    position: static;
    width: 36px;
    min-width: 36px;
    height: 40px;
}
.wptag-input-actions button.uk-form-icon {
    border: 0;
    background: transparent;
    cursor: pointer;
}
.wptag-password-strength { margin-top: 6px; }
.wptag-password-strength .uk-progress { height: 5px; margin-bottom: 4px; }
.wptag-password-strength[data-score="0"] progress { accent-color: #d32f2f; }
.wptag-password-strength[data-score="1"] progress { accent-color: #ef6c00; }
.wptag-password-strength[data-score="2"] progress { accent-color: #f9a825; }
.wptag-password-strength[data-score="3"] progress { accent-color: #689f38; }
.wptag-password-strength[data-score="4"] progress { accent-color: #2e7d32; }
#wptag-sync-db-progress, #wptag-sync-content-progress {
    position: relative;
}

#wptagQuickMenuToggle {
    background: white;
}

#wptag-sync-db-status, #wptag-sync-content-status {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 100%;
    line-height: 2.3em;
    text-align: center;
    font-weight: 600;
    font-size: 1.1em;
    color: #222;
    background: transparent;
    pointer-events: none;
    z-index: 2;
    text-shadow: 0 1px 5px #fff, 0 1px 0 #fff;
}
#wptag-sync-db-progress progress,
#wptag-sync-content-progress progress {
    width: 100%;
    position: relative;
    z-index: 1;
}

#wp-admin-bar-wptag-default > li {
    padding-bottom: 3px !important;
}

:root {
  --switch-size: 33px;   /* Cambia qui la dimensione base */
}

.wSwitch {
  display: none !important;
}

.wSwitch-label {
  --switch-width: var(--switch-size);
  --switch-height: calc(var(--switch-size) * 0.545);    /* 44:24 ≈ 1:0.545 */
  --knob-size: calc(var(--switch-size) * 0.454);        /* 44:20 ≈ 1:0.454 */
  --knob-offset: calc((var(--switch-height) - var(--knob-size)) / 2);

  display: inline-block;
  width: var(--switch-width);
  height: var(--switch-height);
  background: #ccc;
  border-radius: var(--switch-height);
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
}

.wSwitch-label::after {
  content: "";
  position: absolute;
  left: var(--knob-offset);
  top: var(--knob-offset);
  width: var(--knob-size);
  height: var(--knob-size);
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  transition: left 0.3s;
}

.wSwitch:checked + .wSwitch-label {
  background: #4caf50;
}

.wSwitch:checked + .wSwitch-label::after {
  left: calc(var(--switch-width) - var(--knob-size) - var(--knob-offset));
}

/* Accessibilità & disabled */
.wSwitch:focus + .wSwitch-label {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
.wSwitch:disabled + .wSwitch-label {
  filter: grayscale(1);
  opacity: .55;
  cursor: not-allowed;
}

[data-wtemplate]:not(.w-rendered) {
    display: none !important;
}
[data-wtemplate].w-rendered {
    display: block !important;
}


.wWarning { color: #e00; font-size: 0.95em;  }
.wWarningMsg { color: #e00; font-size: 0.95em; }

/* Banner box */



#wpTag_switchUserBanner,
#wpTag_stageSwitcher {
    background: rgba(255,255,255,0.97) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(80,40,120,0.10) !important;
    padding: 8px 15px 8px 8px !important;
    display: flex !important;
    align-items: stretch !important;
    gap: 10px !important;
    z-index: 99999 !important;
}

/* Button group uniform */
#wpTag_switchUserBanner .uk-button-group,
#wpTag_stageSwitcher .uk-button-group {
    display: flex !important;
    gap: 10px !important;
}

/* Button style */
#wpTag_switchUserBanner .uk-button,
#wpTag_stageSwitcher .uk-button {
    border-radius: 7px !important;
    min-width: 38px;
    min-height: 38px;
    box-shadow: none !important;
    margin: 0 !important;
    font-size: 15px !important;
    transition: background 0.12s;
    display: flex;
    align-items: center;
    font-weight: 600;
}

/* Handle icon spacing */
#wpTag_switchUser_drag .uk-icon,
#wpTag_stageSwitcher_drag .uk-icon {
    margin-right: 0 !important;
}

/* Esci button icon margin */
#wpTag_switchUserBanner .uk-button-danger .uk-icon,
#wpTag_stageSwitcher .uk-button-danger .uk-icon {
    margin-right: 7px !important;
}

/* Dropdown */
#wpTag_switchUserDropdown,
#wpTag_stageDropdown {
    border-radius: 9px !important;
    box-shadow: 0 4px 20px rgba(80,40,120,0.10) !important;
    border: 1px solid #e00 !important;
    min-width: 260px;
    padding: 16px 24px;
    background: #fff;
    font-size: 15px;
    margin-top: 0 !important;
    margin-left: 0 !important;
    z-index: 99999 !important;
}

#wpTag_switchUserDropdown ul,
#wpTag_stageDropdown ul {
    padding: 10px 12px !important;
    margin: 0 !important;
    list-style: none !important;
}

#wpTag_switchUserDropdown li,
#wpTag_stageDropdown li {
    margin-bottom: 5px;
}

.wptag-footable-inline-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px 28px;
    align-items: center;
    gap: 4px;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

.wptag-footable-inline-editor .wptag-footable-inline-input,
.wptag-footable-inline-editor .wptag-footable-inline-select,
.wptag-footable-inline-editor .select2-container {
    width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
}

.wptag-footable-inline-compact .wptag-footable-inline-input,
.wptag-footable-inline-compact .wptag-footable-inline-select,
.wptag-footable-inline-compact .select2-container {
    grid-column: 1 / -1;
}

.wptag-footable-inline-compact .wptag-footable-inline-save {
    grid-column: 2;
}

.wptag-footable-inline-compact .wptag-footable-inline-cancel {
    grid-column: 3;
}

.wptag-footable-inline-editor .wptag-footable-inline-input {
    height: 28px;
    padding: 0 6px;
    border: 1px solid #9b9fa3;
    border-radius: 20px;
}

.wptag-footable-inline-action {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 50%;
    color: #fff;
    font-size: 19px;
    line-height: 1;
    text-align: center;
    cursor: pointer;
}

.wptag-footable-inline-save {
    background: #6aba5f;
    border-color: #6aba5f;
}

.wptag-footable-inline-cancel {
    background: #ed4062;
    border-color: #ed4062;
}

.wptag-footable-inline-action:hover,
.wptag-footable-inline-action:focus {
    background: #fff;
}

.wptag-footable-inline-save:hover,
.wptag-footable-inline-save:focus {
    color: #6aba5f;
}

.wptag-footable-inline-cancel:hover,
.wptag-footable-inline-cancel:focus {
    color: #ed4062;
}

.wptag-footable-inline-action:disabled {
    opacity: .6;
    cursor: wait;
}

/* Responsive mobile: più piccolo sopra/sotto, font più piccolo */
@media (max-width: 600px) {
    #wpTag_switchUserBanner,
    #wpTag_stageSwitcher {
        padding: 5px 7px 5px 5px !important;
        top: 8px !important;
        right: 8px !important;
        left: 8px !important;
        font-size: 13px !important;
    }
    #wpTag_switchUserDropdown,
    #wpTag_stageDropdown {
        min-width: 160px !important;
        padding: 9px 10px !important;
        font-size: 13px !important;
    }
}

/* Variante compatta dei Select2 inseriti accanto a un'etichetta. */
.wptag-object-select2 select.wptag-select2-inline + .select2-container {
    display: block;
    width: 100% !important;
    min-width: 0;
}
.wptag-object-select2 select.wptag-select2-inline + .select2-container .select2-selection--single {
    height: 36px;
    border-radius: 20px;
}
.wptag-object-select2 select.wptag-select2-inline + .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 34px;
    padding-left: 12px;
}
.wptag-object-select2 select.wptag-select2-inline + .select2-container .select2-selection--single .select2-selection__arrow {
    height: 34px;
}
.wptag-object-select2 select.wptag-select2-inline + .select2-container .select2-selection--multiple {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 36px;
    height: auto;
    border-radius: 20px;
    padding: 0 24px 0 3px;
}
.wptag-object-select2 select.wptag-select2-inline + .select2-container .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: auto;
    padding: 0 4px;
}
.wptag-object-select2 select.wptag-select2-inline + .select2-container .select2-selection--multiple .select2-selection__choice {
    margin-top: 0;
}
.wptag-object-select2 select.wptag-select2-inline + .select2-container .select2-selection--multiple .select2-selection__clear {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}
.wptag-object-select2 select.wptag-select2-inline + .select2-container .select2-search__field {
    max-width: 100%;
    height: 24px;
    margin: 0 0 0 5px;
    padding: 0;
}
.wptag-object-select2 select.wptag-select2-inline + .select2-container .select2-search__field:not([placeholder=""]) {
    width: 16em !important;
}
.wptag-object-select2 select.wptag-select2-inline + .select2-container .select2-search__field[placeholder=""] {
    width: 4em !important;
}
