/**
 * Admin styles for Nginx Cache Purge Preload
 * Description: Defines styling for plugin admin pages, tabs, tables, and controls.
 * Version: 2.1.6
 * Author: Hasan CALISIR
 * Author Email: hasan.calisir@psauxit.com
 * Author URI: https://www.psauxit.com
 * License: GPL-2.0+
 */

/* Global Styles */

/* Container for logs */
.logs-container {
    background-color: #000000;
    padding: 10px;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 12px;
}

/* Log lines */
.logs-container div {
    margin-bottom: 5px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Error log lines */
.error-line {
    color: #ff5252;
}

/* Normal log lines */
.normal-line {
    color: #bdbdbd;
}

/* Info log lines */
.info-line {
    color: #bdbdbd;
}

/* Success log lines */
.success-line {
    color: #64dd17;
}

/* Timestamp in logs */
.logs-container .timestamp {
    color: white;
}

/* Cursor for logs */
.cursor {
    color: #FFFFFF;
    animation: blink-animation 1s infinite;
}

/* Blink animation */
@keyframes blink-animation {
  50% {
    opacity: 0;
  }
}

/* CSS for FAQ Tab */

/* FAQ container */
.faq {
    margin-bottom: 20px;
}

/* Question styles */
.question {
    font-size: 15px;
    font-weight: bold;
    color: #007cba;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    background-color: #f5f5f5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

/* Question icon */
.question::before {
    content: '\f534';
    font-family: 'dashicons';
    margin-right: 10px;
}

/* Hover effect on question */
.question:hover {
    background-color: #e0e0e0;
}

/* Answer container */
.answer {
    display: none;
    padding: 20px;
    border-radius: 8px;
    margin-top: 10px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

/* Show active answer */
.answer.active {
    display: block;
}

/* Arrow icon for question */
.question::after {
    content: '\f140';
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    font: normal 20px/1 'dashicons';
    color: #007cba;
    transition: transform 0.3s;
}

/* Rotate arrow when active */
.active .question::after {
    transform: rotate(180deg);
}

/* List styles for FAQ */
.nginx-list {
    list-style-type: none;
    padding-left: 0;
}

.nginx-list li {
    margin-bottom: 10px;
}

/* Bullet styles for FAQ list */
.nginx-list li::before {
    content: "\2022";
    font-size: 1.5em;
    color: #0073e6;
    margin-right: 10px;
}

/* Reset regex button styles */
.nginx-reset-regex-button {
    margin-top: 10px !important;
}

/* Reset mobile user agent button styles */
.nginx-reset-mobile-ua-button {
    margin-top: 10px !important;
}

/* Reset extension button styles */
.nginx-reset-extension-button {
    margin-top: 10px !important;
}

/* Reset cache key regex button styles */
.nginx-reset-key-regex-button {
    margin-top: 10px !important;
}

/* Generate API Key button styles */
.nginx-api-key-button {
    display: block !important;
    margin-top: 10px !important;
}

/* Clear logs button styles */
.nginx-clear-logs-button {
    margin-top: 10px !important;
}

/* CSS for Status Tab */

/* Status Tab Container */
#nppp-status-tab.container {
    max-width: 800px;
    margin-left: 0px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

/* Status Summary Table */
#nppp-status-tab .status-summary table,
#nppp-status-tab .system-checks table,
#nppp-preload-progress-section table {
    width: 100%;
    border-collapse: collapse;
}

/* Table Header Styles */
#nppp-status-tab th {
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #ccc;
    background-color: #f0f0f0;
    color: #333;
}

/* Stylish Action, Status, and Check Headers */
#nppp-status-tab .action-header,
#nppp-status-tab .status-header,
#nppp-status-tab .check-header {
    text-transform: uppercase;
    font-size: 14px;
    color: #0073e6;
    background-color: #F0F0F0;
    padding: 8px 10px;
    width: 50%;
}

/* Action, Status, and Check Cells */
#nppp-status-tab .action,
#nppp-status-tab .status,
#nppp-status-tab .check {
    font-weight: bold;
    padding: 10px;
    border-bottom: 1px solid #ccc;
}

/* Status Styles */
#nppp-status-tab .status-yes {
    color: green;
}

#nppp-status-tab .status-no {
    color: red;
}

/* Footer */
#nppp-status-tab footer {
    margin-top: 30px;
    text-align: center;
    color: #888;
}

/* Animation Styles */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#nppp-status-tab .spin {
    animation: spin 1s linear infinite;
}

/* Adjust h2 background color and style */
#nppp-status-tab h2 {
    background-color: #337AB7;
    color: #fff;
    padding: 10px;
    margin-top: 20px;
    margin-bottom: 0px;
    text-transform: uppercase;
}

/* td font size */
td.action, td.check {
    font-size: 14px !important;
}

/* style for cache path note */
.cache-path-plugin-note {
    max-width: max-content;
    color: #722F37;
    background-color: #f2f2f2;
    border-left: 4px solid #999;
    padding: 10px;
    font-size: 12px !important;
    margin-top: 15px !important;
}

/* Adjust width of td.action and td#phpFpmStatus */
#nppp-status-tab .action,
#nppp-status-tab #phpFpmStatus {
    width: 50%;
}

/* CSS for Advanced Tab */

/* premium table header color*/
#nppp-premium-table thead th[data-dt-column] {
    background-color: #337AB7 !important;
}

/* Set text color for column titles */
#nppp-premium-table span.dt-column-title {
    color: white;
}

/* Set text color for column order icons */
#nppp-premium-table span.dt-column-order {
    color: white;
}

/* Style the search box */
#nppp-premium-table_wrapper .dt-search {
    margin-bottom: 10px;
}

/* Style the search label */
#nppp-premium-table_wrapper .dt-search label {
    font-weight: bold;
    margin-right: 10px;
}

/* Style the search input */
#nppp-premium-table_wrapper .dt-search input.dt-input {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f2f2f2;
    color: #333;
    width: 200px;
}

/* Style the focused state of the search input */
#nppp-premium-table_wrapper .dt-search input.dt-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Style pagination buttons */
#nppp-premium-table_wrapper .dt-paging button {
    background-color: #337AB7;
    color: #fff !important;
    border: none;
    padding: 5px 10px;
    margin-right: 5px;
    border-radius: 3px;
    cursor: pointer;
}

/* Style disabled pagination buttons */
#nppp-premium-table_wrapper .dt-paging button.ui-state-disabled {
    background-color: #ccc;
    color: #666;
    cursor: default;
}

/* Style ellipsis */
#nppp-premium-table_wrapper .dt-paging .ellipsis {
    color: #666;
    margin-right: 5px;
}

/* Style the nppp-purge-btn button */
.nppp-purge-btn {
    background-color: #d9534f;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    font-size: 13px !important;
    transition: background-color 0.3s ease;
}

/* Style the nppp-purge-btn button */
.nppp-preload-btn {
    background-color: #3CB371;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    font-size: 13px !important;
    transition: background-color 0.3s ease;
}

/* Hover effect for nppp-purge-btn button */
.nppp-purge-btn:hover {
    background-color: #c9302c;
}

/* Hover effect for nppp-purge-btn button */
.nppp-preload-btn:hover {
    background-color: #2e8b57;
}

/* Style the length menu dropdown */
#nppp-premium-table_wrapper .dt-length {
    margin-bottom: 10px;
}

/* Style for the length label in the DataTables wrapper */
#nppp-premium-table_wrapper .dt-length label {
    font-weight: bold;
    margin-right: 10px;
}

/* Style for the length select input in the DataTables wrapper */
#nppp-premium-table_wrapper .dt-length select.dt-input {
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f0f8ff;
    color: #333;
    cursor: pointer;
    width: 45px;
}

/* Focus style for the length select input in the DataTables wrapper */
#nppp-premium-table_wrapper .dt-length select.dt-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}


/* Adjust cursor position inside Show entries dropdown */
div.nppp-premium-wrap div.dt-length select[id^="dt-length-"] {
    padding-right: 25px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

/* Style for the font size of table rows within the #nppp-premium-table */
#nppp-premium-table > tbody > tr {
    font-size: 13px !important;
}

/* Common style for the loading spinner */
.nppp-loading-spinner {
  position: relative;
  margin: auto;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  animation: rotate 1s infinite;
  height: 50px;
  width: 50px;
}

/* Style for the spinning ball before the loading spinner */
.nppp-loading-spinner:before,
.nppp-loading-spinner:after {
  border-radius: 50%;
  content: '';
  display: block;
  height: 20px;
  width: 20px;
}

/* Style for the spinning ball before the loading spinner */
.nppp-loading-spinner:before {
  animation: ball1 1s infinite;
  background-color: #cb2025;
  box-shadow: 30px 0 0 #f8b334;
  margin-bottom: 10px;
}

/* Style for the spinning ball after the loading spinner */
.nppp-loading-spinner:after {
  animation: ball2 1s infinite;
  background-color: #00a096;
  box-shadow: 30px 0 0 #97bf0d;
}

/* Keyframes for the rotation animation of the loading spinner */
@keyframes rotate {
  0% {
    -webkit-transform: rotate(0deg) scale(0.8);
    -moz-transform: rotate(0deg) scale(0.8);
  }
  50% {
    -webkit-transform: rotate(360deg) scale(1.2);
    -moz-transform: rotate(360deg) scale(1.2);
  }
  100% {
    -webkit-transform: rotate(720deg) scale(0.8);
    -moz-transform: rotate(720deg) scale(0.8);
  }
}

@keyframes ball1 {
  0% {
    box-shadow: 30px 0 0 #f8b334;
  }
  50% {
    box-shadow: 0 0 0 #f8b334;
    margin-bottom: 0;
    -webkit-transform: translate(15px,15px);
    -moz-transform: translate(15px, 15px);
  }
  100% {
    box-shadow: 30px 0 0 #f8b334;
    margin-bottom: 10px;
  }
}

@keyframes ball2 {
  0% {
    box-shadow: 30px 0 0 #97bf0d;
  }
  50% {
    box-shadow: 0 0 0 #97bf0d;
    margin-top: -20px;
    -webkit-transform: translate(15px,15px);
    -moz-transform: translate(15px, 15px);
  }
  100% {
    box-shadow: 30px 0 0 #97bf0d;
    margin-top: 0;
  }
}

/* Style for the font size and weight of links within tabs */
.ui-tabs .ui-tabs-nav li a {
    font-size: 15px;
    font-weight: 400;
}

/* Style for the bottom border of list items within tabs */
.ui-tabs .ui-tabs-nav li {
    border-bottom: 1px solid #c5c5c5;
}

/* Style for the header of UI widgets */
.ui-widget-header {
    border: 1px solid #fff;
    background: #fff;
}

/* Default styles for narrow screens */
.nppp-premium-wrap {
    width: 100%;
    margin-right: 0;
}

.nppp-premium-widget {
    display: none;
}

/* Flexbox layout for wide screens */
@media screen and (min-width: 768px) {
    .nppp-premium-container {
        display: flex;
        align-items: flex-start;
    }

    .nppp-premium-wrap {
        flex: 0 0 calc(70% - 10px);
        margin-right: 10px;
    }

    .nppp-premium-widget {
        flex: 0 0 calc(30% - 10px);
        display: block;
    }
}

/* Style for the advertisement section */
#nppp-ad {
    background-color: #f9f9f9;
    border: 3px solid #ff9900;
    padding: 20px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-left: 20px;
    padding-top: 22px;
}

/* Style for the heading within the advertisement section */
#nppp-ad h3 {
    color: #333;
    font-size: 20px;
    margin-bottom: 15px;
    line-height: 1.2;
}

/* Style for plain lists within the advertisement section */
#nppp-ad .plain-list {
    text-align: left;
    margin-top: 10px;
    list-style-type: circle;
    list-style-position: inside;
}

/* Style for list items within plain lists */
#nppp-ad .plain-list li {
    text-indent: -20px;
    padding-left: 23px;
    line-height: 23px;
    margin: 0;
}

/* Style for buttons within the advertisement section */
#nppp-ad .button {
    background-color: #0073e6;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
}

/* Hover style for buttons within the advertisement section */
#nppp-ad .button:hover {
    background-color: #0056b3;
}

/* Center align the content within the plugin activation section */
#nppp-plugin-activation {
    text-align: center;
    margin-left: 14px;
}

/* Style for the activation button */
#nppp-activate-button {
    font-size: 20px;
    padding: 10px 20px;
    border-radius: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

/* Hover effect for the activation button */
#nppp-activate-button:hover {
    background-color: #45a049;
    color: #333;
}

/* Base styles for the header content */
.nppp-header-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

/* Styles for the image container */
.nppp-img-container {
    flex: 0 0 auto;
    margin-right: 10px;
}

/* Styles for the image itself */
.nppp-img-container img {
    width: 90px;
    height: auto;
}

/* Styles for the cache buttons */
.nppp-cache-buttons {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 9px;
}

/* Very cool button style */
.nppp-button {
    display: inline-block;
    padding: 8px 10px;
    border-radius: 5px;
    background-color: #007BFF;
    color: white;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.nppp-button:hover {
    background-color: #0e81ce;
    border-color: #0e81ce;
    color: #FFFFFF;
}

/* Adjustments for small screens */
@media screen and (max-width: 768px) {
    .nppp-img-container img {
        width: 90px;
    }
    .nppp-img-container {
        margin-right: 0;
    }
    .nppp-cache-buttons {
        flex-direction: row;
        /*justify-content: space-evenly; */
        align-items: center;
        gap: 10px;
        /*margin-left: 15px;*/
    }

    .nppp-button {
        font-size: 14px;
        font-weight: 500;
    }
}

/* Style for the toggle switch container */
.nppp-onoffswitch {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

/* Hide the default checkbox */
.nppp-onoffswitch-checkbox {
    display: none;
}

/* Style for the toggle switch label */
.nppp-onoffswitch-label {
    cursor: pointer;
    display: inline-block;
    position: relative;
    width: 121px;
    height: 30px;
    font-weight: 600;
    background: #ffffff;
    border: 2px solid #f1f1f1;
    transition: background-color 0.3s;
}

/* Style for the text labels (On and Off) */
.nppp-onoffswitch-inner .nppp-on,
.nppp-onoffswitch-inner .nppp-off {
    position: absolute;
    line-height: 30px;
    font-size: 14px;
    z-index: 2;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

.nppp-onoffswitch-inner .nppp-on {
    right: 18px;
}

.nppp-onoffswitch-inner .nppp-off {
    left: 20px;
    color: #23282d;
}

/* Style for the toggle switch handle */
.nppp-onoffswitch-switch {
    display: inline-block;
    position: absolute;
    z-index: 1;
    background: #66b317;
    width: 55px;
    height: 24px;
    top: 3px;
    left: 3px;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
    transform: translateX(0px);
}

/* Adjust styles based on checkbox state */
#nginx_cache_send_mail:checked + .nppp-onoffswitch-label .nppp-onoffswitch-inner .nppp-on {
    color: #23282d;
}

#nginx_cache_send_mail:checked + .nppp-onoffswitch-label .nppp-onoffswitch-switch {
    width: 55px;
    transform: translateX(60px);
    background: #ea1919;
}

/* Show the Off label */
.nppp-onoffswitch-checkbox + .nppp-onoffswitch-label .nppp-off {
    display: block;
}

/* Hide the original checkbox */
#nginx_cache_send_mail {
    position: absolute;
    left: -99em;
}

