/* ---------------------------------------------
   Dual-list container (pages, resources, products)
   --------------------------------------------- */
.dual-list-container .listbox label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}
.dual-list-container {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 15px;
  width: 100%;
  margin-top: 15px;
}
.dual-list-container .listbox {
  flex: 1;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.dual-list-container select {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  padding: 5px;
}

/* Buttons between lists */
.dual-list-container .listbox.buttons {
  flex: 0 0 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  background: transparent;
}
.dual-list-container .listbox.buttons button {
  width: 100%;
  font-size: 12px;
  cursor: pointer;
}

/* Page buttons */
#add-page-text {
  background-color: #28a745;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
}
#remove-page-text {
  background-color: #dc3545;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
}

/* Resource buttons */
#add-resource {
  background-color: #28a745;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: background 0.3s;
}
#add-resource:hover {
  background-color: #218838;
}
#remove-resource {
  background-color: #dc3545;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: background 0.3s;
}
#remove-resource:hover {
  background-color: #c82333;
}

/* Product-only buttons */
#add-product-only {
  background-color: #28a745;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: background 0.3s;
}
#add-product-only:hover {
  background-color: #218838;
}
#remove-product-only {
  background-color: #dc3545;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: background 0.3s;
}
#remove-product-only:hover {
  background-color: #c82333;
}

/* ---------------------------------------------
   Toggle switch styles
   --------------------------------------------- */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 26px; width: 26px;
  left: 4px; bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
.switch input:checked + .slider {
  background-color: #28a745;
}
.switch input:checked + .slider:before {
  transform: translateX(26px);
}

/* ---------------------------------------------
   Frontend maintenance page
   --------------------------------------------- */
.TKP_STOPMODETW-maintenance {
  margin: 0; padding: 0;
  font-family: Helvetica Neue, Arial, sans-serif;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  text-align: center;
  background-attachment: fixed;
}
.TKP_STOPMODETW-maintenance .maintenance-logo {
  margin-bottom: 20px;
}
.TKP_STOPMODETW-maintenance .maintenance-logo img {
  max-width: 200px; height: auto;
}
.TKP_STOPMODETW-maintenance .maintenance-container {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  display: inline-block;
  width: auto;
  min-width: 400px;
  max-width: 1000px;
  box-sizing: border-box;
  min-height: 150px;
  max-height: 700px;
  overflow: auto;
}
.TKP_STOPMODETW-maintenance .tw-maintenance-header {
  font-size: 48px !important;
  color: #131042 !important;
  font-family: "Arial Black", sans-serif !important;
  margin-top: 10px; margin-bottom: 40px;
}
.TKP_STOPMODETW-maintenance .maintenance-description {
  font-size: 20px !important;
  color: #131042 !important;
  font-family: "Helvetica Neue", Arial, sans-serif !important;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}
@media (max-width: 768px) {
  .TKP_STOPMODETW-maintenance {
    background-attachment: scroll !important;
  }
  .TKP_STOPMODETW-maintenance .maintenance-container {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 30px !important;
    min-height: 0;
    max-height: 100%;
  }
  .TKP_STOPMODETW-maintenance .tw-maintenance-header {
    font-size: 36px !important;
    margin-top: 0 !important; margin-bottom: 20px !important;
  }
  .TKP_STOPMODETW-maintenance .maintenance-description {
    font-size: 16px !important;
  }
}

/* ---------------------------------------------
   Admin page (backend) styles
   --------------------------------------------- */
