.ps-scanner-wrap {
    max-width: 100%;
}

.ps-scanner-form {
	max-width: 1000px;
	margin: 0 auto 30px;
}

.ps-input-group-cols {
	align-items: center;
    display: flex;
    margin: 0 -10px;
}

.ps-input-group {
    flex-grow: 1;
    text-align: center;
    display: flex;
    column-gap: 20px;
    row-gap: 20px;
    align-items: center;
    padding: 0 10px;
}

.ps-input-group small {
    font-size: 16px;
}

.ps-form-actions {
    padding: 0;
}

#ps-domain {
    font-size: 18px;
    padding: 13px 16px;
    border: 1px solid #2835f2;
    background-color: #f7f8fa;
    width: 100%;
    cursor: not-allowed;
    line-height: 1.2;
    border-radius: 5px;
    height: 50px;
    text-align: left;
}

#ps-domain:hover,
#ps-domain:focus,
#ps-domain:focus-visible {
    border: 1px solid #2835f2;
}

.ps-scan-switch {
    position: relative;
    padding: 0 10px;
}

.ps-scan-switch *,
.ps-scan-switch *::before,
.ps-scan-switch *::after {
    box-sizing: border-box;
}

.ps-scan-switch__input {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}

.ps-scan-switch__label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    margin: 0;
    width: 245px;
    min-width: 245px;
    max-width: 245px;
}

/* Track */
.ps-scan-switch__track {
    position: relative;
    flex: 0 0 160px;
    height: 50px;
    border-radius: 4px;
    background: #f5f6fa;
    transition: background-color 0.3s ease-in-out;
    border: 1px solid #2835f2;
}

/* The half of the track the thumb is not covering. */
.ps-scan-switch__track::before {
	content: attr(data-checked);
	position: absolute;
	top: 4px;
	left: 80px;
	width: 74px;
	font-size: 12px;
	line-height: 0;
	text-align: center;
	text-transform: uppercase;
	color: #444;
	padding: 20px 0;
}

/* The sliding thumb. */
.ps-scan-switch__track::after {
  content: attr(data-unchecked);
  position: absolute;
  top: 4px;
  left: 4px;
  width: 74px;
  border-radius: 2px;
  background: #1321f1;
  color: #FFF;
  font-size: 12px;
  line-height: 0;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease-in-out, color 0.3s ease-in-out;
  padding: 20px 0;
}

/* Checked: the two halves swap and the thumb slides right. */
.ps-scan-switch__input:checked ~ .ps-scan-switch__label .ps-scan-switch__track {
    background: #f5f6fa;
}

.ps-scan-switch__input:checked ~ .ps-scan-switch__label .ps-scan-switch__track::before {
    content: attr(data-unchecked);
    left: 4px;
}

.ps-scan-switch__input:checked ~ .ps-scan-switch__label .ps-scan-switch__track::after {
    content: attr(data-checked);
    color: #FFF;
    transform: translate3d(76px, 0, 0);
}

.ps-scan-switch__label:hover .ps-scan-switch__track {
    /* background: #3642f3; */
}

.ps-scan-switch__input:checked ~ .ps-scan-switch__label:hover .ps-scan-switch__track {
    background: #f5f6fa;
}

.ps-scan-switch__input:focus-visible ~ .ps-scan-switch__label .ps-scan-switch__track {
    background: #3642f3;
    outline: 2px solid #ff9113;
    outline-offset: 2px;
}

.ps-scan-switch__input:checked:focus-visible ~ .ps-scan-switch__label .ps-scan-switch__track {
    background: #1321f1;
}

/* Text beside the switch */
.ps-scan-switch__text {
	font-size: 14px;
	display: block;
	margin-right: 8px;
	color: #222;
}

/* Button Styles */

.ps-btn {
    background-color: #1321f1;
    border: 1px solid #0e19b5;
    color: #fff;
    border-radius: 4px;
}

.ps-btn:hover {
    cursor: pointer;
    background-color: #3642f3;
    border: 1px solid #7d85f7;

    transition: background-color 0.3s, border-color 0.3s;
}
.ps-btn-reveal-sub-menu{
    background-color: #1321f1;
    border: 1px solid #0e19b5;
    color: #fff;
    border-radius: 4px;
    padding: 8px 12px;
}
.ps-btn-reveal-sub-menu:hover {
    cursor: pointer;
    background-color: #3642f3;
    border: 1px solid #7d85f7;
    transition: background-color 0.3s, border-color 0.3s;
}
.ps-sub-menu{
    display: none;
    position: absolute;
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    padding: 10px;
    z-index: 1000;
    text-align: center;
}
.ps-sub-menu .material-icons{
    position: relative;
    top: 6px;
    left: -1px;
}
.ps-sub-menu button, .ps-sub-menu a  {
    padding: 0 12px 8px 12px;
}
/* Sub menu visibility is toggled via JS (slideDown/slideUp), not CSS hover. */
.ps-history-delete, .ps-view-result, .ps-view-completed-result {
    display: block;
}
.ps-view-completed-result{
    background-color: #1321f1;
    border: 1px solid #0e19b5;
    color: #fff;
    padding-top: 8px;
    padding-bottom: 8px;
    border-radius: 4px;
}
.ps-view-completed-result:hover {
    cursor: pointer;
    background-color: #3642f3;
    border: 1px solid #7d85f7;
    transition: background-color 0.3s, border-color 0.3s;
}
.ps-view-completed-result .material-icons{
    left: -5px;
}