/* Buttons dsabled */
.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes flash {
    0% { background-color: #4682b4; } /* Initial color */
    50% { background-color: #1e90ff; } /* Flashing color */
    100% { background-color: #4682b4; } /* Back to initial color */
}

.purged-row {
    animation: flash 0.5s; /* Flash effect for 0.5 seconds */
}

/* Styling for the icon tabs */
@media screen and (max-width: 768px) {
    .tab-header-container {
        display: flex;
        justify-content: center;
        margin-top: 15px;
    }

    #nppp-nginx-tabs li a {
        padding: 10px 20px;
    }

    #nppp-nginx-tabs li a:hover {
        background-color: #e0e0e0;
    }

    #nppp-nginx-tabs li a.active,
    #nppp-nginx-tabs li a:focus {
        background-color: #337AB7;
    }

    /* Hide tab text on mobile */
    #nppp-nginx-tabs li .tab-text {
        display: none;
    }

    /* Increase the size of the SVG icons to 48px */
    #nppp-nginx-tabs li a .nppp-svg-icon-container {
        width: 36px !important;
        height: 36px !important;
    }

    .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active, a.ui-button:active, .ui-button:active, .ui-button.ui-state-active:hover {
        border: unset;
    }
}

/* CSS for SVG icon container */
.nppp-svg-icon-container {
    display: inline-block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    vertical-align: middle;
}

/* CSS for SVG icon */
.nppp-svg-icon-container svg {
    width: 100%;
    height: auto;
}

/* add margin settings page th */
@media screen and (max-width: 768px) {
    .form-table th {
        padding: 30px 0px 5px 0;
        font-size: 16px;
    }
}

/* premium disable buttons */
button.nppp-purge-btn[disabled] {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

/* premium disable buttons */
button.nppp-preload-btn[disabled] {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

/* FAQ Accordion Styles */
#nppp-accordion {
    width: 100%;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}

#nppp-accordion .nppp-question {
    background-color: #f4f4f4 !important;
    color: #333;
    cursor: pointer;
    padding: 15px;
    margin: 0;
    font-size: 18px;
    border: 1px solid white;
    border-radius: 5px;
}

#nppp-accordion .nppp-answer {
    background-color: #fff !important;
    color: #333;
    padding: 15px;
    margin: 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#nppp-accordion .nppp-answer-content {
    font-size: 14px;
}

#nppp-accordion .nppp-answer-content pre {
    background-color: #f9f9f9 !important;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    overflow-x: auto;
}

#nppp-accordion .nppp-answer-content code {
    background-color: #f9f9f9 !important;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 2px 5px;
}

#nppp-accordion .nppp-answer-content ol,
#nppp-accordion .nppp-answer-content ul {
    margin-top: 10px;
    margin-bottom: 10px;
}

#nppp-accordion .nppp-answer-content ol ul {
    list-style-type: none;
    padding-left: 0;
}

/* jQuery UI Accordion Styles */
#nppp-accordion .ui-accordion-header {
    background-color: #337ab7 !important;
    color: white;
    cursor: pointer;
    padding: 15px;
    margin: 0;
    font-size: 15px;
}

#nppp-accordion .ui-accordion-content {
    background-color: #fff !important;
    color: #333;
    padding: 15px;
    margin: 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Active Header Color */
#nppp-accordion .ui-state-active {
    background-color: #337ab7 !important;
    color: #fff !important;
}

/* Tooltip container */
#nppp-unique-id .nppp-tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
  background-color: #337AB7;
  color: #fff;
  padding: 2px 5px;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  padding-right: 10px;
  padding-left: 9px;
}

/* Tooltip text */
#nppp-unique-id .nppp-tooltip .nppp-tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
}

/* Tooltip text arrow */
#nppp-unique-id .nppp-tooltip .nppp-tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

/* Show the tooltip text on hover */
#nppp-unique-id .nppp-tooltip:hover .nppp-tooltiptext {
  visibility: visible;
  opacity: 1;
}

.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active, a.ui-button:active, .ui-button:active, .ui-button.ui-state-active:hover {
    border: unset !important;
    background: #337AB7 !important;
    border-bottom: 3px solid orange !important;
    border-radius: 5px;
}

.wp-person a:focus .gravatar, a:focus, a:focus .media-icon img, a:focus .plugin-icon {
    box-shadow: none !important;
}

/* Style for the toggle switch preload container */
.nppp-onoffswitch-preload {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

/* Hide the default checkbox */
.nppp-onoffswitch-checkbox-preload {
    display: none;
}

/* Style for the toggle switch label */
.nppp-onoffswitch-label-preload {
    cursor: pointer;
    display: inline-block;
    position: relative;
    width: 121px;
    height: 30px;
    font-weight: 600;
    background: #ffffff;
    border: 2px solid #f1f1f1;
    transition: background-color 0.3s;
}

/* Style for the text labels (On and Off) */
.nppp-onoffswitch-inner-preload .nppp-on-preload,
.nppp-onoffswitch-inner-preload .nppp-off-preload {
    position: absolute;
    line-height: 30px;
    font-size: 14px;
    z-index: 2;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

.nppp-onoffswitch-inner-preload .nppp-on-preload {
    right: 18px;
}

.nppp-onoffswitch-inner-preload .nppp-off-preload {
    left: 20px;
    color: #23282d;
}

/* Style for the toggle switch handle */
.nppp-onoffswitch-switch-preload {
    display: inline-block;
    position: absolute;
    z-index: 1;
    background: #66b317;
    width: 55px;
    height: 24px;
    top: 3px;
    left: 3px;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
    transform: translateX(0px);
}

/* Adjust styles based on checkbox state */
#nginx_cache_auto_preload:checked + .nppp-onoffswitch-label-preload .nppp-onoffswitch-inner-preload .nppp-on-preload {
    color: #23282d;
}

#nginx_cache_auto_preload:checked + .nppp-onoffswitch-label-preload .nppp-onoffswitch-switch-preload {
    width: 55px;
    transform: translateX(60px);
    background: #ea1919;
}

/* Show the Off label */
.nppp-onoffswitch-checkbox-preload + .nppp-onoffswitch-label-preload .nppp-off-preload {
    display: block;
}

/* Hide the original checkbox */
#nginx_cache_auto_preload {
    position: absolute;
    left: -99em;
}

/* Change fill color of SVG icons in active tab */
.ui-tabs-active a .nppp-svg-icon-container svg path {
    fill: white;
}

/* style premium auto preload settings accordingly */
.nppp-onoffswitch-checkbox-preload[disabled] + .nppp-onoffswitch-label-preload {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

/* style premium rest api settings accordingly */
.nppp-onoffswitch-checkbox-api[disabled] + .nppp-onoffswitch-label-api {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

/* premium tooltip */
.premium-tooltip {
  display: inline-block;
  background-color: #337AB7;
  color: #fff;
  padding: 2px 5px;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  margin-left: 10px;
  opacity: 0.5;
}

/* Auto preload premium  container */
.nppp-auto-preload-container {
    display: flex;
    align-items: flex-start;
}

/* Set max width of reject regex field */
#nginx_cache_reject_regex {
    max-width: 978px;
}

/* Set max width of reject extension field */
#nginx_cache_reject_extension {
    max-width: 978px;
}

/* Set max width of cache key regex field */
#nginx_cache_key_custom_regex {
    max-width: 978px;
}

/* Set max width of mobile user agent field */
#nginx_cache_mobile_user_agent {
    max-width: 978px;
}

/* Style for the toggle switch api container */
.nppp-onoffswitch-api {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

/* Hide the default api checkbox */
.nppp-onoffswitch-checkbox-api {
    display: none;
}

/* Style for the toggle switch label api */
.nppp-onoffswitch-label-api {
    cursor: pointer;
    display: inline-block;
    position: relative;
    width: 121px;
    height: 30px;
    font-weight: 600;
    background: #ffffff;
    border: 2px solid #f1f1f1;
    transition: background-color 0.3s;
}

/* Style for the text labels (On and Off) for api */
.nppp-onoffswitch-inner-api .nppp-on-api,
.nppp-onoffswitch-inner-api .nppp-off-api {
    position: absolute;
    line-height: 30px;
    font-size: 14px;
    z-index: 2;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

.nppp-onoffswitch-inner-api .nppp-on-api {
    right: 18px;
}

.nppp-onoffswitch-inner-api .nppp-off-api {
    left: 20px;
    color: #23282d;
}

/* Style for the toggle switch handle api */
.nppp-onoffswitch-switch-api {
    display: inline-block;
    position: absolute;
    z-index: 1;
    background: #66b317;
    width: 55px;
    height: 24px;
    top: 3px;
    left: 3px;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
    transform: translateX(0px);
}

/* Adjust styles based on checkbox state api */
#nginx_cache_api:checked + .nppp-onoffswitch-label-api .nppp-onoffswitch-inner-api .nppp-on-api {
    color: #23282d;
}

#nginx_cache_api:checked + .nppp-onoffswitch-label-api .nppp-onoffswitch-switch-api {
    width: 55px;
    transform: translateX(60px);
    background: #ea1919;
}

/* Show the Off label api */
.nppp-onoffswitch-checkbox-api + .nppp-onoffswitch-label-api .nppp-off-api {
    display: block;
}

/* Hide the original checkbox api */
#nginx_cache_api {
    position: absolute;
    left: -99em;
}

/* API Key field styles */
#nginx_cache_api_key {
    display: block !important;
    margin-top: 10px !important;
}

/* Tooltip container for nppp-api-key */
#nppp-api-key .nppp-tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
  background-color: #337AB7;
  color: #fff;
  padding: 2px 5px;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  padding-right: 10px;
  padding-left: 9px;
}

/* Tooltip text for nppp-api-key */
#nppp-api-key .nppp-tooltip .nppp-tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
}

/* Tooltip text arrow for nppp-api-key */
#nppp-api-key .nppp-tooltip .nppp-tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

/* Show the tooltip text on hover for nppp-api-key */
#nppp-api-key .nppp-tooltip:hover .nppp-tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Tooltip container for nppp-purge-url */
#nppp-purge-url .nppp-tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
  background-color: #337AB7;
  color: #fff;
  padding: 2px 5px;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  padding-right: 10px;
  padding-left: 9px;
}

/* Tooltip text for nppp-purge-url*/
#nppp-purge-url .nppp-tooltip .nppp-tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
}

/* Tooltip text arrow for nppp-purge-url */
#nppp-purge-url .nppp-tooltip .nppp-tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

/* Show the tooltip text on hover for nppp-purge-url */
#nppp-purge-url .nppp-tooltip:hover .nppp-tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Tooltip container for nppp-preload-url */
#nppp-preload-url .nppp-tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
  background-color: #337AB7;
  color: #fff;
  padding: 2px 5px;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  padding-right: 10px;
  padding-left: 9px;
}

/* Tooltip text for nppp-preload-url*/
#nppp-preload-url .nppp-tooltip .nppp-tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
}

/* Tooltip text arrow for nppp-preload-url */
#nppp-preload-url .nppp-tooltip .nppp-tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

/* Show the tooltip text on hover for nppp-purge-url */
#nppp-preload-url .nppp-tooltip:hover .nppp-tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Style for the toggle switch preload container */
.nppp-onoffswitch-schedule {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

/* Hide the default checkbox */
.nppp-onoffswitch-checkbox-schedule {
    display: none;
}

/* Style for the toggle switch label */
.nppp-onoffswitch-label-schedule {
    cursor: pointer;
    display: inline-block;
    position: relative;
    width: 121px;
    height: 30px;
    font-weight: 600;
    background: #ffffff;
    border: 2px solid #f1f1f1;
    transition: background-color 0.3s;
}

/* Style for the text labels (On and Off) */
.nppp-onoffswitch-inner-schedule .nppp-on-schedule,
.nppp-onoffswitch-inner-schedule .nppp-off-schedule {
    position: absolute;
    line-height: 30px;
    font-size: 14px;
    z-index: 2;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

.nppp-onoffswitch-inner-schedule .nppp-on-schedule {
    right: 18px;
}

.nppp-onoffswitch-inner-schedule .nppp-off-schedule {
    left: 20px;
    color: #23282d;
}

/* Style for the toggle switch handle */
.nppp-onoffswitch-switch-schedule {
    display: inline-block;
    position: absolute;
    z-index: 1;
    background: #66b317;
    width: 55px;
    height: 24px;
    top: 3px;
    left: 3px;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
    transform: translateX(0px);
}

/* Adjust styles based on checkbox state */
#nginx_cache_schedule:checked + .nppp-onoffswitch-label-schedule .nppp-onoffswitch-inner-schedule .nppp-on-schedule {
    color: #23282d;
}

#nginx_cache_schedule:checked + .nppp-onoffswitch-label-schedule .nppp-onoffswitch-switch-schedule {
    width: 55px;
    transform: translateX(60px);
    background: #ea1919;
}

/* Show the Off label */
.nppp-onoffswitch-checkbox-schedule + .nppp-onoffswitch-label-schedule .nppp-off-schedule {
    display: block;
}

/* Hide the original checkbox */
#nginx_cache_schedule {
    position: absolute;
    left: -99em;
}

/* style cache schedule settings accordingly */
.nppp-onoffswitch-checkbox-schedule[disabled] + .nppp-onoffswitch-label-schedule {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

/* add hover to to tooltip */
#nppp-api-key .nppp-tooltip:hover,
#nppp-purge-url .nppp-tooltip:hover,
#nppp-preload-url .nppp-tooltip:hover,
#nppp-unique-id .nppp-tooltip:hover {
    background-color: #1366D6;
}

