/* Modern accessible admin styles */

/* Keep Contact Forms menu icon colored (prevent WordPress grayscale filter) */
#adminmenu .toplevel_page_accua_forms .wp-menu-image img {
  opacity: 1 !important;
  filter: none !important;
}

/* ==========================================================================
   Widget Accordion Animation (form field editor)
   Uses CSS transitions instead of jQuery slideDown/slideUp for smoother UX
   ========================================================================== */

/* Widget-inside: collapsed state (default) - use display:none like original */
#accua_forms_edit_page #widgets-right .widget .widget-inside {
  display: none;
}

/* Widget-inside: expanded state (.open class on parent .widget) */
#accua_forms_edit_page #widgets-right .widget.open .widget-inside {
  display: block;
}

/* Rotate caret icon when widget is open */
#accua_forms_edit_page #widgets-right .widget.open a.widget-action:after {
  transform: rotate(90deg);
}

/* Respect reduced motion preference for accessibility */
@media (prefers-reduced-motion: reduce) {
  #accua_forms_edit_page #widgets-right a.widget-action:after {
    transition: none;
  }
}

input[type="text"].accua_form_value, textarea.accua_form_value {
  width: 95%;
  margin-right: 5%;
}

/* Widget control actions layout for save button positioning */
#accua_forms_edit_page .widget-control-actions .alignright {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

#accua_forms_edit_page .sidebar-name-arrow {
  display: none !important;
}
/*
#accua_forms_edit_page #widgets-left .widget-holder, #accua_forms_edit_page #widgets-right .widgets-sortables {
  overflow-y: scroll !important;
  overflow-x: hidden !important;
  height: 400px;
  min-height: 400px;
}*/

#accua_forms_edit_page .widget-liquid-left {
  width: 100% !important;
}

#accua_forms_edit_page #widgets-left .widget {
  width: 98% !important;
  margin-bottom: 7px !important;
  float: none !important;
}

.accua-form-widget-scroll-wrapper {
  width: 100% !important;
}

.accua-form-widget-scroll-wrapper .ui-resizable-handle, #accua_form_preview_area_wrapper .ui-resizable-handle {
  background: #ddd;
  bottom: -10px;
  height: 7px;
  border-radius: 3px;
}

.accua-form-widget-scroll-wrapper.ui-resizable > *:first-child {
  /*min-height: auto !important;
  height: 100% !important;
  max-height: none !important;*/
  width: auto !important;
  /*overflow-y: scroll !important;
  overflow-x: hidden !important;*/
  margin: 0 !important;
  padding: 0 !important;
}

.accua-form-widget-scroll-wrapper > *:first-child p.description {
  padding-top: 5px;
}

/* Widget header - proper vertical centering */
#accua_forms_edit_page #widgets-right .widget-top {
  display: flex;
  align-items: center;
}

#accua_forms_edit_page #widgets-right .widget-title-action {
  position: static;
  order: 2;
  display: flex;
  align-items: center;
  height: auto;
}

#accua_forms_edit_page #widgets-right .widget-title {
  flex: 1;
  order: 1;
}

/* Widget toggle button */
#accua_forms_edit_page #widgets-right a.widget-action {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  color: #555d66;
  text-decoration: none;
  box-shadow: none;
  outline: none;
}

#accua_forms_edit_page #widgets-right a.widget-action:hover,
#accua_forms_edit_page #widgets-right a.widget-action:focus,
#accua_forms_edit_page #widgets-right a.widget-action:active {
  color: #23282d;
  text-decoration: none;
  box-shadow: none;
}

#accua_forms_edit_page #widgets-right a.widget-action:after {
  content: "\f140";
  font: 400 1.25rem/1 dashicons;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#accua_forms_edit_page #widgets-right a.widget-action:focus:after {
  box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, 0.8);
  border-radius: 50%;
}

#accua_forms_edit_page .sidebar-name {
  cursor: auto !important;
}


/* ==========================================================================
   Reusable AccuaTabs component
   ========================================================================== */

/* --- Shared base --- */

.accua-tabs:not(.is-initialized) > .accua-tabs__panel:not(:first-of-type) {
  display: none;
}

.accua-tabs__panel[hidden] {
  display: none;
}

.accua-tabs__tablist {
  display: flex;
  margin: 0;
  padding: 0;
}

