:root {
  --color-main: #ea4649;
  --color-cta: #7fca27;

}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 14px;
}

.mb-wph-title {
  font-size: 22px;
}

#toplevel_page_mb-wphelper~*.wp-menu-separator {
  display: none;
}

#toplevel_page_mb-wphelper .wp-menu-name {
  position: relative;
}

#toplevel_page_mb-wphelper .menu-admin-icon {
  position: absolute;
  background: var(--color-cta);
  color: #fff;
  font-size: 11px;
  padding: 1px 2px;
  border-radius: 10px;
  top: 50%;
  transform: translateY(-50%);
  right: 7px;

}

#toplevel_page_mb-wphelper .wp-menu-image img {
  height: 20px;
  opacity: 1;
}

#toplevel_page_mb-wphelper .wp-first-item .menu-admin-icon {
  display: none;
}

/* --- Redesigned Vertical Navigation --- */
.mb-wph-tab-title {
  width: 250px;
  min-width: 250px;
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  padding: 10px;
  box-sizing: border-box;
}

.mb-wph-tab-title ul {
  display: flex;
  background: transparent;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mb-wph-tab-title ul .tab-title-item {
  margin-bottom: 0;
  width: 100%;
  border-radius: 8px;
  list-style: none;
  overflow: hidden;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.mb-wph-tab-title ul .tab-title-item a {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.5;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.mb-wph-tab-title ul .tab-title-item a:focus {
  outline: none;
  box-shadow: none;
}

/* Active State */
.mb-wph-tab-title ul .tab-title-item.active {
  background: var(--color-cta, #7fca27);
  box-shadow: 0 4px 10px -2px rgba(127, 202, 39, 0.3);
}

.mb-wph-tab-title ul .tab-title-item.active a {
  color: #ffffff !important;
  font-weight: 600;
}

/* Hover State */
.mb-wph-tab-title ul .tab-title-item:not(.active):hover {
  background: rgba(127, 202, 39, 0.08);
}

.mb-wph-tab-title ul .tab-title-item:not(.active):hover a {
  color: #1e293b;
}

/* Icon Support using Dashicons */
.mb-wph-tab-title ul .tab-title-item a::before {
  font-family: 'dashicons';
  content: "\f111"; /* Default dot icon */
  margin-right: 12px;
  font-size: 17px;
  width: 20px;
  height: 20px;
  line-height: 20px;
  display: inline-block;
  text-align: center;
  color: #64748b;
  transition: all 0.2s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.mb-wph-tab-title ul .tab-title-item.active a::before {
  color: #ffffff;
}

/* Individual Tab Icons based on Slug */
.mb-wph-tab-title ul .tab-title-item.tab-mb-wphelper-contact a::before { content: "\f125"; }          /* Chat icon */
.mb-wph-tab-title ul .tab-title-item.tab-mb-wphelper-code a::before { content: "\f475"; }             /* Code icon */
.mb-wph-tab-title ul .tab-title-item.tab-mb-wphelper-smtp a::before { content: "\f465"; }             /* Email icon */
.mb-wph-tab-title ul .tab-title-item.tab-mb-wphelper-security a::before { content: "\f332"; }         /* Shield icon */
.mb-wph-tab-title ul .tab-title-item.tab-mb-wphelper-extention a::before { content: "\f106"; }        /* Extension plug icon */
.mb-wph-tab-title ul .tab-title-item.tab-mb-wphelper-woocommerce-cta a::before { content: "\f174"; }  /* Cart icon */
.mb-wph-tab-title ul .tab-title-item.tab-mb-wphelper-woocommerce-ecommerce a::before { content: "\f513"; } /* Store icon */
.mb-wph-tab-title ul .tab-title-item.tab-mb-wphelper-woocommerce-payment a::before { content: "\f497"; } /* Text/File icon */
.mb-wph-tab-title ul .tab-title-item.tab-mb-wphelper-woocommerce-wallet a::before { content: "\f180"; }  /* Credit card / wallet icon */
.mb-wph-tab-title ul .tab-title-item.tab-mb-wphelper-woocommerce-advance a::before { content: "\f546"; } /* Tools/Cog icon */
.mb-wph-tab-title ul .tab-title-item.tab-mb-wphelper-maintenance a::before { content: "\f307"; }       /* Hammer icon */
.mb-wph-tab-title ul .tab-title-item.tab-mb-wphelper-pop-up a::before { content: "\f504"; }           /* External link / pop icon */
.mb-wph-tab-title ul .tab-title-item.tab-mb-wphelper-ai a::before { content: "\f339"; }               /* Lightbulb / AI icon */

/* Original Wrapper Styles */
.mb-wph-wrap {
  margin-right: 30px;
}

.mb-wph-wrap a {
  text-decoration: none;
}

.mb-wph-header>*:not(:last-child) {
  margin-bottom: 30px;
}

.mb-wph-content {
  background: #fff;
  padding: 30px;
  box-shadow: rgb(0 0 0 / 24%) 0 3px 8px;
  border-radius: 5px;
}

.mb-wph-content p {
  margin: 0;
}

.mb-wph-desc {
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
  margin-bottom: 15px;

}

.switch {
  position: relative;
  display: inline-block;
  width: 70px;
  height: 30px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: gray;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 15px;
  width: 15px;
  left: 5px;

  background-color: white;
  -webkit-transition: 0.4s;
  transition: 0.4s;
  top: 50%;
  transform: translateY(-50%);
}

.switch span.on {
  left: 40%;
}

input:checked+.slider {
  background-color: #2ab934;
}

input:checked+.slider {
  background-color: #2ab934;
}

input:focus+.slider {
  box-shadow: 0 0 1px #2196f3;
}

input:checked+.slider:before {
  -webkit-transform: translateX(55px);
  -ms-transform: translateX(55px);
  transform: translateX(40px) translateY(-50%);
}

/*------ ADDED CSS ---------*/
.switch .on {
  display: none;
}

.switch .on,
.switch .off {
  color: white;
  position: absolute;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  font-size: 10px !important;
  font-family: Verdana, sans-serif;
}

input:checked + .slider .on {
  display: block;
}

input:checked + .slider .off {
  display: none;
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.mb-setting-content label {
  font-weight: bold;
}

.mb-setting>*:not(:last-child) {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px dashed #eee;
}

.mb-setting-item .mb-setting-content-item {
  display: flex;
}

.mb-setting-content-item>*:first-child {
  margin-right: 15px;
  width: 30%;
}

.mb-setting-item>*:not(:last-child) {
  margin-bottom: 30px;
}

.mb-setting-title {
  font-size: 14px;
  font-weight: 599;
  margin-bottom: 5px;
}

.mb-wph-content>*:not(:last-child) {
  margin-bottom: 30px;
}

.mb-buttons {
  border-top: 1px solid #eee;
  padding-top: 15px;
  margin-top: 30px;
}

.mb-setting-content>*:not(:last-child) {
  margin-bottom: 15px;
}

.mb-setting-content-item>*:last-child {
  width: 50%;
}

.mb-setting-content .form-control {
  border: 1px solid #ccc;
  height: 40px;
  font-size: 13px;
}

.mb-setting-content .form-group .form-control {
  width: 100%;
}

.mb-wph-body {
  display: flex;
  align-items: stretch;
  margin-top: 20px;
}

.mb-wph-body>*:not(:last-child) {
  margin-right: 15px;
}

.mb-sidebar {
  background: #fff;
  width: 20%;
  padding: 15px;
  box-shadow: rgb(0 0 0 / 24%) 0 3px 8px;
  border-radius: 5px;
}

.mb-wph-content {
  flex: 1;
}

.mb-sidebar-title {
  display: flex;
  align-items: center;
  line-height: 1.3;
}

.mb-sidebar-title img {
  width: 40px;
  margin-right: 10px;
}

.img-responsive {
  max-width: 100%;
}

.text-center {
  text-align: center;
}

.mb-setting:not(:last-child) {
  margin-bottom: 30px;
}

.btn {
  display: inline-block;
  padding: 10px 15px;
  background: #eee;
  width: max-content !important;
  color: #333;
  border-radius: 5px;
  transition: 0.2s linear;
  cursor: pointer;
}

.btn.btn-primary-outline {
  background: transparent;
  border: 1px solid var(--color-cta);
  color: var(--color-cta);
}

.btn.btn-primary-outline:hover {
  background: var(--color-cta);
  color: #fff;
}

.contact-list-item {
  background: #f5f5f5;
  width: 100% !important;
  padding: 15px;
  border-radius: 5px;
  border: 1px solid #eee;
}

.contact-list-item .form-group>*:not(:last-child) {
  margin-bottom: 10px;
  display: block;
}

.contact-list-item>*:not(:last-child) {
  margin-bottom: 15px;
}

.contact-list {
  width: 100% !important;
}

.contact-list>*:not(:last-child) {
  margin-bottom: 15px;
}

.mb-setting-content-item.w-100>*:first-child {
  width: 100%;
}

.form-avatar-group {
  display: flex;
  align-items: center;
}

.form-avatar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.form-avatar-item>*:not(:last-child) {
  margin-bottom: 15px;
}

.form-avatar-group>*:not(:last-child) {
  margin-right: 30px;
}

.form-avatar-group img {
  cursor: pointer;
}

.contact-list-item {
  position: relative;
}

.contact-remove {
  background: transparent;
  border: none;
  padding: 0;
  line-height: 1;
  position: absolute;
  top: 15px;
  right: 15px;
  cursor: pointer;
}

.contact-remove img {
  width: 20px;
  object-fit: contain;
}

.mb-setting-content-item.contact-info {
  padding-right: 15px;
}

.mb-setting.hide {
  display: none;
}

.mb-wph-notify {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #166534;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 5px solid #16a34a;
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.04);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  animation: slideDownFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mb-wph-notify::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: #16a34a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px;
}

@keyframes slideDownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mb-wph-desc>*:not(:last-child) {
  margin-bottom: 15px;
}

#password-group {
  position: relative;
}

.btn-show-password {
  width: 20px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 10px;
  cursor: pointer;
}

#code-setting textarea {
  height: 250px;
  background: #3c434a;
  color: #fff;
}

#code-setting .mb-setting-content-item>*:last-child {
  width: 100%;
  flex: 1;
}

#security-setting .mb-setting-content-item>*:last-child {
  flex: 1;
}

#security-setting .mb-setting-content-item>.form-group>*:not(:last-child) {
  margin-bottom: 15px;
}