/* Dropdown select container styling */
.nppp-cron-event-select-container {
    position: relative;
    display: inline-block;
}

/* Hover effect */
.nppp-cron-event-select:hover {
    border-color: #999;
}

/* Focus effect */
.nppp-cron-event-select:focus {
    outline: none;
    border-color: #333;
}

/* Arrow icon styling */
.nppp-cron-event-select::after {
    content: '\25BC';
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
}

/* Style for the disabled option */
.nppp-cron-event-select option[value=""][disabled] {
    background-color: #337ab7;
    color: #fff;
    font-weight: bold;
}

/* Wrapper for the select and time select containers */
.nppp-select-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-top: 10px;
}

/* Style for the select container */
.nppp-cron-event-select-container {
    margin-right: 7px; /* Adjust spacing as needed */
}

.nppp-cron-event-select {
    width: 125px !important;
    border: 2px solid #f1f1f1 !important;
    margin-left: 0px !important;
    border-radius: 0px !important;
    min-height: 34px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

.nppp-cron-event-select:hover {
    color: #2271b1 !important;
    box-shadow: 0 0 0 2px #1366D6 !important;
}

#nppp_datetimepicker1Input {
    border: 2px solid #f1f1f1 !important;
    border-radius: 0px !important;
    max-width: 72px;
    font-size: 14px;
    font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
    line-height: 2;
    color: #2c3338;
    border-color: #8c8f94;
    box-shadow: none;
    padding: 0 24px 0 8px;
    -webkit-appearance: none;
    background: #fff url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E) no-repeat right 5px top 55%;
    background-size: 16px 16px;
    cursor: pointer;
    vertical-align: middle;
    min-height: 34px;
}

.tempus-dominus-widget {
    width: 151px !important;
}

#nppp_datetimepicker1Input:hover {
    color: #2271b1;
    box-shadow: 0 0 0 2px #1366D6;
}

@media screen and (min-width: 320px) {
    .nppp-cron-event-select {
        font-size: 14px !important;
        min-height: 34px !important;
        padding: 0px 24px 0px 8px !important;
    }
}

/* Style for the container */
.nppp-time-select-container {
    display: inline-block;
}

/* Style for the input group */
.nppp-input-group {
    display: flex;
    align-items: center;
}

/* Style for the input group append */
.nppp-input-group-append {
    margin-left: 7px;
}

/* Style for the SET button */
.nginx-cache-schedule-set-button {
    cursor: pointer !important;
    background-color: #337AB7 !important;
    min-height: 25px !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    color: #fff !important;
    border: none !important;
    padding: 0 10px !important;
    border-radius: unset !important;
}

/* Hover effect */
.nginx-cache-schedule-set-button:hover {
    background-color: #1366D6 !important;
}

/* Hover background color for #nginx-cache-schedule-set .nppp-tooltip */
#nginx-cache-schedule-set .nppp-tooltip:hover {
    background-color: #1366D6 !important;
}

/* Media query for mobile devices */
@media only screen and (max-width: 768px) {
    /* Disable margin-bottom */
    .nginx-cache-schedule-set-button,
    #nginx-cache-schedule-set {
        margin-bottom: 0 !important;
    }

    .nginx-cache-schedule-set-button:hover {
        background-color: #1366D6 !important;
    }

    #nginx-cache-schedule-set .nppp-tooltip:hover {
        background-color: #1366D6 !important;
    }

    /* Reset line-height */
    .nginx-cache-schedule-set-button {
        line-height: 2.11428571 !important;
    }

    .nppp-scheduled-event {
        max-width: none !important;
    }
}

/* Tooltip container for nginx-cache-schedule-set */
#nginx-cache-schedule-set .nppp-tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
    background-color: #337AB7;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
}

/* Tooltip text for nginx-cache-schedule-set */
#nginx-cache-schedule-set .nppp-tooltip .nppp-tooltiptext {
    visibility: hidden;
    width: 92px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 136%;
    left: 74%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    line-height: 1.6;
}

/* Tooltip text arrow for nginx-cache-schedule-set */
#nginx-cache-schedule-set .nppp-tooltip .nppp-tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

/* Show the tooltip text on hover for nginx-cache-schedule-set */
#nginx-cache-schedule-set .nppp-tooltip:hover .nppp-tooltiptext {
    visibility: visible;
    opacity: 1;
}

.nppp-tooltip:hover {
  background-color: #1366D6 !important;
}

#nginx-cache-schedule-set[disabled] {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #337AB7 !important;
}

/* CSS Styles for Scheduled Events */
.nppp-scheduled-event {
    border: 2px solid #f1f1f1;
    /* border: 2px solid #ccc; */
    padding: 10px;
    margin-bottom: 10px;
    /* background-color: #f9f9f9; */
    max-width: max-content;
}

.nppp-scheduled-event .nppp-hook-name {
    color: #ff5722;
    font-weight: bold;
}

.nppp-scheduled-event .nppp-next-run {
    color: #2196f3;
}

.nppp-cron-info {
    margin-bottom: 5px;
}

.nppp-cancel-btn-container {
    margin-top: 5px;
}

.nppp-scheduled-event .nppp-cancel-btn {
    background-color: #f44336;
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 5px 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.nppp-scheduled-event .nppp-cancel-btn:hover {
    background-color: #d32f2f;
}

/* CSS Styles for Active Cron Heading */
.nppp-active-cron-heading {
    background-color: #337AB7;
    color: #fff;
    padding: 2px 5px;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    padding-right: 10px;
    padding-left: 9px;
    max-width: max-content;
    margin-top: unset;
    margin-bottom: 5px;
}

#nppp_datetimepicker1Input::placeholder {
    color: #2c3338 !important;
    font-size: 14px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

.status-and-nginx-info-container {
    display: flex;
}

#nppp-status-tab, #nppp-nginx-info {
    width: 50%;
    box-sizing: border-box;
    padding: 10px;
}

/* NGINX Status Table */
#nppp-nginx-info .nginx-status table {
    width: 100%;
    border-collapse: collapse;
}

/* NGINX Table Header Styles */
#nppp-nginx-info .nginx-status th {
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #ccc;
    background-color: #f0f0f0;
    color: #333;
}

/* NGINX Action Cells */
#nppp-nginx-info .nginx-status .action {
    font-weight: bold;
    padding: 10px;
    border-bottom: 1px solid #ccc;
}

/* NGINX Status Cells */
#nppp-nginx-info .nginx-status .status {
    padding: 10px;
    border-bottom: 1px solid #ccc;
}

/* NGINX Nested Table Styles */
#nppp-nginx-info .nginx-status .status .nginx-config-table {
    width: 100%;
    border-collapse: collapse;
}

/* NGINX Nested Table Header Styles */
#nppp-nginx-info .nginx-status .status .nginx-config-table th {
    padding: 8px;
    text-align: left;
    border-bottom: 2px solid #ccc;
    background-color: #f0f0f0;
    color: #333;
}

/* NGINX Nested Table Data Styles */
#nppp-nginx-info .nginx-status .status .nginx-config-table td {
    padding: 8px;
    padding-left: 0px;
    border-bottom: 1px solid #ccc;
}

#nppp-nginx-info h2 {
    background-color: #337AB7;
    color: #fff;
    padding: 10px;
    margin-top: 20px;
    margin-bottom: 0px;
    text-transform: uppercase;
}

#nppp-nginx-info {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    margin-left: 20px;
}

#nppp-nginx-info .nginx-status .status .nginx-config-table th {
    background-color: #337AB7;
    color: #fff;
    padding: 10px;
    margin-top: 20px;
    margin-bottom: 0px;
    text-transform: uppercase;
}

/* Share width between action and status columns */
.nginx-status .action,
.nginx-status .status {
    width: 50%;
}

#npppNginxVersion span,
#npppOpenSSLVersion span,
#npppSafexecVersion span,
#npppWgetVersion span,
#npppRgVersion span {
    font-size: 14px;
    color: green;
    font-weight: bold;
}

/* Responsive layout for mobile */
@media (max-width: 768px) {
    .status-and-nginx-info-container {
        display: flex;
        flex-direction: column;
    }

    #nppp-status-tab.container,
    #nppp-nginx-info.container {
        width: 100%;
    }

    #nppp-nginx-info {
        margin-left: 0px !important;
        margin-top: 20px;
    }
}

#nppp-status-tab .cache-status table {
    width: 100%;
    border-collapse: collapse;
}

/* Cache Hit Ratio — colour bands applied via JS after DOM load */
#npppCacheHitRatio.ratio-high   span:last-child { color: #008000; } /* >= 80 % */
#npppCacheHitRatio.ratio-medium span:last-child { color: #e69500; } /* 50-79 % */
#npppCacheHitRatio.ratio-low    span:last-child { color: #d9534f; } /* < 50 % */
#npppCacheHitRatio.ratio-na     span:last-child { color: #72777c; }

/* Cache Disk Size — colour bands (low usage = good) */
#npppCacheDiskSize.disk-low    span:last-child { color: #008000; } /* < 50 % used  */
#npppCacheDiskSize.disk-medium span:last-child { color: #e69500; } /* 50-79 % used */
#npppCacheDiskSize.disk-high   span:last-child { color: #d9534f; } /* >= 80 % used */
#npppCacheDiskSize.disk-na     span:last-child { color: #72777c; }

/* Style for the settings tab group separator */
.nppp-separator {
    border: none;
    border-top: 2px solid #FFA500;
    width: 160px;
}

/* Style for the toggle switch autopurge container */
.nppp-onoffswitch-autopurge {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

/* Hide the default autopurge checkbox */
.nppp-onoffswitch-checkbox-autopurge {
    display: none;
}

/* Style for the autopurge toggle switch label */
.nppp-onoffswitch-label-autopurge {
    cursor: pointer;
    display: inline-block;
    position: relative;
    width: 121px;
    height: 30px;
    font-weight: 600;
    background: #ffffff;
    border: 2px solid #f1f1f1;
    transition: background-color 0.3s;
}

/* Style for autopurge text labels (On and Off) */
.nppp-onoffswitch-inner-autopurge .nppp-on-autopurge,
.nppp-onoffswitch-inner-autopurge .nppp-off-autopurge {
    position: absolute;
    line-height: 30px;
    font-size: 14px;
    z-index: 2;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

.nppp-onoffswitch-inner-autopurge .nppp-on-autopurge {
    right: 18px;
}

.nppp-onoffswitch-inner-autopurge .nppp-off-autopurge {
    left: 20px;
    color: #23282d;
}

/* Style for the toggle switch handle autopurge */
.nppp-onoffswitch-switch-autopurge {
    display: inline-block;
    position: absolute;
    z-index: 1;
    background: #66b317;
    width: 55px;
    height: 24px;
    top: 3px;
    left: 3px;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
    transform: translateX(0px);
}

/* Adjust styles based on checkbox state */
#nginx_cache_purge_on_update:checked + .nppp-onoffswitch-label-autopurge .nppp-onoffswitch-inner-autopurge .nppp-on-autopurge {
    color: #23282d;
}

#nginx_cache_purge_on_update:checked + .nppp-onoffswitch-label-autopurge .nppp-onoffswitch-switch-autopurge {
    width: 55px;
    transform: translateX(60px);
    background: #ea1919;
}

/* Show the Off label */
.nppp-onoffswitch-checkbox-autopurge + .nppp-onoffswitch-label-autopurge .nppp-off-autopurge {
    display: block;
}

/* Hide the original autopurge checkbox */
#nginx_cache_purge_on_update {
    position: absolute;
    left: -99em;
}

/* Style for the toggle switch cloudflare container */
.nppp-onoffswitch-cloudflare {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

/* Hide the default cloudflare checkbox */
.nppp-onoffswitch-checkbox-cloudflare {
    display: none;
}

/* Style for the cloudflare toggle switch label */
.nppp-onoffswitch-label-cloudflare {
    cursor: pointer;
    display: inline-block;
    position: relative;
    width: 121px;
    height: 30px;
    font-weight: 600;
    background: #ffffff;
    border: 2px solid #f1f1f1;
    transition: background-color 0.3s;
}

/* Style for cloudflare text labels (On and Off) */
.nppp-onoffswitch-inner-cloudflare .nppp-on-cloudflare,
.nppp-onoffswitch-inner-cloudflare .nppp-off-cloudflare {
    position: absolute;
    line-height: 30px;
    font-size: 14px;
    z-index: 2;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

.nppp-onoffswitch-inner-cloudflare .nppp-on-cloudflare {
    right: 18px;
}

.nppp-onoffswitch-inner-cloudflare .nppp-off-cloudflare {
    left: 20px;
    color: #23282d;
}

/* Style for the toggle switch handle cloudflare */
.nppp-onoffswitch-switch-cloudflare {
    display: inline-block;
    position: absolute;
    z-index: 1;
    background: #ea1919;
    width: 55px;
    height: 24px;
    top: 3px;
    left: 3px;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
    transform: translateX(0px);
}

/* Adjust styles based on checkbox state */
#nppp_cloudflare_apo_sync:checked + .nppp-onoffswitch-label-cloudflare .nppp-onoffswitch-inner-cloudflare .nppp-on-cloudflare {
    color: #23282d;
}

#nppp_cloudflare_apo_sync:checked + .nppp-onoffswitch-label-cloudflare .nppp-onoffswitch-switch-cloudflare {
    width: 55px;
    transform: translateX(60px);
    background: #66b317;
}

/* Show the Off label */
.nppp-onoffswitch-checkbox-cloudflare + .nppp-onoffswitch-label-cloudflare .nppp-off-cloudflare {
    display: block;
}

/* Hide the original cloudflare checkbox */
#nppp_cloudflare_apo_sync {
    position: absolute;
    left: -99em;
}