.accua-tabs__tab {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.accua-tabs__tab:focus-visible {
  outline: 2px solid var(--wp-admin-theme-color, #3858e9);
  outline-offset: -2px;
  border-radius: 2px;
}

/* --- Primary variant (outer/main tabs) — underline indicator --- */

.accua-tabs--primary > .accua-tabs__tablist,
.accua-tabs--primary > .accua-tabs__header > .accua-tabs__tablist {
  border-bottom: 1px solid #c3c4c7;
  gap: 0;
}

.accua-tabs--primary .accua-tabs__tab {
  padding: 12px 16px;
  color: #50575e;
  font-weight: 400;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.accua-tabs--primary .accua-tabs__tab:hover {
  color: var(--wp-admin-theme-color, #3858e9);
}

.accua-tabs--primary .accua-tabs__tab[aria-selected="true"] {
  color: #1d2327;
  font-weight: 600;
  border-bottom-color: var(--wp-admin-theme-color, #3858e9);
}

.accua-tabs--primary > .accua-tabs__panel, #accua_form_preview_pane {
  padding: 1rem 0;
}

/* Form builder utility rules */
#accua_form_use_ajax .accua_form_value {
    margin-right: 6px;
}

#accua_form_use_ajax, #accua_form_layout {
    clear: both;
    line-height: 25px;
}

#accua_form_layout {
  margin-right: 50px;
  margin-bottom: 9px;
}

#accua_forms_edit_page #accua_tabs {
  position: relative;
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

/* Tablist header spans full width */
#accua_forms_edit_page #accua_tabs > .accua-tabs__header {
  grid-column: 1 / -1;
}

/* Panels fill column 1 by default */
#accua_forms_edit_page #accua_tabs > .accua-tabs__panel {
  grid-column: 1;
  grid-row: 2;
}

/* Panels without preview span both columns */
#accua_forms_edit_page #accua_tabs > .accua-tabs__panel[data-tab="messages"],
#accua_forms_edit_page #accua_tabs > .accua-tabs__panel[data-tab="retention"],
#accua_forms_edit_page #accua_tabs > .accua-tabs__panel[data-tab="google_ads"],
#accua_forms_edit_page #accua_tabs > .accua-tabs__panel[data-tab="tokens"] {
  grid-column: 1 / -1;
  align-content: start ;
}



/* Preview pane — column 2, same row as the active panel */
#accua_forms_edit_page .accua-form-preview-pane {
  grid-column: 2;
  grid-row: 2;
  min-height: 200px;
  border-left: 1px solid #e0e0e0;
  padding-left: 16px;
  align-self: start;
}

#accua_forms_edit_page .accua-form-preview-pane[hidden] {
  display: none;
}

@media screen and (max-width: 1200px) {
  #accua_forms_edit_page #accua_tabs {
    grid-template-columns: 1fr;
  }
  #accua_forms_edit_page #accua_tabs > .accua-tabs__panel {
    grid-column: 1;
  }
  #accua_forms_edit_page .accua-form-preview-pane {
    grid-column: 1;
    grid-row: auto;
    border-left: none;
    padding-left: 0;
    border-top: 1px solid #e0e0e0;
    padding-top: 16px;
  }
}

.accua-forms-metabox-holder {
   float: left;
   margin-right: 2%;
   width: 47%;
}



/* Delete form button — modern WordPress destructive action */
#accua_forms_edit_page form#delete_form input[type="submit"] {
  background: none;
  border: none;
  color: #d63638;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 2px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

#accua_forms_edit_page form#delete_form input[type="submit"]:hover {
  background: #d63638;
  color: #fff;
}

#accua_forms_edit_page form#delete_form input[type="submit"]:focus-visible {
  outline: 2px solid #d63638;
  outline-offset: 1px;
}

/* Tab header actions alignment */
.accua_tabs_actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 4px;
}

/* Tabs header with flexbox layout — tablist + actions side-by-side */
.accua-tabs__header {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  margin-bottom: 0;
  border-bottom: 1px solid #c3c4c7;
}

.accua-tabs__header .accua-tabs__tablist {
  border-bottom: none;
}

/* Default message preview — faithful rendering of email content */
[data-tab="messages"] .defalut_content_message {
  margin-top: 8px;
  padding: 0;
  overflow: auto;
  max-height: 300px;
}

[data-tab="messages"] .defalut_message {
  padding-top: 12px;
  font-weight: 600;
  font-size: 13px;
  color: #50575e;
}