.form-control.no_checked {
  display: none;
}

.input-group {
  display: flex;
}

.input-group>*:first-child {
  background: #eee;
  display: flex;
  align-items: center;
  padding: 0 15px;
}


.input-group>*:last-child {
  flex: 1;
  border-radius: 0;
}

.input-group.no_checked {
  display: none;
}

.preview-logo {
  width: 100px;
  height: 100px;
  display: block;
  object-fit: cover;
  border: 1px solid #eee;
  border-radius: 5px;
}

#uploadLogo {
  background: transparent;
  border: 1px solid var(--color-cta);
  color: var(--color-cta);
}

#uploadLogo:hover {
  background: var(--color-cta);
  color: #fff;
}

.preview-group {
  position: relative;
}

.preview-close {
  width: 15px;
  position: absolute;
  top: 4px;
  left: 84px;
  z-index: 9999;
  cursor: pointer;
}

.mb-setting-item.no_checked {
  display: none;
}

/* mb-wph-tab-title container styling moved to main section */

.ecommerce-setting .mb-setting-item .mb-setting-content-item {
  align-items: center;
}

.mb-setting-content-item-label-group {
  display: flex;
  align-items: center;
  margin-top: 15px;
}



.mb-setting-content-item-label-group>*:first-child {
  margin-right: 15px;
  width: 100px;
  height: 40px;
  object-fit: contain;
}