/* style disabled cloudflare settings accordingly */
.nppp-onoffswitch-checkbox-cloudflare[disabled] + .nppp-onoffswitch-label-cloudflare {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

/* style disabled auto purge settings accordingly */
.nppp-onoffswitch-checkbox-autopurge[disabled] + .nppp-onoffswitch-label-autopurge {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

/* style send e-mail toggle switch settings accordingly */
.nppp-onoffswitch-checkbox:disabled + .nppp-onoffswitch-label {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

.text-left {
    text-align: left !important;
}

/* style for advanced tab error messages */
.nppp-advanced-error-message {
    color: white;
    background-color: cadetblue;
    font-weight: bold;
    max-width: max-content;
    padding: 5px;
    font-size: 12.5px;
}

/* Show line breaks on screens wider than 768px (e.g., tablets and desktops) */
@media (min-width: 768px) {
    .cache-path-plugin-note .line-break {
        display: inline;
    }
}

/* Hide line breaks on screens narrower than 768px (e.g., mobile devices) */
@media (max-width: 767px) {
    .cache-path-plugin-note .line-break {
        display: none;
    }
}

/* Style for header cache button notification */
.nppp-cache-tip {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    background-color: #337AB7;
    color: white;
    font-weight: 500;
    padding: 2px;
    align-items: center;
}

.nppp-buttons-wrapper {
    display: flex;
    flex-direction: column;
}

@media (max-width: 767px) {
    .nppp-cache-tip {
        /*margin-left: 15px;*/
        font-weight: 500;
        font-size: 13px;
        margin-top: 6px;
    }
}

/* Loader Overlay */
#nppp-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    pointer-events: none;
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#nppp-loader-overlay.active {
    display: flex;
    pointer-events: all;
}

/* Spinner Container */
.nppp-spinner-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 12vw;
    height: 12vw;
    max-width: 80px;
    max-height: 80px;
    border-radius: 50%;
}

/* Spinner Animation */
.nppp-loader {
    position: absolute;
    border: 8px solid rgba(224, 224, 224, 1);
    border-top: 8px solid rgba(77, 184, 255, 1);
    border-radius: 50%;
    width: 100%;
    height: 100%;
    animation: nppp-spin 1s linear infinite;
    z-index: 3;
}

@keyframes nppp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mask Container (used for filling effect) */
.nppp-fill-mask {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    z-index: 1;
}

/* Circular Filling Effect */
.nppp-loader-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200%;
    background: rgba(51, 122, 183, 1);
    transform: scaleY(0);
    transform-origin: bottom;
    animation: nppp-fill 5s ease-in-out infinite;
}

@keyframes nppp-fill {
    0% {
        transform: scaleY(0);
    }
    50% {
        transform: scaleY(1);
    }
    100% {
        transform: scaleY(0);
    }
}

/* Static Text */
.nppp-loader-text {
    position: absolute;
    color: #ffffff;
    font-weight: bold;
    font-size: 1.8em;
    pointer-events: none;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    z-index: 4;
}

@media (max-width: 600px) {
    .nppp-loader-text {
        font-size: 1.4em;
    }
}

/* Loader Message (Text below the spinner) */
.nppp-loader-message {
    margin-top: 20px;
    color: #ffffff;
    font-size: 1.4em;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 600px) {
    .nppp-loader-message {
        font-size: 1.2em;
    }
}

/* Disabled Button Style */
.nppp-button.disabled {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

/* Make the submit container sticky at the bottom */
.submit {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background-color: #fff;
    padding: 10px;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateZ(0);
    will-change: transform;
}

/* Make the submit button itself full-width */
.submit input[type="submit"] {
    width: 100%;
    padding: 5px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
}

/* Button hover effect */
.submit input[type="submit"]:hover {
    background-color: #006799;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
    .submit {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        padding: 10px 10px;
    }

    .submit input[type="submit"] {
        font-size: 15px;
        padding: 12px;
    }
}

/* Target the specific submit button */
.submit input[type="submit"].button-primary:focus {
    box-shadow: none;
    outline: none;
}

p.description {
    font-size: 14px;
    color: #646970;
    margin: 2px 0 5px;
    font-style: normal;
}

/* Style settings tab submenu items */
.nppp-submenu {
    margin-bottom: 20px;
}

.nppp-submenu ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 15px;
    margin-left: -12px;
    margin-top: 0px;
    border: 2px dotted #FFA500;
    padding-left: 5px;
    padding-right: 5px;
    padding-top: 10px;
    padding-bottom: 5px;
    overflow-x: auto;
    justify-content: flex-start;
    max-width: max-content;
}

.nppp-submenu ul li {
    display: inline;
}

.nppp-submenu ul li a {
    text-decoration: none;
    color: #0073aa;
    font-weight: 600;
}

.nppp-submenu ul li a:hover {
    color: #ff6f61;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .nppp-submenu ul {
        flex-direction: column;
        align-items: center;
        margin-left: 0;
        margin: 0 auto;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .nppp-button-link {
        width: 100%;
    }

    .nppp-submenu ul li a:focus {
        background-color: white !important;
    }
}

/* Responsive Adjustments for Tablets */
@media (min-width: 601px) and (max-width: 769px) {
    .nppp-submenu ul {
        flex-direction: column;
        align-items: center;
        margin-left: 0;
        margin: 0 auto;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .nppp-button-link {
        width: 100%;
    }

    .nppp-submenu ul li a:focus {
        background-color: white !important;
    }
}

/* Style form submit button changes */
.nppp-submit-changed {
    background-color: #a70000 !important;
    color: white !important;
}

/* Add transition for smooth color change */
#nppp-settings-form input[type="submit"].nppp-submit-changed {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom style for jQuery UI theme */
.ui-widget {
    font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
    font-size: 1em;
}

/* style table header elements */
#nppp-nginx-info .check-header {
    text-transform: uppercase !important;
    font-size: 14px !important;
    color: #0073e6 !important;
    background-color: #F0F0F0 !important;
    padding: 8px 10px !important;
}

#nppp-nginx-info .status-header {
    text-transform: uppercase !important;
    font-size: 14px !important;
    color: #0073e6 !important;
    background-color: #F0F0F0 !important;
    padding: 8px 10px !important;
}

/* Ensure the table occupies full width */
.nginx-status table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

/* Set width for table header cells */
.nginx-status thead th {
    width: 50%;
}

/* Set width for table data cells */
.nginx-status td.action,
.nginx-status td.status {
    width: 50%;
}

/* Allow wrapping for long text in status cells on mobile */
@media (max-width: 768px) {
    .nginx-status td.action,
    .nginx-status td.status {
        word-wrap: break-word;
        white-space: normal;
    }
}

/* Set size of checkbox For mobile devices */
@media (max-width: 768px) {
    #nginx_cache_tracking_opt_in {
        transform: scale(0.8);
    }
}

/* Ensure the table occupies full width */
.status-summary table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

/* Set width for table header cells */
.status-summary thead th {
    width: 50%;
}

/* Set width for table data cells */
.status-summary td.action,
.status-summary td.status {
    width: 50%;
}

.nginx-status td.action,
.nginx-status td.status {
    word-wrap: break-word;
    white-space: normal;
}

.highlight-metric {
    background-color: mintcream;
}

.cache-paths-info {
    max-width: 500px;
    color: #722F37;
    background-color: mintcream;
    border-left: 4px solid orange;
    padding: 10px;
    font-size: 12px !important;
    margin-top: 12px !important;
}

.cache-paths-info h4 {
    font-size: 1.1em;
    color: #333;
    margin-bottom: 8px;
    margin-top: 0;
}

.cache-paths-info p {
    font-size: 12px !important;
    color: #722F37;
    margin-bottom: 10px;
}

.cache-paths-info code {
    background-color: #EDEDED;
    font-size: 12px !important;
}

/* Show line breaks on screens wider than 768px (e.g., tablets and desktops) */
@media (min-width: 768px) {
    .cache-paths-info .line-break {
        display: inline;
    }
}

/* Hide line breaks on screens narrower than 768px (e.g., mobile devices) */
@media (max-width: 767px) {
    .cache-paths-info .line-break {
        display: none;
    }
}

/* Style for the toggle switch preload mobile container */
.nppp-onoffswitch-preload-mobile {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

/* Hide the default preload mobile checkbox */
.nppp-onoffswitch-checkbox-preload-mobile {
    display: none;
}

/* Style for the preload mobile toggle switch label */
.nppp-onoffswitch-label-preload-mobile {
    cursor: pointer;
    display: inline-block;
    position: relative;
    width: 121px;
    height: 30px;
    font-weight: 600;
    background: #ffffff;
    border: 2px solid #f1f1f1;
    transition: background-color 0.3s;
}

/* Style for preload mobile text labels (On and Off) */
.nppp-onoffswitch-inner-preload-mobile .nppp-on-preload-mobile,
.nppp-onoffswitch-inner-preload-mobile .nppp-off-preload-mobile {
    position: absolute;
    line-height: 30px;
    font-size: 14px;
    z-index: 2;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

.nppp-onoffswitch-inner-preload-mobile .nppp-on-preload-mobile {
    right: 18px;
}

.nppp-onoffswitch-inner-preload-mobile .nppp-off-preload-mobile {
    left: 20px;
    color: #23282d;
}

/* Style for the toggle switch handle preload mobile */
.nppp-onoffswitch-switch-preload-mobile {
    display: inline-block;
    position: absolute;
    z-index: 1;
    background: #66b317;
    width: 55px;
    height: 24px;
    top: 3px;
    left: 3px;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
    transform: translateX(0px);
}

/* Adjust styles based on preload mobile checkbox state */
#nginx_cache_auto_preload_mobile:checked + .nppp-onoffswitch-label-preload-mobile .nppp-onoffswitch-inner-preload-mobile .nppp-on-preload-mobile {
    color: #23282d;
}

#nginx_cache_auto_preload_mobile:checked + .nppp-onoffswitch-label-preload-mobile .nppp-onoffswitch-switch-preload-mobile {
    width: 55px;
    transform: translateX(60px);
    background: #ea1919;
}

/* Show the Off label preload mobile*/
.nppp-onoffswitch-checkbox-preload-mobile + .nppp-onoffswitch-label-preload-mobile .nppp-off-preload-mobile {
    display: block;
}

/* Hide the original preload mobile checkbox */
#nginx_cache_auto_preload_mobile {
    position: absolute;
    left: -99em;
}

/* style disabled preload mobile settings accordingly */
.nppp-onoffswitch-checkbox-preload-mobile[disabled] + .nppp-onoffswitch-label-preload-mobile {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

/* style for settings page actions button */
#nppp-purge-button.nppp-button {
    background-color: #d9534f;
    color: white;
}

#nppp-purge-button.nppp-button:hover {
    background-color: #c9302c;
    color: white;
}

#nppp-preload-button.nppp-button {
    background-color: #3CB371;
    color: white;
}

#nppp-preload-button.nppp-button:hover {
    background-color: #2e8b57;
    color: white;
}

/* Submenu Items */
.nppp-submenu ul li {
    position: relative !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
}

/* Submenu Links */
.nppp-submenu ul li a {
    text-decoration: none !important;
    padding: 5px 0 !important;
    transition: color 0.2s ease !important;
    position: relative !important;
}

/* Hover and Active Underline */
.nppp-submenu ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -5px;
    height: 3px;
    background-color: transparent;
    transition: background-color 0.3s ease, transform 0.3s ease;
    transform: scaleX(0);
    transform-origin: left;
}

/* Submenu Underline Colors */
.nppp-submenu ul li:nth-child(1) a::after {
    background-color: #0073aa;
}
.nppp-submenu ul li:nth-child(2) a::after {
    background-color: #ff5722;
}
.nppp-submenu ul li:nth-child(3) a::after {
    background-color: #4caf50;
}
.nppp-submenu ul li:nth-child(4) a::after {
    background-color: #9c27b0;
}
.nppp-submenu ul li:nth-child(5) a::after {
    background-color: #ff9800;
}
.nppp-submenu ul li:nth-child(6) a::after {
    background-color: #2196f3;
}

/* Hover Effect */
.nppp-submenu ul li a:hover::after,
.nppp-submenu ul li a.active::after {
    transform: scaleX(1);
}

/* Active Link */
.nppp-submenu ul li a.active {
    background-color: #fff !important;
    color: #ff6f61;
}

/* Persistent Underline for Active Link */
.nppp-submenu ul li a.active::after {
    transform: scaleX(1);
}

#wp-admin-bar-fastcgi-cache-operations {
    background-color: midnightblue !important;
}

.key-regex-info {
    max-width: 978px;
}

@media (max-width: 768px) {
  .container p,
  .wrap p,
  .logs-container div,
  .answer,
  .question {
    overflow-wrap: break-word;
    word-break: break-word;
  }
}

/* Style for the toggle switch proxy container */
.nppp-onoffswitch-proxy {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

/* Hide the default checkbox */
.nppp-onoffswitch-checkbox-proxy {
    display: none;
}

/* Style for the toggle switch label */
.nppp-onoffswitch-label-proxy {
    cursor: pointer;
    display: inline-block;
    position: relative;
    width: 121px;
    height: 30px;
    font-weight: 600;
    background: #ffffff;
    border: 2px solid #f1f1f1;
    transition: background-color 0.3s;
}

/* Style for the text labels (On and Off) */
.nppp-onoffswitch-inner-proxy .nppp-on-proxy,
.nppp-onoffswitch-inner-proxy .nppp-off-proxy {
    position: absolute;
    line-height: 30px;
    font-size: 14px;
    z-index: 2;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

.nppp-onoffswitch-inner-proxy .nppp-on-proxy {
    right: 18px;
}

.nppp-onoffswitch-inner-proxy .nppp-off-proxy {
    left: 20px;
    color: #23282d;
}

/* Style for the toggle switch handle */
.nppp-onoffswitch-switch-proxy {
    display: inline-block;
    position: absolute;
    z-index: 1;
    background: #66b317;
    width: 55px;
    height: 24px;
    top: 3px;
    left: 3px;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
    transform: translateX(0px);
}

/* Adjust styles based on checkbox state */
#nginx_cache_preload_enable_proxy:checked + .nppp-onoffswitch-label-proxy .nppp-onoffswitch-inner-proxy .nppp-on-proxy {
    color: #23282d;
}

#nginx_cache_preload_enable_proxy:checked + .nppp-onoffswitch-label-proxy .nppp-onoffswitch-switch-proxy {
    width: 55px;
    transform: translateX(60px);
    background: #ea1919;
}

/* Show the Off label */
.nppp-onoffswitch-checkbox-proxy + .nppp-onoffswitch-label-proxy .nppp-off-proxy {
    display: block;
}

/* Hide the original checkbox */
#nginx_cache_preload_enable_proxy {
    position: absolute;
    left: -99em;
}

/* style disabled proxy settings accordingly */
.nppp-onoffswitch-checkbox-proxy[disabled] + .nppp-onoffswitch-label-proxy {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

/* Preload Progress Section */
#nppp-preload-progress-section {
    display: none; /* hidden until JS shows it */
}

.nppp-progress-wrap {
    padding: 0;
}