.ps-history-delete, .ps-view-result, .ps-view-completed-result {
    margin: 5px auto;
}
#scan-button {
	font-size: 18px;
	padding: 12px 20px;
	margin-top: 20px;
	text-transform: uppercase;
}

#ps-download-csv,
#ps-cancel-scan {
    font-size: 16px;
    padding: 8px 12px;
}

#scan-button .material-icons {
    font-size: 18px;
    vertical-align: middle;
    padding-bottom: 4px;
}

#scan-button.ps-btn.scan-btn-disabled {
    background-color: #d8dae0;
    border: 1px solid #494e5c;
    color: #494e5c;
    box-shadow: 0 2px 5px #d8dae0;
}

#ps-clear-results {
    font-size: 12px;
    padding: 9px 15px;
    margin-left: 6px;
}

#ps-clear-results .material-icons {
    font-size: 14px;

    vertical-align: middle;

    margin-top: -3px;

    margin-right: 5px;
}

.ps-btn.ps-row-copy {
    padding: 5px 10px;
}

.ps-btn.ps-row-copy .material-icons {
    font-size: 12px;

    vertical-align: middle;

    margin-top: -4.5px;

    margin-right: 4px;
}

/* End Button Styles */

.ps-note {
	text-align: center;
	font-size: 14px;
	font-style: italic;
}

.ps-progress-bar {
    width: 100%;
    height: 20px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.ps-progress-fill {
    height: 100%;
    width: 0%;
    background: #24c560;
    transition: width 0.4s;
}

.ps-results-table {
    width: 100%;

    border-collapse: collapse;

    margin-top: 12px;
}

.ps-results-table th,
.ps-results-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    font-size: 13px;
    max-width: 200px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ps-results-table th {
    background: #f5f5f5;
}

#ps-spinner-wrap {
    text-align: center;

    margin-bottom: 8px;
}

#ps-spinner {
    width: 36px;

    height: 36px;

    display: inline-block;

    vertical-align: middle;
}

.ps-scan-status,
.ps-history-wrap,
.ps-scan-detail-wrap {
    background: #fff;
    margin-top: 1rem;
}

.ps-history-wrap {
  border: 1px solid #d8d1c8;
}

.ps-scan-status {
    border: 1px solid #d8d1c8;
    border-radius: 5px;
    padding: 30px 20px;
    background-color: #FFF;
}

.ps-scan-meta {
    display: flex;
    gap: 20px;
    margin: 0;
}



.ps-scan-meta div {
    margin: 0;
    flex-grow: 1;
}

.ps-scan-meta dt {
    color: #0f1e4c;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.ps-scan-meta dd {
    font-size: 14px;
    margin: 0;
    overflow-wrap: anywhere;
}

.ps-scan-message.ps-error,
.ps-error {
    color: #b32d2e;
}

.ps-progress-text {
	text-align: center;
	font-size: 15px;
	margin-bottom: 30px;
	border-bottom: 1px solid #d8d1c8;
	padding-bottom: 30px;
	color: #188340;
}

.ps-scan-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.ps-scan-actions .ps-btn,
.ps-history-view,
.ps-history-delete {
    display: inline-block;
    padding: 8px 12px;
    text-decoration: none;
    font-size: 14px;
}
.ps-history-table th,
.ps-history-table td {
    padding: 8px;
    text-align: center;
}

.ps-history-view.is-disabled,
.ps-history-view:disabled {
    background-color: #d8dae0;
    border-color: #b7bbc4;
    color: #494e5c;
    cursor: not-allowed;
    opacity: 0.75;
}

.ps-history-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-direction: column;
    position: relative;
}

.ps-history-actions form {
    display: inline-block;
    margin: 0;
}

.ps-history-delete {
    background-color: #8f1d1d;
    border-color: #6f1515;
}

.ps-history-delete:hover,
.ps-history-delete:focus {
    background-color: #b32d2e;
    border-color: #8f1d1d;
}