.mb-setting-content-item-label-group p {
  font-weight: 400;
}

.mb-setting-content-item-label-group>*:first-child>img {
  width: 100%;
}

.wallet-setting .mb-setting-content-item>*:first-child {
  width: 100%;
}

.mb-wph-header {
  padding: 15px 0;
}

.mb-setting.no_checked {
  display: none;
}

.mb-accordion {
  border: 1px solid #ccc;
  margin-bottom: 20px;
}

.mb-accordion-header {
  padding: 10px;
  background-color: #f5f5f5;
  cursor: pointer;
}

.mb-accordion-content {
  display: none;
  padding: 10px;
}

.mb-show-content {
  display: block;
}

.mb-hide-content {
  display: none;
}

.mb-disable {
  pointer-events: none;
  cursor: default;
}

.mb-setting-item #editor-mail-template {
  height: 200px;
}






.mb-row-tow {
  margin-top: 20px;
  display: flex;
}

.mb-w-50 {
  width: 50%;
}

#whp-filter .form-control {
  width: 100%;
  line-height: 30px;
}

#whp-filter .item-form-filter {
  margin-top: 60px;
  display: flex;
}

#whp-filter .item-form-filter label {
  display: block;
  width: 20%;
}

#whp-filter .item-form-filter .form-input {
  width: 80%;
}



#whp-filter table {
  width: 80%;
  border-collapse: collapse;
  margin: 25px 0;
  font-size: 0.9em;
  font-family: sans-serif;
  min-width: 400px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

#whp-filter thead tr {
  background-color: #009879;
  color: #ffffff;
  text-align: left;
}

#whp-filter th,
#whp-filter td {
  padding: 12px 15px;
}

#whp-filter tbody tr {
  border-bottom: 1px solid #dddddd;
}

#whp-filter tbody tr:nth-of-type(even) {
  background-color: #f3f3f3;
}

#whp-filter tbody tr:last-of-type {
  border-bottom: 2px solid #009879;
}

#whp-filter tbody tr.active-row {
  font-weight: bold;
  color: #009879;
}

#whp-filter .flex {
  display: inline-flex;
}

#whp-filter .hide {
  display: none;
}

#whp-filter .show {
  display: block;
}