.nppp-bar-track {
    width: 100%;
    height: 22px;
    background-color: #e5e7eb;
    overflow: hidden;
    position: relative;
}

.nppp-bar-fill {
    height: 100%;
    width: 0%;
    background-color: #337AB7;
    position: relative;
    transition: width 0.4s ease;
}

.nppp-bar-fill span {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    line-height: 22px;
    pointer-events: none;
    user-select: none;
}

/*
.nppp-progress-status {
    margin-top: 0;
    line-height: 1.6;
    word-break: break-word;
}

.nppp-progress-row {
    margin-top: 4px;
    font-size: 14px;
    color: #374151;
}
.nppp-progress-percent {
    font-weight: bold;
    font-size: 14px;
    color: #1e40af;
}
.nppp-label {
    font-weight: bold;
    color: #333;
    font-size: 14px !important;
}
.nppp-url {
    color: #2563eb;
    word-break: break-all;
}
.nppp-time {
    color: #6b7280;
}
.nppp-done {
    margin-top: 6px;
    font-weight: bold;
    color: #166534;
    font-size: 14px;
}
.nppp-done.nppp-interrupted {
    color: #92400e;
    background-color: #fffbeb;
    border-left: 3px solid #f59e0b;
    padding: 4px 8px;
}
.nppp-done.nppp-interrupted + .nppp-progress-row {
    margin-top: 4px;
    padding: 3px 8px;
    background-color: #fffbeb;
    border-left: 3px solid #f59e0b;
    font-size: 13px;
    color: #78350f;
}
.nppp-broken-urls {
    margin: 2px 0 0 0;
    max-height: 140px;
    overflow: auto;
}
.nppp-broken-urls li {
    margin: 2px 0;
}
*/

.nppp-progress-status {
    word-break: break-word;
}
.nppp-broken-urls {
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 140px;
    overflow: auto;
}
.nppp-broken-urls li {
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Progress section */
#nppp-preload-progress-section td.status,
#nppp-preload-progress-section td.check {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
}

/* Inline progress bar inside the Progress (%) td.status cell */
.nppp-pct-bar-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}
.nppp-pct-bar-track {
    flex: 1;
    height: 18px;
    background: #e5e7eb;
    overflow: hidden;
    position: relative;
    min-width: 60px;
}
.nppp-pct-bar-fill {
    height: 100%;
    position: relative;
    transition: width 0.4s ease;
}
.nppp-pct-bar-fill span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

/* Toasts  */
#nppp-toast-container{
    position:fixed; right:20px; z-index:999999;
    display:flex; flex-direction:column; gap:10px;
    /* fallback in case JS hasn't set top inline yet */
    top:12px;
}
/* Ensure visibility even if some plugin sets .error {display:none} */
#nppp-toast-container .nppp-toast{ display:block; }