[data-tab="messages"] #dashboard_right_now a.insert-media {
    float: none;
    top: 0;
}

[data-tab="messages"] .wp-editor-wrap {
    margin-top: 10px;
}

[data-tab="messages"] .label_input {
    display: block;
    line-height: 27px;
    margin-bottom: 9px;
    width: 100%;
    float: left;
}

[data-tab="messages"] .label_input label {
    float: left;
    margin-right: 10px;
    width: 20%;
}

[data-tab="messages"] .label_input input.accua_form_value[type="text"] {
    float: left;
    width: 45%;
}

[data-tab="messages"] input.accua_form_check_override[type="checkbox"] {
    margin-right: 5px;
}

/* Radio group — vertical stack with clickable labels */
.accua-radio-group {
    margin: 0;
    padding: 0;
    border: 0;
}

.accua-radio-group label {
    display: block;
    padding: 4px 0;
    cursor: pointer;
}

.accua-radio-group input[type="radio"] {
    margin: 0 6px 0 0;
    vertical-align: middle;
}

[data-tab="messages"] .accua_form_value[disabled] {
    color: #BBBBBB;
}

[data-tab="messages"] .default_value {
    border: 1px solid #ddd;
    color: #999;
    float: left;
    line-height: 22px;
    min-height: 21px;
    margin: 1px 5% 1px 0;
    padding-left: 1%;
    padding-right: 1%;
    width: 43%;
}

#accua-forms-list-filter th.column-submissions a span {
  float:none;
}

#accua-forms-list-filter th.column-submissions .sorting-indicator {
  float:right;
}

#accua_form_preview_area_wrapper {
    position: relative;
    width: 100%;
    overflow: unset;
}

#accua_form_preview_area_wrapper .ui-resizable-handle.ui-resizable-s{
    display: none !important;
}

#accua_form_preview_area {
   /* position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;*/
    width: 100%;
    height: 100%;
    border: none;
    min-height: 400px;
}

/* Preview loading state - Modern accessible design */
#accua_form_preview_area_wrapper.accua-form-preview-loading {
    position: relative;
}

#accua_form_preview_area_wrapper.accua-form-preview-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 10;
}

#accua_form_preview_area_wrapper.accua-form-preview-loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border: 3px solid #2271b1;
    border-top-color: transparent;
    border-radius: 50%;
    z-index: 11;
    animation: accua-form-loading-spin 0.75s linear infinite;
}

/* Reduce motion for users who prefer it (EAA/WCAG compliance) */
@media (prefers-reduced-motion: reduce) {
    #accua_form_preview_area_wrapper.accua-form-preview-loading::before {
        animation: none;
        border-color: #2271b1;
        opacity: 0.6;
    }
}

@keyframes accua-form-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

#accua_forms_edit_page #dialog_token {
   padding: 0 20px 20px;
}

#accua_forms_edit_page .defalut_content_message {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.accua_forms_admin_page textarea {
  resize: vertical;
}
/*
.widget-content p{
    width: 47%;
    float: left;
    margin-right: 5px;
}
*/.widget-title h3, .widget-title h4 {
      padding: 10px;
      font-size: 14px;
      white-space: unset;
  }

.widget-control-remove.delete{
    color: #b32d2e;
}