.ps-scan-detail-wrap {
    margin: 40px auto;
    max-width: 1200px;
    border: 1px solid #d8d1c8;
    border-radius: 5px;
    box-shadow: 0px 6px 16px 0px rgba(80, 78, 78, 0.1);
    padding-top: 40px;
    padding-right: calc(var(--padding-m) + 5px);
    padding-bottom: 40px;
    padding-left: calc(var(--padding-m) + 5px);
}

.ps-scan-detail-wrap .brxe-container {
	padding: 0;
}

.ps-scan-detail-header {
    margin-bottom: 0;
    width: 100%;
}

.ps-scan-detail-wrap .brxe-section {
	padding-top: var(--space-s);
	padding-bottom: var(--space-xs);
}

.ps-history-wrap a,
.ps-scan-detail-wrap a {
    text-decoration: none;
    text-align: center;
}

.ps-history-table.widefat.striped {
    width: 100%;
    table-layout: fixed;
    font-size: 14px;
    border: none;
    margin-bottom: 0;
}

.ps-history-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 1rem;
}

.ps-history-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
}

.ps-history-pagination .page-numbers.current {
    background: #1321f1;
    border-color: #1321f1;
    color: #fff;
}

.ps-history-pagination .page-numbers.dots {
    border: none;
}

.ps-history-pagination a.page-numbers:hover {
    background: #f0f0f1;
}
 /* Base table styles (Equivalent to .widefat) */
.widefat {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    background-color: #ffffff;
    border: 1px solid #c3c4c7;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    margin: 0 0 20px;
    font-size: 13px;
    color: #2c3338;
    text-align: left;
}
  /* Header and Footer cells */
.widefat thead th, 
.widefat tfoot td {
    border-bottom: 1px solid #c3c4c7;
    background-color: #ffffff;
    padding: 8px 10px;
    font-weight: 600;
    line-height: 1.4;
}

.widefat tfoot td {
    border-top: 1px solid #c3c4c7;
    border-bottom: none;
}

/* Body cells */
.widefat tbody td {
    padding: 8px 10px;
    vertical-align: middle;
    line-height: 1.5;
    border-bottom: 1px solid #f0f0f1;
}

/* Zebra striping (Equivalent to .striped) */
.widefat.striped tbody tr:nth-of-type(odd) {
    background-color: #f6f7f7;
}

/* Optional: Slight hover effect for accessibility */
.widefat tbody tr:hover {
    background-color: #f0f0f1;
}
.material-icons.pagination-icon {
  position: relative;
  top: 7px;
}
.ps-btn.pagination-btn{
  padding: 6px 3px;
}

@media only screen and (max-width: 1024px) {
    .ps-input-group-cols {
	    flex-direction: column;
	    gap: 15px;
    }

    .ps-scan-switch {
        align-self: center;
    }

    #scan-button {
	    min-width: 300px;
        margin: 20px auto 0;
    }

    .ps-input-group {
	    width: 100%;
    }
}

@media only screen and (max-width: 960px) {
    .ps-results-wrap {
        overflow-x: auto;
        width: 100%;
        -webkit-overflow-scrolling: touch; /* Smooth momentum scrolling on iOS */
        /* Firefox scrollbar styling */
        scrollbar-width: thin;
        scrollbar-color: #7a81e5 #f1f1f1; /* thumb color, track color */
        padding-bottom: 20px;
    }

    .ps-results-wrap .ps-results-table {
        min-width: 960px !important;
        width: 100% !important;
    }

    .ps-history-wrap::-webkit-scrollbar,
    .ps-results-wrap::-webkit-scrollbar {
        height: 8px; /* Height of horizontal scrollbar */
        display: block !important;
    }

    .ps-history-wrap::-webkit-scrollbar-track,
    .ps-results-wrap::-webkit-scrollbar-track {
        background: #f1f1f1; /* Light grey track background */
        border-radius: 4px;
    }

    .ps-history-wrap::-webkit-scrollbar-thumb,
    .ps-results-wrap::-webkit-scrollbar-thumb {
        background: #7a81e5; /* Dark thumb so it stands out */
        border-radius: 4px;
    }

    .ps-history-wrap::-webkit-scrollbar-thumb:hover,
    .ps-results-wrap::-webkit-scrollbar-thumb:hover {
        background: #5e67ec;
    }
}

@media only screen and (max-width: 768px) {

    .ps-history-wrap {
        overflow-x: auto;
        width: 100%;
        -webkit-overflow-scrolling: touch; /* Smooth momentum scrolling on iOS */
        /* Firefox scrollbar styling */
        scrollbar-width: thin;
        scrollbar-color: #7a81e5 #f1f1f1; /* thumb color, track color */
        padding-bottom: 20px;
    }

    .ps-history-wrap .ps-history-table {
        min-width: 768px;
    }
}

@media only screen and (max-width: 480px) {
    #scan-button {
	    min-width: auto;
	    width: 100%;
    }
}