.nppp-toast{
    min-width:280px; max-width:420px; padding:12px 14px 12px 44px;
    border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.18);
    color:#e8eaed; background:#1e2430; border-left:6px solid #999;
    box-shadow:0 8px 28px rgba(0,0,0,.45);
    font:14px/1.35 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    position:relative; animation:nppp-slide-in .18s ease-out both;
    font-weight:500;
}
.nppp-toast .nppp-close{ position:absolute; top:8px; right:10px; cursor:pointer; color:#9aa0a6; opacity:1; }
.nppp-toast .nppp-close:hover{ color:#e8eaed; }
.nppp-toast .nppp-ico{
    position:absolute; left:10px; top:50%; transform:translateY(-50%);
    font:20px/1 dashicons; width:24px; text-align:center;
}

/* namespaced variants */
.nppp-toast.nppp-is-success{ border-left-color:#46b450; }
.nppp-toast.nppp-is-success .nppp-ico:before{ content:"\f147"; color:#46b450; }

.nppp-toast.nppp-is-error{ border-left-color:#dc3232; }
.nppp-toast.nppp-is-error .nppp-ico:before{ content:"\f158"; color:#dc3232; }

.nppp-toast.nppp-is-info{ border-left-color:#ffb900; }
.nppp-toast.nppp-is-info .nppp-ico:before{ content:"\f469"; color:#ffb900; }

/* Optional (back-compat shim): if any old code still emits .success/.error/.info,
   keep them working but only inside our container to avoid global collisions */
#nppp-toast-container .nppp-toast.success{ border-left-color:#46b450; }
#nppp-toast-container .nppp-toast.success .nppp-ico:before{ content:"\f147"; color:#46b450; }
#nppp-toast-container .nppp-toast.error{ border-left-color:#dc3232; }
#nppp-toast-container .nppp-toast.error .nppp-ico:before{ content:"\f158"; color:#dc3232; }
#nppp-toast-container .nppp-toast.info{ border-left-color:#ffb900; }
#nppp-toast-container .nppp-toast.info .nppp-ico:before{ content:"\f469"; color:#ffb900; }

/* Mobile: wider, below admin bar */
@media (max-width:782px){
    #nppp-toast-container{ right:8px; left:8px; }
    .nppp-toast{ max-width:unset; }
}

@media (max-width: 782px){
    body > #nppp-toast-container{
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: calc(100vw - 26px);
        max-width: 100%;
    }
}

@keyframes nppp-slide-in{ from{ transform:translateX(8px); opacity:0 } to{ transform:translateX(0); opacity:1 } }
@keyframes nppp-slide-out{ to{ transform:translateX(8px); opacity:0 } }

/* Small inline spinner for buttons */
.nppp-inline-spinner{
    display:inline-block; width:14px; height:14px; margin-left:8px; vertical-align:-2px;
    border:2px solid rgba(0,0,0,.15); border-top-color:rgba(0,0,0,.55); border-radius:50%;
    animation:nppp-spin .6s linear infinite;
}
.nppp-sr-only {
    position: absolute !important;
    height: 1px; width: 1px; overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* Emphasize the related line inside the toast message */
.nppp-toast .nppp-msg .nppp-related-line{
    display:block;
    margin-top:4px;
    color:#e09f1f;
    font-weight:600;
}

/* Related Pages */
.nppp-related-pages{
    --nppp-accent: var(--wp-admin-theme-color, #0073AA);
    --nppp-border: #dcdcde;
    --nppp-text: #1d2327;
    --nppp-sub: #646970;
    --nppp-bg: #fff;

    margin: 4px 0 0;
    padding: 0;
    border: 0;
    display: grid;
    gap: 4px;
}

/* one compact “row” */
.nppp-related-pages .nppp-switch{ position: relative; max-width: 525px; }
.nppp-related-pages .nppp-switch label{
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: var(--nppp-bg);
    border: 1px solid var(--nppp-border);
    line-height: 1.3;
    transition: background-color .12s ease, border-color .12s ease;
    border-left: 3px solid red;
}
.nppp-related-pages .nppp-switch label:hover{
    background: #f6f7f7;
    border-color: #cfcfd3;
}

/* keep native checkbox accessible but invisible */
.nppp-related-pages .nppp-switch input[type="checkbox"]{
    position: absolute;
    inset: 0;
    opacity: 0;
}

/* tiny round “check pill” */
.nppp-related-pages .nppp-toggle{
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 1px solid #bfc3c7;
    background: #fff;
    box-shadow: inset 0 0 0 2px transparent;
    transition: border-color .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.nppp-related-pages .nppp-toggle::after{
    content: "";
    position: absolute;
    left: 3px; top: 4px;
    width: 7px; height: 4px;
    border: 2px solid transparent;
    border-top: 0; border-right: 0;
    transform: rotate(-45deg);
    opacity: 0;
    transition: opacity .1s ease;
}

/* checked (subtle, no glow) */
.nppp-related-pages input:checked + label .nppp-toggle{
    background: var(--nppp-accent);
    border-color: var(--nppp-accent);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
}
.nppp-related-pages input:checked + label .nppp-toggle::after{
    border-color: #fff;
    opacity: 1;
}
.nppp-related-pages input:checked + label{
    border-color: color-mix(in oklab, var(--nppp-accent) 35%, #cfd5da);
    border-left: 3px solid green;
}

/* keyboard focus – crisp, compact */
.nppp-related-pages input:focus-visible + label{
    outline: 2px solid var(--nppp-accent);
    outline-offset: 1px;
}

/* text – condensed */
.nppp-related-pages .nppp-text{ display: block; }
.nppp-related-pages .nppp-text .title{
    color: var(--nppp-text);
    font-weight: 600;
    font-size: 13px;
}
.nppp-related-pages .nppp-text .desc{
    display: block;
    margin-top: 2px;
    color: var(--nppp-sub);
    font-size: 12px;
}
.nppp-related-pages .nppp-text br{ display: none; }

/* gated/disabled row – minimal */
.nppp-related-pages input[disabled] + label{
    opacity: .6;
    cursor: not-allowed;
}
.nppp-related-pages input[disabled] + label .nppp-toggle{
    background: #eef0f3;
    border-color: #d7dbe0;
}

/* don't dim while we're in the brief saving state */
.nppp-related-pages.is-saving input[disabled] + label {
    opacity: 1;
}

/* while saving: preserve the *checked* look */
.nppp-related-pages.is-saving input[disabled]:checked + label .nppp-toggle{
    background: var(--nppp-accent);
    border-color: var(--nppp-accent);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
}
.nppp-related-pages.is-saving input[disabled]:checked + label .nppp-toggle::after{
    border-color:#fff;
    opacity:1;
}

/* while saving: keep the *unchecked* look */
.nppp-related-pages.is-saving input[disabled]:not(:checked) + label .nppp-toggle{
    background:#fff;
    border-color:#bfc3c7;
    box-shadow: inset 0 0 0 2px transparent;
}

/* optional: kill tiny pill transition while saving to avoid micro-blinks */
.nppp-related-pages.is-saving .nppp-toggle { transition: none; }

/* optional: slightly snappier transition to reduce perceived blink */
.nppp-related-pages .nppp-switch label{
    transition: background-color .08s ease, border-color .08s ease; /* was .12s */
}


/* inline autosave badge – tiny, unobtrusive */
.nppp-related-status{
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 4px 0 0 2px;
    padding: 0 6px;
    font-size: 14px;
    line-height: 18px;
    color: #2b5d8a;
    max-width: 80px;
}
.nppp-related-status .dashicons{ font-size: 13px; width: 13px; height: 13px; }

.nppp-related-status[data-state="saved"]{
    border-color: #d9f0e6; background: #eef8f3; color: #106a4a;
}
.nppp-related-status[data-state="error"]{
    border-color: #f2d1d3; background: #fdeef0; color: #9d2627;
}
.nppp-related-status[data-state="saving"] .dashicons-update{
    animation: nppp-mini-spin .9s linear infinite;
}
@keyframes nppp-mini-spin{ to { transform: rotate(360deg);} }

/* dark mode polish */
@media (prefers-color-scheme: dark){
    .nppp-related-pages{
        --nppp-border:#2a2f36; --nppp-bg:#1d2327; --nppp-text:#f0f0f1; --nppp-sub:#b7bcc5;
    }
    .nppp-related-pages .nppp-switch label{ background:#20262b; }
    .nppp-related-pages .nppp-switch label:hover{ background:#242b31; border-color:#313842; }
    .nppp-related-pages .nppp-toggle{ background:#2a3036; border-color:#4b5260; }
    .nppp-related-status{ background:#1e2a34; border-color:#2b3a47; color:#b9d5ef; }

    .nppp-related-pages.is-saving input[disabled]:not(:checked) + label .nppp-toggle{
        background:#2a3036;
        border-color:#4b5260;
        box-shadow: inset 0 0 0 2px transparent;
    }
}

/* fill width on phones; keep it tight */
@media screen and (max-width: 782px){
    .nppp-related-pages .nppp-switch{ max-width: none; }
    .nppp-related-pages .nppp-switch label{
        grid-template-columns: 16px 1fr;
        padding: 6px 8px;
        border-left-width: 2px;
    }
    .nppp-related-status{
        display: block;
        margin: 4px 0 0;
        max-width: none;
        width: fit-content;
    }
}

/* tap UX + pointer hint */
.nppp-related-pages .nppp-switch label{
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce){
    .nppp-related-status[data-state="saving"] .dashicons-update{ animation: none; }
}

/* high-contrast / forced colors */
@media (forced-colors: active){
    .nppp-related-pages input:focus-visible + label{ outline: 2px solid CanvasText; }
}

/* status text never overflows when width is constrained */
.nppp-related-status{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* compact warning pill (appears only when JS inserts .nppp-hint) */
.nppp-related-pages .nppp-hint{
    display:inline-flex;
    align-items:center;
    gap:6px;
    margin-top:6px;
    padding:3px 8px;
    border:1px solid #f0d9a6;
    background:#fff8e6;
    color:#6b4e00;
    border-radius:4px;
    font-style:normal;
    font-size:12px;
    line-height:1.2;
}
.nppp-related-pages .nppp-hint .dashicons{
    font-size:14px; width:14px; height:14px; line-height:1;
}

/* dark mode */
@media (prefers-color-scheme: dark){
    .nppp-related-pages .nppp-hint{
        border-color:#4a3b18;
        background:#2b2415;
        color:#f3d69c;
    }
}

/* collapses the badge when empty or idle */
.nppp-related-status:empty,
.nppp-related-status[data-state="idle"] { display: none; }

#nppp-premium-table td.nppp-status.is-hit   > strong { color: #3CB371; font-weight: 700; }
#nppp-premium-table td.nppp-status.is-miss  > strong { color: #d9534f; font-weight: 700; }

.dtr-data.nppp-status.is-hit  strong { color: #3CB371; font-weight: 700; }
.dtr-data.nppp-status.is-miss strong { color: #d9534f; font-weight: 700; }

/* Inline spinner after Cache Path text while resolving */
td.nppp-cache-path.is-resolving {
    /* tweak these to fit your UI */
    --nppp-spin-size: 14px;
    --nppp-spin-thickness: 2px;
    --nppp-spin-offset: -2px; /* vertical alignment vs text baseline */
    --nppp-spin-color-strong: rgba(0,0,0,.65);
    --nppp-spin-color-weak:   rgba(0,0,0,.15);
}

td.nppp-cache-path.is-resolving::after {
    content: "";
    display: inline-block;
    width: var(--nppp-spin-size);
    height: var(--nppp-spin-size);
    margin-left: 8px;
    vertical-align: var(--nppp-spin-offset);
    border-radius: 50%;
    background:
        conic-gradient(
            from 0turn,
            transparent 12%,
            var(--nppp-spin-color-strong) 32%,
            var(--nppp-spin-color-weak) 62%,
            transparent 100%
        );
        -webkit-mask: radial-gradient(
            farthest-side,
            transparent calc(100% - var(--nppp-spin-thickness)),
            #000 0
        );
        mask: radial-gradient(
            farthest-side,
            transparent calc(100% - var(--nppp-spin-thickness)),
            #000 0
        );

    animation: nppp-spin-arc .8s linear infinite;
}

@keyframes nppp-spin-arc { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
    td.nppp-cache-path.is-resolving::after { animation: none; }
}

/* ===========================================================
   Percent-encoding Case control (OFF / UPPER / LOWER)
=========================================================== */
#nppp-pctnorm{
    --pct-bg:#fff;
    --pct-border:#f1f1f1;
    --pct-text:#000;
    --pct-on:#66b317;
    --pct-off:#ea1919;

    position:relative;
    display:inline-grid;
    grid-template-columns: repeat(4, 1fr);
    align-items:center;
    height:34px;
    padding:3px;
    background:var(--pct-bg);
    border:2px solid var(--pct-border);
    box-sizing:border-box;
    line-height:0;
    overflow:hidden;
    margin:0;
}

/* keep radios accessible but invisible */
#nppp-pctnorm .nppp-pctnorm__radio,
#nppp-pctnorm .nppp-segcontrol-radio{
    position:absolute;
    opacity:0;
    width:1px;
    height:1px;
    margin:0;
    padding:0;
    border:0;
}

/* each segment (label) = inner well height */
#nppp-pctnorm .nppp-pctnorm__seg,
#nppp-pctnorm .nppp-segcontrol-seg{
    position:relative;
    z-index:2;
    display:flex;
    align-items:center;
    justify-content:center;
    line-height:24px;
    padding:0 8px;
    font:600 14px/1.1 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;
    color:var(--pct-text);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    cursor:pointer;
    transition:color .14s ease, transform .08s ease;
    -webkit-tap-highlight-color:transparent;
}
#nppp-pctnorm .nppp-pctnorm__seg:active,
#nppp-pctnorm .nppp-segcontrol-seg:active{ transform:scale(.985); }

/* keyboard focus (contained; won’t affect other widgets) */
#nppp-pctnorm .nppp-pctnorm__radio:focus-visible + .nppp-pctnorm__seg,
#nppp-pctnorm .nppp-segcontrol-radio:focus-visible + .nppp-segcontrol-seg{
    box-shadow: inset 0 0 0 2px #1366D6;
}

/* sliding thumb (colored background) */
#nppp-pctnorm .nppp-pctnorm__thumb,
#nppp-pctnorm .nppp-segcontrol-thumb{
    position:absolute;
    z-index:1;
    inset:3px;
    height:24px;
    width:calc((100% - 6px)/4);
    background:#c9d9ec;
    transform:translateX(0%);
    transition:transform .22s cubic-bezier(.3,.9,.3,1), background-color .14s ease;
    border-radius:0;
}

/* placement + color per selection (IDs already in your markup) */
#pctnorm-off:checked   ~ .nppp-pctnorm__thumb,
#pctnorm-off:checked   ~ .nppp-segcontrol-thumb{ transform:translateX(0%);   background:var(--pct-off); }
#pctnorm-preserve:checked  ~ .nppp-pctnorm__thumb,
#pctnorm-preserve:checked  ~ .nppp-segcontrol-thumb { transform: translateX(100%); background: var(--pct-on);  }
#pctnorm-upper:checked ~ .nppp-pctnorm__thumb,
#pctnorm-upper:checked ~ .nppp-segcontrol-thumb{ transform:translateX(200%); background:var(--pct-on);  }
#pctnorm-lower:checked ~ .nppp-pctnorm__thumb,
#pctnorm-lower:checked ~ .nppp-segcontrol-thumb{ transform:translateX(300%); background:var(--pct-on);  }


/* active label = white text for contrast */
#pctnorm-off:checked   + .nppp-pctnorm__seg,
#pctnorm-preserve:checked + .nppp-pctnorm__seg,
#pctnorm-upper:checked + .nppp-pctnorm__seg,
#pctnorm-lower:checked + .nppp-pctnorm__seg,
#pctnorm-off:checked   + .nppp-segcontrol-seg,
#pctnorm-preserve:checked + .nppp-segcontrol-seg,
#pctnorm-upper:checked + .nppp-segcontrol-seg,
#pctnorm-lower:checked + .nppp-segcontrol-seg{ color:#fff; }

/* OFF text nudged ~10px from the left edge */
#pctnorm-off + .nppp-pctnorm__seg,
#pctnorm-off + .nppp-segcontrol-seg{
    justify-content:flex-start;
}

/* disabled (scoped) */
#nppp-pctnorm .nppp-pctnorm__radio[disabled] + .nppp-pctnorm__seg,
#nppp-pctnorm .nppp-segcontrol-radio[disabled] + .nppp-segcontrol-seg{
    opacity:.55;
    cursor:not-allowed;
    pointer-events:none;
}

/* dark mode (scoped) */
@media (prefers-color-scheme: dark){
    #nppp-pctnorm{ --pct-bg:#1d2327; --pct-border:#2a2f36; --pct-text:#b7bcc5; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce){
    #nppp-pctnorm .nppp-pctnorm__thumb,
    #nppp-pctnorm .nppp-segcontrol-thumb,
    #nppp-pctnorm .nppp-pctnorm__seg,
    #nppp-pctnorm .nppp-segcontrol-seg{ transition:none; }
}

/* small mobile tweak: wider tap area, same heights */
@media (max-width: 480px){
    #nppp-pctnorm{ width:100%; }
    #nppp-pctnorm .nppp-pctnorm__seg,
    #nppp-pctnorm .nppp-segcontrol-seg{ font-size:13px; padding:0 6px; }
    #pctnorm-off + .nppp-pctnorm__seg,
    #pctnorm-off + .nppp-segcontrol-seg{ transform:translateX(8px); }
}

/* Mobile: make the pctnorm control 70% wide and centered */
@media (max-width: 768px){
  #nppp-pctnorm{
    width: 100%;
    margin-inline: auto;
    min-width: 0;
  }
}

/* While saving: block clicks but keep appearance */
#nppp-pctnorm.is-saving { cursor: progress; }
#nppp-pctnorm.is-saving .nppp-pctnorm__seg { pointer-events: none; }

/* True unavailable (safexec missing) – keep your greyed look */
#nppp-pctnorm[aria-disabled="true"] .nppp-pctnorm__seg { opacity: .55; cursor: not-allowed; }

/* Keep native title tooltip on labels even when permanently disabled */
#nppp-pctnorm[aria-disabled="true"] .nppp-pctnorm__radio[disabled] + .nppp-pctnorm__seg { pointer-events: none; }

#pctnorm-off + .nppp-pctnorm__seg,
#pctnorm-off + .nppp-segcontrol-seg{ text-indent: 20px; }

/* Active page number — DataTables 2.x core */
#nppp-premium-table_wrapper .dt-paging .dt-paging-button.current,
#nppp-premium-table_wrapper .dt-paging .dt-paging-button[aria-current="page"] {
    color: #fff !important;
    background-color: #0d6efd;
    border: 1px solid #0d6efd;
    box-shadow: none;
}

/* Hover state for non-active buttons (helps contrast) */
#nppp-premium-table_wrapper .dt-paging .dt-paging-button:not(.current):hover {
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
}

/* Baseline button look in case your theme nukes borders/bg */
#nppp-premium-table_wrapper .dt-paging .dt-paging-button {
    border: 1px solid #dee2e6;
    padding: 0.375rem 0.75rem;
    line-height: 1.25;
}

/* Floating Action Buttons (Top/Bottom) */
.nppp-scrollfab{
    position: fixed;
    right: 18px;
    bottom: max(18px, env(safe-area-inset-bottom, 0px) + 12px);
    display: grid;
    gap: 10px;
    z-index: 1001;
    bottom: 80px;
    right: 50px;
}

body.has-sticky-submit .nppp-scrollfab{
    bottom: max(74px, env(safe-area-inset-bottom, 0px) + 12px);
}

/* Base button */
.nppp-scrollfab button{
    appearance: none;
    border: 1px solid #cfd3d7;
    background: linear-gradient(#fff, #f7f8f9);
    color: #1d2327;
    border-radius: 999px;
    padding: 10px 14px 10px 12px;
    min-height: 38px;
    min-width: 44px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    box-shadow: 0 1px 0 rgba(0,0,0,.03), 0 4px 12px rgba(0,0,0,.08);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background-color .12s ease;
    cursor: pointer;
}

/* Icon chip (uses BG image instead of mask; renders nicer on Windows) */
.nppp-scrollfab button::before{
    content: "";
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border-radius: 999px;
    background-color: #eef0f2;
    box-shadow: inset 0 0 0 1px #d9dde2;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 12px;
}

/* ↑ Top */
.nppp-scrollfab button:first-child::before{
    background-image: url("data:image/svg+xml;utf8,\
    <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236c7781'>\
        <path d='M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z'/>\
    </svg>");
}

/* ↓ Bottom */
.nppp-scrollfab button:last-child::before{
    background-image: url("data:image/svg+xml;utf8,\
    <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236c7781'>\
        <path d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z'/>\
    </svg>");
}

.nppp-scrollfab button:hover{
    transform: translateY(-1px);
    box-shadow: 0 2px 0 rgba(0,0,0,.04), 0 8px 20px rgba(0,0,0,.10);
    border-color: #b9bfc6;
    background: linear-gradient(#fff, #f2f4f6);
}
.nppp-scrollfab button:active{
    transform: translateY(0);
    box-shadow: 0 1px 0 rgba(0,0,0,.03), 0 4px 12px rgba(0,0,0,.08);
}

/* Keyboard focus */
.nppp-scrollfab button:focus-visible{
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Hide/show without layout shift */
.nppp-scrollfab[data-hidden="true"]{ display: none; }

/* Compact on narrow screens */
@media (max-width: 480px){
    .nppp-scrollfab{ right: 24px; gap: 8px; bottom: 60px; }
    .nppp-scrollfab button{ padding: 9px 12px 9px 11px; min-height: 36px; font-size: 11px; }
}

/* Dark mode */
@media (prefers-color-scheme: dark){
    .nppp-scrollfab button{
        background: linear-gradient(#2a2f35, #23272c);
        color: #f0f3f6;
        border-color: #3a3f45;
        box-shadow: 0 1px 0 rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35);
    }
    .nppp-scrollfab button:hover{
        background: linear-gradient(#30353b, #262b31);
        border-color: #4a5057;
    }
    .nppp-scrollfab button::before{
        background-color: #343a40;
        box-shadow: inset 0 0 0 1px #3a3f45;
        filter: invert(80%) sepia(4%) saturate(200%) hue-rotate(180deg) brightness(95%);
    }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
    .nppp-scrollfab button{ transition: none; }
    .nppp-scrollfab button:hover,
    .nppp-scrollfab button:active{ transform: none; }
}

.nppp-scrollfab[data-hidden="true"]{opacity:0;pointer-events:none}
.nppp-scrollfab[data-hidden="false"]{opacity:1}

@media (max-width: 375px){
    .wrap{
        overflow-x: hidden;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
    .wrap *{
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* ===== NPPP HERO HEADER ===== */
.nppp-header-content{
    position: relative;
    isolation: isolate;
    background:#000;
    color:#e6ebf2;
    display:flex;
    align-items:center;
    gap:18px;
    padding:14px 16px;
    overflow:hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.nppp-aurora-canvas{
    position:absolute;
    inset:0;
    z-index:0;
    pointer-events:none;
    display:block;
    will-change: transform;
    contain: paint;
}

.nppp-header-content::before{
    content:"";
    position:absolute; inset:0;
    background: none;
    z-index:0;
    pointer-events:none;
}

.nppp-aurora-overlay{
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    display: block;
    will-change: transform;
    contain: paint;
}

/* Perf nudge for long pages / some GPUs */
.nppp-aurora-canvas,
.nppp-aurora-overlay {
    image-rendering: optimizeQuality;
    transform: translateZ(0);
}

/* Force pure black background */
.wrap .nppp-header-content,
.nppp-header-content{
    background: #000 !important;
}

/* Make sure canvases don’t bring their own bg */
.nppp-aurora-canvas,
.nppp-aurora-overlay{
    background: transparent !important;
}

.nppp-img-container,
.nppp-buttons-wrapper{ position:relative; z-index:1; }

@media (prefers-reduced-motion: reduce){
    .nppp-aurora-canvas,
    .nppp-aurora-overlay{
        display: none;
    }
}

@media (prefers-color-scheme: dark){
    .nppp-header-content{
        background: #0b0e12;
        color: #e6ebf2;
    }
}

/* link in the Cached URL cell */
#nppp-premium-table td.nppp-url a {
    color: dodgerblue !important;
    text-decoration: none !important;
}

/* keep it consistent on hover/focus/visited */
#nppp-premium-table td.nppp-url a:hover,
#nppp-premium-table td.nppp-url a:focus,
#nppp-premium-table td.nppp-url a:visited {
    color: dodgerblue !important;
    text-decoration: none !important;
}

#nppp-admin p.description,
#nppp-admin .description {
    color:#646970;
    font-size:14px;
    font-weight:400;
    line-height:1.5;
    display:block;
    margin:2px 0 5px;
    font-style:normal;
}

/* Content category column */
#nppp-premium-table td.nppp-category-cell {
    color: #8b5cf6;
    font-weight: 700;
}

/* Variants column */
#nppp-premium-table td.nppp-variant-cell {
    white-space: nowrap;
}
.nppp-variant-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .2px;
    vertical-align: middle;
    line-height: 1.7;
}
.nppp-variant-single   { background: #f3f4f6; color: #008080; text-transform: uppercase; font-weight: bold; }
.nppp-variant-multiple { background: #dbeafe; color: #1d4ed8; text-transform: uppercase; font-weight: bold; }
.nppp-variant-miss     { background: transparent; color: #9ca3af; }
.nppp-variant-count {
    font-size: 13px;
    color: #FF4500;
    margin-left: 3px;
    vertical-align: middle;
}

/* ── Advanced Tab: Preload-in-progress loading effect ── */
.nppp-table-loading-notice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    margin-bottom: 15px;
    background-color: #f9edbe;
    border-left: 6px solid #f0c36d;
    font-size: 14px;
    font-weight: 400;
    color: #3c3c3c;
    max-width: max-content;
}

.nppp-table-loading-notice .spin {
    display: inline-block;
    animation: nppp-spin 1.1s linear infinite;
    font-size: 22px;
    color: #ffba00;
    flex-shrink: 0;
}

#nppp-premium-table_wrapper:has(.nppp-table-loading) {
    animation: nppp-breathe 2s ease-in-out infinite;
}

@keyframes nppp-breathe {
    0%, 100% { opacity: 1;    }
    50%       { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
    .nppp-table-loading-notice .spin,
    #nppp-premium-table_wrapper:has(.nppp-table-loading) {
        animation: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Excel-like column filter dropdowns  —  #nppp-premium-table
   ═══════════════════════════════════════════════════════════════ */

/* Filter row cells */
#nppp-premium-table thead tr.nppp-filter-row th {
    background-color: #2a6399 !important;
    padding: 3px 6px !important;
    vertical-align: middle;
    border-top: 1px solid #1e4f7a;
    text-align: center;
    line-height: 1;
}

#nppp-premium-table thead tr.nppp-filter-row th.nppp-filter-no-col {
    background-color: #2a6399 !important;
}

/* Wrapper inside each filter cell */
.nppp-filter-wrapper {
    position: relative;
    display: inline-flex;
    justify-content: flex-start;
    width: 100%;
}

/* The small trigger button */
.nppp-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 28px;
    height: 22px;
    padding: 0;
    background: #FF8C00;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
}

.nppp-filter-btn:hover,
.nppp-filter-btn:focus {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.6);
    outline: none;
}

/* Active (filtered) state */
.nppp-filter-btn--active {
    background: #e8a800 !important;
    border-color: #c98f00 !important;
    color: #1a1a1a !important;
}

.nppp-filter-btn--active .nppp-filter-arrow {
    color: #1a1a1a;
}

/* Arrow icon */
.nppp-filter-arrow {
    font-size: 9px;
    color: rgba(255,255,255,0.85);
    pointer-events: none;
    line-height: 1;
}

/* Active badge dot */
.nppp-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: #d9534f;
    color: #fff;
    border-radius: 50%;
    font-size: 9px;
    font-weight: bold;
    line-height: 1;
    pointer-events: none;
}

/* ── Dropdown panel ── */
.nppp-filter-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 99999;
    min-width: 200px;
    max-width: 320px;
    background: #fff;
    border: 1px solid #b0c4de;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    padding: 0;
    overflow: hidden;
}

/* Search input inside dropdown */
.nppp-filter-search {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 7px 10px;
    border: none;
    border-bottom: 1px solid #dde4ec;
    font-size: 12px;
    color: #333;
    background: #f5f8fc;
    outline: none;
    font-family: inherit;
}

.nppp-filter-search:focus {
    background: #eef4ff;
    border-bottom-color: #337ab7;
}

/* Scrollable list area */
.nppp-filter-list-wrap {
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* The UL list */
.nppp-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nppp-filter-list li {
    margin: 0;
    padding: 0;
}

.nppp-filter-list li label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    color: #222;
    transition: background 0.1s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
}

.nppp-filter-list li label:hover {
    background: #eef4ff;
}

/* "Select All" row styling */
.nppp-filter-all-row label {
    font-weight: 600 !important;
    border-bottom: 1px solid #dde4ec;
    background: #f5f8fc;
    color: #2a6399 !important;
}

.nppp-filter-all-row label:hover {
    background: #dce9f7 !important;
}

/* Checkboxes inside filter list */
.nppp-filter-list input[type="checkbox"] {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
    accent-color: #337ab7;
}

/* Footer with Apply / Reset */
.nppp-filter-footer {
    display: flex;
    gap: 6px;
    padding: 7px 10px;
    border-top: 1px solid #dde4ec;
    background: #f5f8fc;
}

.nppp-filter-ok,
.nppp-filter-clear {
    flex: 1;
    padding: 5px 8px;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: background 0.15s;
}

.nppp-filter-ok {
    background: #337ab7;
    color: #fff;
}

.nppp-filter-ok:hover {
    background: #2563a0;
}

.nppp-filter-clear {
    background: #e8e8e8;
    color: #444;
}

.nppp-filter-clear:hover {
    background: #d0d0d0;
}

/* Scrollbar styling inside list */
.nppp-filter-list-wrap::-webkit-scrollbar {
    width: 6px;
}
.nppp-filter-list-wrap::-webkit-scrollbar-track {
    background: #f0f0f0;
}
.nppp-filter-list-wrap::-webkit-scrollbar-thumb {
    background: #b0c4de;
    border-radius: 3px;
}
.nppp-filter-list-wrap::-webkit-scrollbar-thumb:hover {
    background: #337ab7;
}

@media screen and (max-width: 768px) {
    #nppp-premium-table thead tr.nppp-filter-row {
        display: none;
    }
}

/* ============================================================
   Redis Object Cache sync toggle
   ============================================================ */

/* Container */
.nppp-onoffswitch-redis {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

/* Hide the default checkbox */
.nppp-onoffswitch-checkbox-redis {
    display: none;
}

/* Label / track */
.nppp-onoffswitch-label-redis {
    cursor: pointer;
    display: inline-block;
    position: relative;
    width: 121px;
    height: 30px;
    font-weight: 600;
    background: #ffffff;
    border: 2px solid #f1f1f1;
    transition: background-color 0.3s;
}

/* ON / OFF text labels */
.nppp-onoffswitch-inner-redis .nppp-on-redis,
.nppp-onoffswitch-inner-redis .nppp-off-redis {
    position: absolute;
    line-height: 30px;
    font-size: 14px;
    z-index: 2;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

.nppp-onoffswitch-inner-redis .nppp-on-redis {
    right: 18px;
}

.nppp-onoffswitch-inner-redis .nppp-off-redis {
    left: 20px;
    color: #23282d;
}

/* Handle (the sliding knob) */
.nppp-onoffswitch-switch-redis {
    display: inline-block;
    position: absolute;
    z-index: 1;
    background: #ea1919;
    width: 55px;
    height: 24px;
    top: 3px;
    left: 3px;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
    transform: translateX(0px);
}

/* Checked state — slide knob right, turn green */
#nppp_redis_cache_sync:checked + .nppp-onoffswitch-label-redis .nppp-onoffswitch-inner-redis .nppp-on-redis {
    color: #23282d;
}

#nppp_redis_cache_sync:checked + .nppp-onoffswitch-label-redis .nppp-onoffswitch-switch-redis {
    width: 55px;
    transform: translateX(60px);
    background: #66b317;
}

/* Show OFF label */
.nppp-onoffswitch-checkbox-redis + .nppp-onoffswitch-label-redis .nppp-off-redis {
    display: block;
}

/* Hide the real checkbox off-screen */
#nppp_redis_cache_sync {
    position: absolute;
    left: -99em;
}

/* Disabled state */
.nppp-onoffswitch-checkbox-redis[disabled] + .nppp-onoffswitch-label-redis {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

/* Style for the watchdog toggle switch container */
.nppp-onoffswitch-watchdog {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

/* Hide the default watchdog checkbox */
.nppp-onoffswitch-checkbox-watchdog {
    display: none;
}

/* Style for the watchdog toggle switch label */
.nppp-onoffswitch-label-watchdog {
    cursor: pointer;
    display: inline-block;
    position: relative;
    width: 121px;
    height: 30px;
    font-weight: 600;
    background: #ffffff;
    border: 2px solid #f1f1f1;
    transition: background-color 0.3s;
}

/* Style for watchdog text labels (On and Off) */
.nppp-onoffswitch-inner-watchdog .nppp-on-watchdog,
.nppp-onoffswitch-inner-watchdog .nppp-off-watchdog {
    position: absolute;
    line-height: 30px;
    font-size: 14px;
    z-index: 2;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

.nppp-onoffswitch-inner-watchdog .nppp-on-watchdog {
    right: 18px;
}

.nppp-onoffswitch-inner-watchdog .nppp-off-watchdog {
    left: 20px;
    color: #23282d;
}

/* Style for the watchdog toggle switch handle */
.nppp-onoffswitch-switch-watchdog {
    display: inline-block;
    position: absolute;
    z-index: 1;
    background: #66b317;
    width: 55px;
    height: 24px;
    top: 3px;
    left: 3px;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
    transform: translateX(0px);
}

/* Adjust styles based on watchdog checkbox state */
#nginx_cache_watchdog:checked + .nppp-onoffswitch-label-watchdog .nppp-onoffswitch-inner-watchdog .nppp-on-watchdog {
    color: #23282d;
}

#nginx_cache_watchdog:checked + .nppp-onoffswitch-label-watchdog .nppp-onoffswitch-switch-watchdog {
    width: 55px;
    transform: translateX(60px);
    background: #ea1919;
}

/* Show the Off label watchdog */
.nppp-onoffswitch-checkbox-watchdog + .nppp-onoffswitch-label-watchdog .nppp-off-watchdog {
    display: block;
}

/* Hide the original watchdog checkbox */
#nginx_cache_watchdog {
    position: absolute;
    left: -99em;
}

/* Style disabled watchdog toggle accordingly */
.nppp-onoffswitch-checkbox-watchdog[disabled] + .nppp-onoffswitch-label-watchdog {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

/* HTTP Purge fast-path toggle */
.nppp-onoffswitch-httppurge {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

/* Hide the default checkbox */
.nppp-onoffswitch-checkbox-httppurge {
    display: none;
}

/* Label / track */
.nppp-onoffswitch-label-httppurge {
    cursor: pointer;
    display: inline-block;
    position: relative;
    width: 121px;
    height: 30px;
    font-weight: 600;
    background: #ffffff;
    border: 2px solid #f1f1f1;
    transition: background-color 0.3s;
}

/* ON / OFF text labels */
.nppp-onoffswitch-inner-httppurge .nppp-on-httppurge,
.nppp-onoffswitch-inner-httppurge .nppp-off-httppurge {
    position: absolute;
    line-height: 30px;
    font-size: 14px;
    z-index: 2;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

.nppp-onoffswitch-inner-httppurge .nppp-on-httppurge {
    right: 18px;
}

.nppp-onoffswitch-inner-httppurge .nppp-off-httppurge {
    left: 20px;
    color: #23282d;
}

/* Handle (the sliding knob) — RED when OFF, matches cloudflare and redis */
.nppp-onoffswitch-switch-httppurge {
    display: inline-block;
    position: absolute;
    z-index: 1;
    background: #ea1919;
    width: 55px;
    height: 24px;
    top: 3px;
    left: 3px;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
    transform: translateX(0px);
}

/* Checked state — slide knob right, turn GREEN (feature is ON) */
#nppp_http_purge_enabled:checked + .nppp-onoffswitch-label-httppurge .nppp-onoffswitch-inner-httppurge .nppp-on-httppurge {
    color: #23282d;
}

#nppp_http_purge_enabled:checked + .nppp-onoffswitch-label-httppurge .nppp-onoffswitch-switch-httppurge {
    width: 55px;
    transform: translateX(60px);
    background: #66b317;
}

/* Show OFF label */
.nppp-onoffswitch-checkbox-httppurge + .nppp-onoffswitch-label-httppurge .nppp-off-httppurge {
    display: block;
}

/* Hide the real checkbox off-screen */
#nppp_http_purge_enabled {
    position: absolute;
    left: -99em;
}

/* Disabled state — used if the toggle is programmatically disabled */
.nppp-onoffswitch-checkbox-httppurge[disabled] + .nppp-onoffswitch-label-httppurge {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

/* Override WordPress 7.0 colored notice backgrounds — keep NPP notices stylish */
.notice-nppp.notice-error,
.notice-nppp.notice-warning,
.notice-nppp.notice-success,
.notice-nppp.notice-info,
div.error.notice-nppp,
div.updated.notice-nppp,
.notice-nppp {
    background-color: #fff;
    font-weight: 500;
    color: #3C434A !important;
    border-top: 1px solid #c3c4c7;
    border-right: 1px solid #c3c4c7;
    border-bottom: 1px solid #c3c4c7;
}

.notice-nppp p,
.notice-nppp .notice-title,
div.error.notice-nppp p,
div.updated.notice-nppp p,
.form-table td .notice-nppp p {
    color: #3C434A;
}

.notice-nppp {
    padding: 4px 12px;
}

.notice-nppp .notice-dismiss {
    top: 50%;
    transform: translateY(-50%);
}

/* ============================================================
   RG Purge toggle
   ============================================================ */

.nppp-onoffswitch-rgpurge {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.nppp-onoffswitch-checkbox-rgpurge {
    display: none;
}

.nppp-onoffswitch-label-rgpurge {
    cursor: pointer;
    display: inline-block;
    position: relative;
    width: 121px;
    height: 30px;
    font-weight: 600;
    background: #ffffff;
    border: 2px solid #f1f1f1;
    transition: background-color 0.3s;
}

.nppp-onoffswitch-inner-rgpurge .nppp-on-rgpurge,
.nppp-onoffswitch-inner-rgpurge .nppp-off-rgpurge {
    position: absolute;
    line-height: 30px;
    font-size: 14px;
    z-index: 2;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

.nppp-onoffswitch-inner-rgpurge .nppp-on-rgpurge {
    right: 18px;
}

.nppp-onoffswitch-inner-rgpurge .nppp-off-rgpurge {
    left: 20px;
    color: #23282d;
}

.nppp-onoffswitch-switch-rgpurge {
    display: inline-block;
    position: absolute;
    z-index: 1;
    background: #ea1919;
    width: 55px;
    height: 24px;
    top: 3px;
    left: 3px;
    transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
    transform: translateX(0px);
}

#nppp_rg_purge_enabled:checked + .nppp-onoffswitch-label-rgpurge .nppp-onoffswitch-inner-rgpurge .nppp-on-rgpurge {
    color: #23282d;
}

#nppp_rg_purge_enabled:checked + .nppp-onoffswitch-label-rgpurge .nppp-onoffswitch-switch-rgpurge {
    width: 55px;
    transform: translateX(60px);
    background: #66b317;
}

.nppp-onoffswitch-checkbox-rgpurge + .nppp-onoffswitch-label-rgpurge .nppp-off-rgpurge {
    display: block;
}

#nppp_rg_purge_enabled {
    position: absolute;
    left: -99em;
}

.nppp-onoffswitch-checkbox-rgpurge[disabled] + .nppp-onoffswitch-label-rgpurge {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

/* Badge bar container */
#nppp-badge-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0 6px;
}

/* Shared badge base */
#nppp-assume,
#nppp-cache-warn,
#nppp-safexec-warn,
#nppp-rg-warn,
#nppp-fuse-safexec-warn {
    width: 302px;
    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Assume-Nginx (amber) */
#nppp-assume          { border: 1px solid #e2b203; background: #fff7d6; }
#nppp-assume .dashicons { font-size: 20px; color: #8a6d3b; }

/* Cache warn (red) */
#nppp-cache-warn          { border: 1px solid #cc0000; background: #fdf2f2; }
#nppp-cache-warn .dashicons { font-size: 20px; color: #cc0000; }

/* safexec warn (blue) */
#nppp-safexec-warn          { border: 1px solid #0073aa; background: #f0f6fb; }
#nppp-safexec-warn .dashicons { font-size: 20px; color: #0073aa; }

/* rg warn (green) */
#nppp-rg-warn             { border: 1px solid #3a7d44; background: #f0faf3; }
#nppp-rg-warn .dashicons  { font-size: 20px; color: #3a7d44; }

/* FUSE + safexec warn (purple) */
#nppp-fuse-safexec-warn             { border: 1px solid #6941c6; background: #f5f0ff; }
#nppp-fuse-safexec-warn .dashicons  { font-size: 20px; color: #6941c6; }

/* Shared button alignment */
#nppp-assume .button.button-small,
#nppp-cache-warn .button.button-small,
#nppp-safexec-warn .button.button-small,
#nppp-rg-warn .button.button-small,
#nppp-fuse-safexec-warn .button.button-small { margin-left: auto; }

/* Mobile */
@media (max-width: 782px) {
    #nppp-badge-bar { flex-direction: column; }

    #nppp-assume,
    #nppp-cache-warn,
    #nppp-safexec-warn,
    #nppp-rg-warn,
    #nppp-fuse-safexec-warn {
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Bypass Path Restriction */
.nppp-bypass-pr-fieldset {
    --nppp-accent: var(--wp-admin-theme-color, #0073AA);
    --nppp-border: #dcdcde;
    --nppp-text:   #1d2327;
    --nppp-sub:    #646970;
    --nppp-bg:     #fff;
    margin: 4px 0 0;
    padding: 0;
    border: 0;
    display: grid;
    gap: 4px;
}
.nppp-bypass-pr-fieldset .nppp-switch { position: relative; max-width: 525px; }
.nppp-bypass-pr-fieldset .nppp-switch label {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: var(--nppp-bg);
    border: 1px solid var(--nppp-border);
    line-height: 1.3;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background-color .08s ease, border-color .08s ease;
    border-left: 3px solid red;
}
.nppp-bypass-pr-fieldset .nppp-switch label:hover {
    background: #f6f7f7;
    border-color: #cfcfd3;
}
.nppp-bypass-pr-fieldset .nppp-switch input[type="checkbox"] {
    position: absolute;
    inset: 0;
    opacity: 0;
}
.nppp-bypass-pr-fieldset .nppp-toggle {
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 1px solid #bfc3c7;
    background: #fff;
    box-shadow: inset 0 0 0 2px transparent;
    transition: border-color .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.nppp-bypass-pr-fieldset .nppp-toggle::after {
    content: "";
    position: absolute;
    left: 3px; top: 4px;
    width: 7px; height: 4px;
    border: 2px solid transparent;
    border-top: 0; border-right: 0;
    transform: rotate(-45deg);
    opacity: 0;
    transition: opacity .1s ease;
}
.nppp-bypass-pr-fieldset input:checked + label .nppp-toggle {
    background: var(--nppp-accent);
    border-color: var(--nppp-accent);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
}
.nppp-bypass-pr-fieldset input:checked + label .nppp-toggle::after {
    border-color: #fff;
    opacity: 1;
}
.nppp-bypass-pr-fieldset input:checked + label {
    border-color: color-mix(in oklab, var(--nppp-accent) 35%, #cfd5da);
    border-left: 3px solid green;
}
.nppp-bypass-pr-fieldset input:focus-visible + label {
    outline: 2px solid var(--nppp-accent);
    outline-offset: 1px;
}
.nppp-bypass-pr-fieldset .nppp-text { display: block; }
.nppp-bypass-pr-fieldset .nppp-text .title {
    color: var(--nppp-text);
    font-weight: 600;
    font-size: 13px;
}
.nppp-bypass-pr-fieldset .nppp-text .desc {
    display: block;
    margin-top: 2px;
    color: var(--nppp-sub);
    font-size: 12px;
}
.nppp-bypass-pr-fieldset input[disabled] + label { opacity: .6; cursor: not-allowed; }
.nppp-bypass-pr-fieldset input[disabled] + label .nppp-toggle { background: #eef0f3; border-color: #d7dbe0; }
.nppp-bypass-pr-fieldset.is-saving input[disabled] + label { opacity: 1; }
.nppp-bypass-pr-fieldset.is-saving input[disabled]:checked + label .nppp-toggle {
    background: var(--nppp-accent);
    border-color: var(--nppp-accent);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
}
.nppp-bypass-pr-fieldset.is-saving input[disabled]:checked + label .nppp-toggle::after { border-color: #fff; opacity: 1; }
.nppp-bypass-pr-fieldset.is-saving input[disabled]:not(:checked) + label .nppp-toggle {
    background: #fff;
    border-color: #bfc3c7;
    box-shadow: inset 0 0 0 2px transparent;
}
.nppp-bypass-pr-fieldset.is-saving .nppp-toggle { transition: none; }
.nppp-bypass-pr-fieldset + .nppp-related-status {
    margin-top: 8px; font-size: 12px; font-weight: 500;
    padding: 4px 8px; border-radius: 4px;
    display: inline-block; transition: opacity 0.25s;
}
.nppp-bypass-pr-fieldset + .nppp-related-status[data-state="saving"] { color: #2271b1; background: #f0f6fc; border: 1px solid #c2d9f0; }
.nppp-bypass-pr-fieldset + .nppp-related-status[data-state="saved"]  { color: #1a7e3f; background: #f0faf3; border: 1px solid #a3d9b5; }
.nppp-bypass-pr-fieldset + .nppp-related-status[data-state="error"]  { color: #d63638; background: #fdf1f1; border: 1px solid #f5c0c0; }
.nppp-bypass-pr-fieldset + .nppp-related-status[data-state="idle"],
.nppp-bypass-pr-fieldset + .nppp-related-status:empty { display: none; }
@media (prefers-color-scheme: dark) {
    .nppp-bypass-pr-fieldset { --nppp-border: #2a2f36; --nppp-bg: #1d2327; --nppp-text: #f0f0f1; --nppp-sub: #b7bcc5; }
    .nppp-bypass-pr-fieldset .nppp-switch label { background: #20262b; }
    .nppp-bypass-pr-fieldset .nppp-switch label:hover { background: #242b31; border-color: #313842; }
    .nppp-bypass-pr-fieldset .nppp-toggle { background: #2a3036; border-color: #4b5260; }
    .nppp-bypass-pr-fieldset.is-saving input[disabled]:not(:checked) + label .nppp-toggle { background: #2a3036; border-color: #4b5260; box-shadow: inset 0 0 0 2px transparent; }
}
@media screen and (max-width: 782px) {
    .nppp-bypass-pr-fieldset .nppp-switch { max-width: none; }
    .nppp-bypass-pr-fieldset .nppp-switch label { grid-template-columns: 16px 1fr; padding: 6px 8px; border-left-width: 2px; }
    .nppp-bypass-pr-fieldset + .nppp-related-status { display: block; margin: 4px 0 0; max-width: none; width: fit-content; }
}
@media (prefers-reduced-motion: reduce) { .nppp-bypass-pr-fieldset .nppp-toggle { transition: none; } }
@media (forced-colors: active) { .nppp-bypass-pr-fieldset input:focus-visible + label { outline: 2px solid CanvasText; } }

/* Auto Purge Triggers */
.nppp-autopurge-triggers-fieldset {
    --nppp-accent: var(--wp-admin-theme-color, #0073AA);
    --nppp-border: #dcdcde;
    --nppp-text: #1d2327;
    --nppp-sub: #646970;
    --nppp-bg: #fff;

    margin: 10px 0 0;
    padding: 0;
    border: 0;
    display: grid;
    gap: 4px;
}

.nppp-autopurge-triggers-fieldset .nppp-switch {
    position: relative;
    max-width: 525px;
}

.nppp-autopurge-triggers-fieldset .nppp-switch label {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: var(--nppp-bg);
    border: 1px solid var(--nppp-border);
    line-height: 1.3;
    transition: background-color 0.12s ease, border-color 0.12s ease;
    border-left: 3px solid red;
}

.nppp-autopurge-triggers-fieldset .nppp-switch label:hover {
    background: #f6f7f7;
    border-color: #cfcfd3;
}

.nppp-autopurge-triggers-fieldset .nppp-switch input[type="checkbox"] {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.nppp-autopurge-triggers-fieldset .nppp-toggle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #bfc3c7;
    background: #fff;
    box-shadow: inset 0 0 0 2px transparent;
    transition: border-color 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
}

.nppp-autopurge-triggers-fieldset .nppp-toggle::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 4px;
    width: 7px;
    height: 4px;
    border: 2px solid transparent;
    border-top: 0;
    border-right: 0;
    transform: rotate(-45deg);
    opacity: 0;
    transition: opacity 0.1s ease;
}

.nppp-autopurge-triggers-fieldset input:checked + label .nppp-toggle {
    background: var(--nppp-accent);
    border-color: var(--nppp-accent);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.nppp-autopurge-triggers-fieldset input:checked + label .nppp-toggle::after {
    border-color: #fff;
    opacity: 1;
}

.nppp-autopurge-triggers-fieldset input:checked + label {
    border-color: color-mix(in oklab, var(--nppp-accent) 35%, #cfd5da);
    border-left: 3px solid green;
}

.nppp-autopurge-triggers-fieldset input:focus-visible + label {
    outline: 2px solid var(--nppp-accent);
    outline-offset: 1px;
}

.nppp-autopurge-triggers-fieldset .nppp-text {
    display: block;
}

.nppp-autopurge-triggers-fieldset .nppp-text .title {
    color: var(--nppp-text);
    font-weight: 600;
    font-size: 13px;
}

.nppp-autopurge-triggers-fieldset .nppp-text .desc {
    display: block;
    margin-top: 2px;
    color: var(--nppp-sub);
    font-size: 12px;
}

.nppp-autopurge-triggers-fieldset input[disabled] + label {
    opacity: 0.6;
    cursor: not-allowed;
}

.nppp-autopurge-triggers-fieldset input[disabled] + label .nppp-toggle {
    background: #eef0f3;
    border-color: #d7dbe0;
}

.nppp-autopurge-triggers-fieldset.is-saving input[disabled] + label {
    opacity: 1;
}

.nppp-autopurge-triggers-fieldset.is-saving input[disabled]:checked + label .nppp-toggle {
    background: var(--nppp-accent);
    border-color: var(--nppp-accent);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.nppp-autopurge-triggers-fieldset.is-saving input[disabled]:not(:checked) + label .nppp-toggle {
    background: #fff;
    border-color: #bfc3c7;
    box-shadow: inset 0 0 0 2px transparent;
}

/* Master-OFF dimming */
.nppp-autopurge-triggers-fieldset.nppp-autopurge-triggers-off {
    opacity: 0.90;
    pointer-events: none;
    user-select: none;
}

/* Status badge (inserted by JS) */
.nppp-autopurge-triggers-fieldset + .nppp-related-status {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    transition: opacity 0.25s;
}

.nppp-autopurge-triggers-fieldset + .nppp-related-status[data-state="saving"] {
    color: #2271b1;
    background: #f0f6fc;
    border: 1px solid #c2d9f0;
}

.nppp-autopurge-triggers-fieldset + .nppp-related-status[data-state="saved"] {
    color: #1a7e3f;
    background: #f0faf3;
    border: 1px solid #a3d9b5;
}

.nppp-autopurge-triggers-fieldset + .nppp-related-status[data-state="error"] {
    color: #d63638;
    background: #fdf1f1;
    border: 1px solid #f5c0c0;
}

.nppp-autopurge-triggers-fieldset + .nppp-related-status[data-state="idle"],
.nppp-autopurge-triggers-fieldset + .nppp-related-status:empty {
    display: none;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .nppp-autopurge-triggers-fieldset {
        --nppp-border: #2a2f36;
        --nppp-bg: #1d2327;
        --nppp-text: #f0f0f1;
        --nppp-sub: #b7bcc5;
    }

    .nppp-autopurge-triggers-fieldset .nppp-switch label {
        background: #20262b;
    }

    .nppp-autopurge-triggers-fieldset .nppp-switch label:hover {
        background: #242b31;
        border-color: #313842;
    }

    .nppp-autopurge-triggers-fieldset .nppp-toggle {
        background: #2a3036;
        border-color: #4b5260;
    }

    .nppp-autopurge-triggers-fieldset.is-saving input[disabled]:not(:checked) + label .nppp-toggle {
        background: #2a3036;
        border-color: #4b5260;
    }

    .nppp-autopurge-triggers-fieldset + .nppp-related-status {
        background: #1e2a34;
        border-color: #2b3a47;
        color: #b9d5ef;
    }

    .nppp-autopurge-triggers-fieldset + .nppp-related-status[data-state="saving"] {
        color: #72aee6;
        background: #1e2a38;
        border-color: #2b4a6b;
    }

    .nppp-autopurge-triggers-fieldset + .nppp-related-status[data-state="saved"] {
        color: #68de7c;
        background: #1a2e20;
        border-color: #2d5a38;
    }

    .nppp-autopurge-triggers-fieldset + .nppp-related-status[data-state="error"] {
        color: #f86368;
        background: #301a1a;
        border-color: #6b2929;
    }
}

/* Cache path CAUTION */
.nppp-bypass-pr-caution {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
    padding: 12px 16px;
    border-left: 4px solid #d63638;
    background-color: #fcf0f1;
    border-radius: 0 4px 4px 0;
    max-width: 490px;
}

.nppp-bypass-pr-caution .nppp-caution-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-weight: 700;
    font-size: 13px;
    color: #d63638;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nppp-bypass-pr-caution .nppp-caution-header .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #d63638;
}

.nppp-bypass-pr-caution .nppp-caution-body {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #50575e;
}