/* Save button states - WordPress-style inline feedback (DRY: shared between global and field save buttons) */
.accua_form_save_settings_button,
.accua-field-save-btn {
    position: relative;
    min-width: 80px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Saving state - border spinner animation with visible text */
.accua_form_save_settings_button.accua-saving-active,
.accua-field-save-btn.accua-saving-active {
    pointer-events: none;
    border-color: transparent !important;
    background-image: none;
    animation: accua-btn-border-spin 0.8s linear infinite;
    box-shadow: inset 0 0 0 2px #0073aa;
}

@keyframes accua-btn-border-spin {
    0% { box-shadow: inset 0 0 0 2px #0073aa, inset 0 -20px 0 0 rgba(0, 115, 170, 0.1); }
    25% { box-shadow: inset 0 0 0 2px #0073aa, inset 20px 0 0 0 rgba(0, 115, 170, 0.1); }
    50% { box-shadow: inset 0 0 0 2px #0073aa, inset 0 20px 0 0 rgba(0, 115, 170, 0.1); }
    75% { box-shadow: inset 0 0 0 2px #0073aa, inset -20px 0 0 0 rgba(0, 115, 170, 0.1); }
    100% { box-shadow: inset 0 0 0 2px #0073aa, inset 0 -20px 0 0 rgba(0, 115, 170, 0.1); }
}

/* Saved state - green background with checkmark after text */
.accua_form_save_settings_button.accua-saved-active,
.accua-field-save-btn.accua-saved-active {
    background-color: #00a32a !important;
    border-color: #00a32a !important;
    color: #fff !important;
}

.accua_form_save_settings_button.accua-saved-active::after,
.accua-field-save-btn.accua-saved-active::after {
    content: ' ✓';
    font-weight: bold;
}

/* Error state */
.accua_form_save_settings_button.accua-error,
.accua-field-save-btn.accua-error {
    background-color: #d63638 !important;
    border-color: #d63638 !important;
    color: #fff !important;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .accua_form_save_settings_button.accua-saving-active,
    .accua-field-save-btn.accua-saving-active {
        animation: none;
        box-shadow: inset 0 0 0 2px #0073aa;
    }
}

/* Hide the old status containers - no longer needed */
.accua_form_save_settings_status {
    display: none;
}


.widgets-holder-wrap.dashed{
    border: 2px dashed #c3c4c7;
}
.widgets-holder-wrap.dashed h3 {
    padding: 20px !important;
}
.widgets-holder-wrap.dashed .widgets-sortables.ui-sortable {
    margin-bottom: 22px !important;
}

[data-tab="customise"] .accua_form_value[type="text"]{
    width: 67%;
    float: right;
}
[data-tab="customise"] .wp-picker-input-wrap .accua_form_value[type="text"]{
    width: 100%;
    float: right;
}

/* ============================================
   Grafica e generali - Redesigned Style Editor
   ============================================ */

/* Two-column layout */
.accua-customise-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

[data-tab="customise"] .accua-style-column {
    flex: 1 1 calc(50% - 15px);
    min-width: 280px;
    box-sizing: border-box;
}

/* Section headers - consistent h3 styling for all sections */
[data-tab="customise"] h3 {
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 12px 0;
    padding: 0 0 8px 0;
    border-bottom: 1px solid #c3c4c7;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

[data-tab="customise"] h3:not(:first-of-type) {
    margin-top: 20px;
}

/* General section paragraphs */
.accua-customise-columns > .accua-style-column > p {
    margin: 0 0 12px 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.5;
}

.accua-customise-columns > .accua-style-column > p select {
    margin-left: 8px;
}

/* Style row - consistent height with inline inputs */
.accua-style-row {
    display: flex;
    align-items: flex-start; /* Changed from center to allow vertical expansion */
    gap: 8px;
    padding: 6px 8px;
    margin: 0 -8px;
    min-height: 40px; /* Minimum height for consistency */
    background: transparent;
    border: none;
    border-radius: 3px;
    box-sizing: border-box;
    transition: background-color 0.15s ease;
}

/* Align checkbox and label to the top when color picker is open */
.accua-style-row .accua-style-toggle,
.accua-style-row .accua-style-content {
    padding-top: 4px; /* Align with first row of content */
}

/* Active state when checkbox is checked */
.accua-style-row:has(input[type="checkbox"]:checked) {
    background: #f0f6fc;
}

/* Hover state for better interactivity feedback */
.accua-style-row:hover {
    background: #f6f7f7;
}

.accua-style-row:has(input[type="checkbox"]:checked):hover {
    background: #e8f2fb;
}

/* Toggle column (checkbox) */
.accua-style-toggle {
    flex: 0 0 18px;
}

.accua-style-toggle input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

/* Content column - inline layout, allows vertical expansion for color picker */
.accua-style-content {
    flex: 1;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap; /* Allow wrapping for color picker to go below */
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

/* CSS Property label - compact inline style */
.accua-style-label {
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: #50575e;
    min-width: 120px;
    flex-shrink: 0;
    cursor: default;
}

.accua-style-row:has(input[type="checkbox"]:checked) .accua-style-label {
    color: #135e96;
    font-weight: 600;
}

/* Text input styling */
.accua-style-content input[type="text"]:not(.wp-color-picker) {
    width: 100px;
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    background: #fff;
    box-sizing: border-box;
}

.accua-style-content input[type="text"]:not(.wp-color-picker):focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Hide input when checkbox is unchecked - use visibility for consistent height */
.accua-style-row:not(:has(input[type="checkbox"]:checked)) .accua-style-content input[type="text"]:not(.wp-color-picker),
.accua-style-row:not(:has(input[type="checkbox"]:checked)) .accua-style-content .wp-picker-container {
    visibility: hidden;
    pointer-events: none;
}

/* Help text - hidden (redundant with labels) */
.accua-style-help {
    display: none !important;
}

/* Color swatch button - compact */
.accua-style-content .wp-picker-container .wp-color-result {
    height: 28px;
    min-height: 28px;
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
    margin: 0;
}

/* Hide the "Seleziona un colore" label text - we show hex value instead */
.accua-style-content .wp-picker-container .wp-color-result-text {
    display: none;
}

/* Hex input field - ALWAYS visible and styled */
.accua-style-content .wp-picker-container .wp-picker-input-wrap {
    display: inline-flex !important; /* Force always visible - WordPress hides by default */
    align-items: center;
    gap: 4px;
    margin-left: 6px;
}

/* Hide only the screen reader text, not the entire label (which contains the input!) */
.accua-style-content .wp-picker-container .wp-picker-input-wrap label .screen-reader-text {
    position: absolute;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px;
    height: 1px;
    overflow: hidden;
    padding: 0;
    margin: -1px;
}

.accua-style-content .wp-picker-container .wp-color-picker {
    display: inline-block !important; /* Force always visible */
    width: 80px !important;
    padding: 4px 6px;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 12px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    background: #fff;
    box-sizing: border-box;
    height: 28px;
}

.accua-style-content .wp-picker-container .wp-color-picker:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Clear button styling - compact */
.accua-style-content .wp-picker-container .wp-picker-clear {
    padding: 4px 8px;
    font-size: 11px;
    line-height: 1.4;
    height: 28px;
    margin: 0;
}

/* Color picker container - allow vertical expansion for inline Iris picker */
.accua-style-content .wp-picker-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

/* First row: color button + hex input + clear button */
.accua-style-content .wp-picker-container .wp-color-result,
.accua-style-content .wp-picker-container .wp-picker-input-wrap {
    flex-shrink: 0;
}

/* Iris color picker holder - inline below the controls, NOT overlapping */
.accua-style-content .wp-picker-container .wp-picker-holder {
    position: relative;
    z-index: 1;
    flex-basis: 100%;
    margin-top: 8px;
}

/* When picker is open, add visual separation */
.accua-style-content .wp-picker-container.wp-picker-active {
    padding-bottom: 8px;
    margin-bottom: 8px;
}

/* Style row to accommodate expanded color picker */
.accua-style-row:has(.wp-picker-active) {
    z-index: 1;
}

/* Responsive adjustments */
@media screen and (max-width: 1200px) {
    [data-tab="customise"] .accua-style-column {
        flex: 1 1 100%;
    }
    
    [data-tab="customise"] h3:not(:first-of-type) {
        margin-top: 30px;
    }
}

/* Legacy support - hide old elements */
[data-tab="customise"] .default_value,
[data-tab="customise"] .label_input,
[data-tab="customise"] .label_container {
    display: none;
}


/* ==========================================================================
   Settings page — Tab panel overrides
   ========================================================================== */

#accua_settings_tabs > .accua-tabs__panel {
    min-height: 0;
    background: transparent;
    padding: 20px 0 0;
}

/* Retention panel — transparent background */
[data-tab="retention"] {
    min-height: 0;
    background: transparent;
    padding: 20px 10px 10px;
}

/* Full-width panels in settings tabs */
#accua_settings_tabs .accua-forms-metabox-holder {
    float: none;
    width: auto;
    margin-right: 0;
}

/* ==========================================================================
   Settings page — Section layout
   Uses native WordPress .postbox + .inside for grouped settings sections.
   Only custom overrides below for grid layout and minor adjustments.
   ========================================================================== */

/* Postbox header h2: match native .hndle padding without cursor:move */
.postbox > .postbox-header > h2 {
    padding: 1rem 12px;
    margin: 0;
}

/* Danger variant */
.postbox.accua-danger-zone {
    border-color: #d63638;
}

/* Messages tab — 2-column grid */
.accua-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.accua-settings-grid > .postbox {
    min-height: 320px;
    margin-bottom: 0;
}

@media screen and (max-width: 1200px) {
    .accua-settings-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Form edit page layout
   ========================================================================== */

/* Fields editor — flex layout for h2 + available fields (30%) + drop zone (70%) */
#accua_tabs [data-tab="fields"]:not([hidden]) {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    gap: 0 16px;
}

#accua_tabs [data-tab="fields"] > h2 {
    flex: 0 0 100%;
}

/* Available fields sidebar */
#accua_tabs [data-tab="fields"] .widget-liquid-left {
    flex: 0 0 calc(30% - 8px);
    width: auto;
    float: none;
}

/* Drop zone */
#accua_tabs [data-tab="fields"] .widget-liquid-right {
    flex: 0 0 calc(70% - 8px);
    width: auto;
    float: none;
    margin: 0;
}

#accua_tabs [data-tab="fields"] #widgets-left {
    padding-top: 0;
    margin-right: 0;
}

#accua_tabs [data-tab="fields"] #widgets-right {
    width: 100%;
}

#accua_tabs [data-tab="fields"] #widgets-right .widgets-holder-wrap {
    margin-top: 0;
}