.wrap {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333; background: #fff; padding: 20px;
}
.vertical-tabs {
  display: flex; flex-wrap: nowrap;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 4px; overflow: hidden;
}
.vertical-tabs .tab-nav {
  min-width: 220px; background: #c3dfe8; border-right: 1px solid #ddd;
}
.vertical-tabs .tab-nav ul { list-style: none; padding: 0; margin: 0; }
.vertical-tabs .tab-nav li { margin: 0; }
.vertical-tabs .tab-nav li a {
  display: block; padding: 15px;
  border-bottom: 1px solid #ddd;
  text-decoration: none; color: #444;
  font-size: 16px;
  text-transform: uppercase;
  transition: background 0.3s, color 0.3s;
}
.vertical-tabs .tab-nav li a:hover {
  background: #e9e9e9; color: #222;
}
.vertical-tabs .tab-nav li a.active {
  background: #0073aa; color: #fff; font-weight: bold;
}
.vertical-tabs .tab-content {
  flex: 1; padding: 20px; background: #fafafa; position: relative;
}
.vertical-tabs .tab-content > .tab-panel { display: none; }
.vertical-tabs .tab-content > .tab-panel.active { display: block; }

/* Save button */
.save-button-container { text-align: center; margin-top: 20px; }
.save-button { font-size: 16px; padding: 12px 24px; }

/* Inputs/buttons */
input[type="text"], textarea {
  padding: 8px; font-size: 15px;
  border: 1px solid #ccc; border-radius: 4px;
  width: 100%; box-sizing: border-box;
}
input[type="color"] {
  padding: 0; width: 50px; height: 34px;
  border: 1px solid #ccc; border-radius: 4px;
  box-sizing: border-box; cursor: pointer;
}
input[type="button"], input[type="submit"], .button {
  font-size: 15px; padding: 8px 12px;
  border: none; border-radius: 4px;
  background-color: #0073aa; color: #fff;
  cursor: pointer; transition: background 0.3s;
}
input[type="button"]:hover, input[type="submit"]:hover, .button:hover {
  background-color: #005177;
}

/* ---------------------------------------------
   Admin Bar toggle styles
   --------------------------------------------- */
#wpadminbar #wp-admin-bar-TKP_STOPMODETW_toggle.maintenance-enabled a {
  background-color: #28a745 !important;
  color: #fff !important;
  line-height: 32px !important;
}
#wpadminbar #wp-admin-bar-TKP_STOPMODETW_toggle.maintenance-disabled a {
  background-color: transparent !important;
  color: inherit !important;
  position: relative;
  line-height: 32px !important;
}
#wpadminbar #wp-admin-bar-TKP_STOPMODETW_toggle.maintenance-disabled a::after {
  content: " •";
  color: #dc3545;
  margin-left: 5px;
  font-size: 18px;
  font-weight: bold;
}
#wpadminbar #wp-admin-bar-TKP_STOPMODETW_toggle .ab-sub-wrapper a,
#wpadminbar #wp-admin-bar-TKP_STOPMODETW_toggle .ab-sub-wrapper a:hover {
  background: transparent !important;
  color: #4cb4e8 !important;
}

/* Additional helper classes */
.maintenance-toggle-container { padding: 15px; border-bottom: 1px solid #ddd; text-align: center; }
.maintenance-toggle-heading { margin: 0 0 5px 0; font-size: 16px; }
.maintenance-status-text { margin-top: 10px; }
.reset-button-container { padding: 15px; text-align: left; }
.reset-form { margin-bottom: 10px; }
.range-input { width: 200px; }
.small-text { font-size: 12px; color: #666; }
.logo-preview { margin-top: 10px; }
.background-image-preview { margin-top: 10px; }


/* ---------------------------------------------
   Frontend maintenance page dynamic styles
   --------------------------------------------- */
.TKP_STOPMODETW-maintenance .tw-maintenance-header {
    font-size:    var(--sm-header-size)  !important;
    color:        var(--sm-header-color) !important;
    font-family:  var(--sm-header-font)  !important;
}

.TKP_STOPMODETW-maintenance .maintenance-description {
    font-size:    var(--sm-text-size)    !important;
    color:        var(--sm-text-color)   !important;
    font-family:  var(--sm-text-font)    !important;
}

.TKP_STOPMODETW-maintenance .maintenance-logo.fallback {
    background-repeat: no-repeat;
    background-position: center center;
    background-size:    contain;
    width:              200px;
    height:             100px;
    margin-bottom:      20px;
}