.setting-input-inline {
  display: inline-flex;
}

.setting-input-inline input {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-right-color: transparent !important;
}

.setting-input-inline label {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-radius: 2px;
  border: 1px solid;
  padding: 0px 8px;
}

.input-setting-range {
  display: inline-flex;
}



.input-setting-range-item label {
  display: block !important;
  width: 100% !important;
  margin-right: 5px;
}

/* Suppress standard WordPress admin notices on WP Helper settings pages */
body[class*="mb-wphelper"] .notice,
body[class*="mb-wphelper"] .updated,
body[class*="mb-wphelper"] .error:not(.mb-error),
body[class*="mb-wphelper"] .is-dismissible,
body[class*="wp-helper"] .notice,
body[class*="wp-helper"] .updated,
body[class*="wp-helper"] .error:not(.mb-error),
body[class*="wp-helper"] .is-dismissible {
  display: none !important;
}

/* Custom white background for AI Auto Poster inner wrapper to prevent grey background bleed */
.wpaap-wrap,
.wpaap-dash-container {
  background: #ffffff !important;
}

/* =============================================================
   GLOBAL FORM STANDARD — đồng bộ toàn bộ input/select/textarea
   Reference: wpaap-maintenance-tab style
   ============================================================= */

/* Label */
.mb-wph-field > label,
.mb-wph-pp-field > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

/* Input / Select / Textarea */
.mb-wph-input,
.mb-wph-select,
.mb-wph-pp-input,
.mb-wph-pp-textarea,
.mb-wph-field input[type="text"],
.mb-wph-field input[type="email"],
.mb-wph-field input[type="password"],
.mb-wph-field input[type="number"],
.mb-wph-field input[type="url"],
.mb-wph-field input[type="tel"],
.mb-wph-field select,
.mb-wph-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 13.5px;
  color: #0f172a;
  background: #f8fafc;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  outline: none;
  line-height: 1.5;
}

.mb-wph-select,
.mb-wph-field select {
  width: 100% !important;
  max-width: 100% !important;
}

/* Focus state */
.mb-wph-input:focus,
.mb-wph-select:focus,
.mb-wph-pp-input:focus,
.mb-wph-pp-textarea:focus,
.mb-wph-field input[type="text"]:focus,
.mb-wph-field input[type="email"]:focus,
.mb-wph-field input[type="password"]:focus,
.mb-wph-field input[type="number"]:focus,
.mb-wph-field input[type="url"]:focus,
.mb-wph-field input[type="tel"]:focus,
.mb-wph-field select:focus,
.mb-wph-field textarea:focus {
  border-color: #3858e9;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(56, 88, 233, 0.1);
}

/* Textarea */
.mb-wph-pp-textarea,
.mb-wph-field textarea {
  min-height: 80px;
  resize: vertical;
}

/* Select arrow */
.mb-wph-select,
.mb-wph-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Hint text */
.mb-wph-hint,
.mb-wph-pp-hint {
  margin: 5px 0 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}

/* Field spacing */
.mb-wph-field,
.mb-wph-pp-field {
  margin-bottom: 16px;
}
.mb-wph-field:last-child,
.mb-wph-pp-field:last-child {
  margin-bottom: 0;
}

/* Disabled */
.mb-wph-input:disabled,
.mb-wph-select:disabled,
.mb-wph-field input:disabled,
.mb-wph-field select:disabled,
.mb-wph-field textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f1f5f9;
}

/* 2-col grid cho form fields */
.mb-wph-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 640px) {
  .mb-wph-grid-2 { grid-template-columns: 1fr; }
}

/* Label với icon */
.mb-wph-label-icon {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 5px;
}

/* ── Admin footer ── */
.mb-wph-footer {
  margin: 24px 0 0;
  padding: 0;
}
.mb-wph-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.mb-wph-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mb-wph-footer-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mb-wph-footer-logo svg { display: block; }
.mb-wph-footer-name {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
}
.mb-wph-footer-tagline {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
  margin-top: 1px;
}
.mb-wph-footer-center {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #64748b;
}
.mb-wph-footer-heart {
  color: #ea4649;
  font-size: 13px;
}
.mb-wph-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mb-wph-footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  background: linear-gradient(135deg,#f0f4ff,#e8eeff);
  border: 1px solid #c7d2fe;
  font-size: 11px;
  font-weight: 700;
  color: #3858e9;
  letter-spacing: .3px;
}
.mb-wph-footer-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.mb-wph-footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: background .15s, color .15s;
  border: 1px solid transparent;
}
.mb-wph-footer-links a:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #e2e8f0;
}
@media (max-width: 960px) {
  .mb-wph-footer-center { display: none; }
  .mb-wph-footer-inner { flex-wrap: wrap; gap: 10px; }
}