/* note */

input#delete-sub-data, input#delete-note {
    background: none;
    border: none;
    padding: 0;
    text-decoration: underline;
    cursor: pointer;
}
input#delete-note {
    display: inline-block;
}
.system-note .note_content {
    padding: 10px;
    background: #efefef;
    position: relative;
    line-height: 18px;
    font-size: 14px;
}
.system-note .note_content::after {
    content: "";
    display: block;
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-width: 10px 10px 0 0;
    border-style: solid;
    border-color: #efefef transparent;
}
.system-note p.meta, form#delete-note {
    padding: 10px;
    color: #999;
    margin: 0;
    display: inline-block;
}
form#delete-note {
    padding: 0;
}

.metabox-holder.grid-3{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 15px;
}

.metabox-holder.grid-3 .postbox > .inside {
    padding: 16px;
}

.metabox-holder.grid-3 #note_site_user {
    width: 100%;
    margin-bottom: 5px;
}

/* Lead status row: select + tooltip + progress aligned */
.accua-lead-status-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
}

.accua-lead-status-row .dashicons-editor-help {
    color: #787c82;
    cursor: pointer;
}

.accua-forms-submission-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0 16px;
}

.accua-forms-submission-actions .submitdelete {
    text-decoration: none;
}

.accua-forms-select-lead-status-progress {
    display: inline-block;
    vertical-align: middle;
    width: 2em;
    height: 2em;
    background-size: 2em 2em;
    background-repeat: no-repeat;
}

.accua-forms-select-lead-status-throbber {
    background-image: url("../img/material_throbber.svg");
}

.accua-forms-select-lead-status-cancel {
    background-image: url("../img/material_cancel.svg");
}

.accua-forms-select-lead-status-check {
    background-image: url("../img/material_check.svg");
}

th#lead_status {
    width: 200px;
}

/* ============================================
   Restore Default Button Styles
   ============================================ */

.accua-restore-default-wrapper {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f1;
}

.accua-restore-default-wrapper .description {
    color: #787c82;
    font-size: 12px;
    font-style: italic;
    margin-left: 8px;
}

/* Success state */
.accua-restore-default-btn.accua-restored {
    color: #00a32a !important;
}

/* Error state */
.accua-restore-default-btn.accua-error {
    color: #d63638 !important;
}

/* ==========================================================================
   Dashboard page
   ========================================================================== */

#accua-forms-graph-content {
    padding: 20px;
}

#accua-form-report-graph {
    height: 300px;
}

#accua_dashboard_page .postbox > .inside {
    padding: 20px;
}

.accua_forms_trash {
    background: none;
    border: none;
    padding: 0;
    text-decoration: underline;
    color: #cf0000;
    margin-top: 5px;
    cursor: pointer;
}

table.table_last_submit,
table.table_submit {
    font-family: arial, sans-serif;
    border-collapse: collapse;
    width: 100%;
}

.table_last_submit td,
.table_last_submit th,
.table_submit td,
.table_submit th {
    border: 1px solid #e5e5e5;
    text-align: left;
    padding: 15px;
    font-size: 15px;
}

.table_last_submit tr:nth-child(even),
.table_submit tr:nth-child(even) {
    background-color: #fcfcfc;
}