/* Style for the honeypot field */
input[name^="hp_"] {
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
}

#hpsp-wrapper {
    font-family: Arial, sans-serif !important;
    overflow-x: hidden;
}

/* Tab Navigation */
.hpsp-tab-navigation {
    display: flex;
    gap: 0;
    margin: 20px 0 0 0;
    border-bottom: 1px solid #c3c4c7;
}

.hpsp-tab {
    display: inline-block;
    padding: 12px 20px;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    color: #2c3338;
    text-decoration: none;
    font-weight: 500;
    margin-right: -1px;
    transition: all 0.2s ease;
    position: relative;
}

.hpsp-tab:hover {
    background: #fff;
    color: #1d2327;
}

.hpsp-tab:focus {
    outline: none;
    box-shadow: none;
}

.hpsp-tab-active {
    background: #fff;
    color: #1d2327;
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
    z-index: 1;
}

.hpsp-tab-active:hover {
    background: #fff;
}




.input-with-clear {
    position: relative;
    display: inline-block;
    input {
        padding-right: 25px!important; /* Space for the clear button */
    }
}

.input-with-clear .clear-input {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #aaa;
}

.input-with-clear .clear-input:hover {
    color: #666;
}


/* Custom styles for your CSV export button */
.custom-csv-button {
    background-color: #0073e5; /* WordPress Blue */
    color: #fff;
    border-color: #0073e5;
    text-shadow: none;
    box-shadow: none;
    transition: background-color 0.2s ease-in-out;
}

.custom-csv-button:hover,
.custom-csv-button:focus {
    background-color: #005bb7; /* A slightly darker blue for hover */
    border-color: #005bb7;
    color: #fff;
}



/* Responsive adjustments */
.hpsp-settings-container {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.hpsp-settings-section {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    margin-bottom: 20px;
    padding: 20px;
}

.hpsp-page-heading {
    font-weight: 600!important;
    margin: 40px 0 20px 0!important;
    font-size: 24px!important;
}

.hpsp-settings-section h2 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.input-with-clear {
    position: relative;
    display: inline-block;
}

.clear-input {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    font-size: 16px;
}

.clear-input:hover {
    color: #d63638;
}

.checkbox-group {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    background: #fafafa;
}

.checkbox-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
}




.hpsp-filters-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    background: #fff;
    padding: 15px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
}

.hpsp-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hpsp-filter-divider {
    width: 2px;
    height: 35px;
    background: #dde2e9;
    margin: 0 15px;
    flex-shrink: 0;
}

/* Loading spinner with overlay */
#hpsp-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hpsp-spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background: #fff;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hpsp-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #2271b1;
    border-radius: 50%;
    animation: hpsp-spin 0.8s linear infinite;
}

@keyframes hpsp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hpsp-spinner-container p {
    margin: 0;
    color: #2271b1;
    font-weight: 600;
    font-size: 15px;
}

#spam-log-table-container {
    position: relative;
}

.hpsp-filter-group label {
    margin: 0;
    font-weight: 600;
    white-space: nowrap;
}

#hpsp-export2csv-btn {
    margin-left: 0!important;
}

.hpsp-filter-group select,
.hpsp-filter-group input[type="date"] {
    max-width: 150px;
}

.hpsp-filter-group input[type="checkbox"] {
    margin: 0;
}

#custom_date_range {
    display: none;
}

#custom_date_range.show {
    display: flex;
}




/* CSV Export Button Styling */
.hpsp-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
    padding: 6px 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    padding-inline: 4px;
    margin-left: 15px!important;
}

.hpsp-export-btn:hover,
.hpsp-export-btn:focus {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hpsp-export-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.hpsp-export-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin-top: -2px;
}

/* Loading state for export button */
.hpsp-export-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}


.hpsp-filter-group {
   .required::after {
        color: red;
        content: " *";
    }
}

.hpsp-valid {
    color: #00a32a;
    font-weight: 500;
}

.hpsp-invalid {
    color: #d63638;
    font-weight: 500;
}


@keyframes spin {
    to { transform: rotate(360deg); }
}


/* Disabled field styling */
.hpsp-disabled-field {
    opacity: 0.5;
}

.hpsp-disabled-field input[type="number"] {
    cursor: not-allowed;
}

/* Toggle Switch Styles - Compact Version */
.hpsp-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hpsp-toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    flex-shrink: 0;
}

.hpsp-toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.hpsp-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 20px;
}

.hpsp-toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.hpsp-toggle-switch input:checked + .hpsp-toggle-slider {
    background-color: #2271b1;
}

.hpsp-toggle-switch input:focus + .hpsp-toggle-slider {
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.3);
    outline: none;
}

.hpsp-toggle-switch input:checked + .hpsp-toggle-slider:before {
    transform: translateX(20px);
}

/* Toggle label on right side */
.hpsp-toggle-label {
    font-weight: normal;
    margin: 0;
    color: #1d2327;
    font-size: 13px;
    line-height: 1.4;
}



/* WordPress-style notice for hpsp-notice */
.hpsp-notice {
    position: relative;
    padding: 8px 12px;
    margin: 10px 0 15px;
    background: #fff;
    border-left: 4px solid #72aee6;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.hpsp-notice p {
    margin: 0.5em 0;
    padding: 2px;
}

.hpsp-notice.notice-success {
    border-left-color: #00a32a;
}

.hpsp-notice.notice-warning {
    border-left-color: #dba617;
}

.hpsp-notice.notice-error {
    border-left-color: #d63638;
}

.hpsp-notice.notice-info {
    border-left-color: #72aee6;
}

/* Dismissible notice button */
.hpsp-notice.is-dismissible {
    padding-right: 38px;
}

.hpsp-notice .notice-dismiss {
    position: absolute;
    top: 0;
    right: 1px;
    border: none;
    margin: 0;
    padding: 9px;
    background: none;
    color: #787c82;
    cursor: pointer;
    width: 36px;
    height: 100%;
}

.hpsp-notice .notice-dismiss:before {
    content: '\f153';
    display: inline-block;
    font: normal 16px/20px dashicons;
    speak: never;
    height: 20px;
    text-align: center;
    width: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hpsp-notice .notice-dismiss:hover,
.hpsp-notice .notice-dismiss:active {
    color: #d63638;
}

.hpsp-notice .notice-dismiss:focus {
    color: #043959;
    box-shadow: none;
    outline: none;
}

/* Support section  */
.support-section {
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.support-section p {
    margin: 5px 0;
}

.support-section strong {
    font-weight: bold;
}

.support-section a {
    color: #0066cc;
    text-decoration: none;
}

.support-section a:hover {
    text-decoration: underline;
}

.email-tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: 350px;
    background-color: #f9f9f9;
    color: #333;
    text-align: left;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -175px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transition: opacity 0.3s, visibility 0.3s;
    font-size: 13px;
    line-height: 1.5;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: #f9f9f9 transparent transparent transparent;
}

.email-tooltip:hover .tooltip-text,
.email-tooltip:focus .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .tooltip-text {
        width: 280px;
        margin-left: -140px;
        font-size: 12px;
    }
}

/* Help icon tooltip */
.hpsp-help-tooltip {
    position: relative;
    display: inline-block;
    margin-left: 5px;
    white-space: nowrap;
}

.hpsp-help-icon {
    color: #2271b1;
    cursor: help;
    font-size: 18px;
    vertical-align: middle;
}

.hpsp-help-icon:hover {
    color: #135e96;
}

.hpsp-help-text {
    visibility: hidden;
    opacity: 0;
    width: 220px;
    background-color: #f0f6fc;
    color: #1e1e1e;
    text-align: left;
    border: 1px solid #c3e4f7;
    border-radius: 6px;
    padding: 10px 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -110px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: opacity 0.2s, visibility 0.2s;
    font-size: 13px;
    line-height: 1.5;
    font-weight: normal;
    white-space: normal;
}

.hpsp-help-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #f0f6fc transparent transparent transparent;
}

.hpsp-help-tooltip:hover .hpsp-help-text {
    visibility: visible;
    opacity: 1;
}

/* Prevent label text and help icon from wrapping separately */
/* .hpsp-settings-section h2, */
/* .hpsp-settings-section .description, */

.hpsp-container {

    /* Vertical layout for form fields */
    .hpsp-form-table {
        display: table;
        width: 100%;
    }

    .hpsp-form-table .hpsp-field-row {
        display: table-row;
    }

    /* Label on top (for non-toggle fields) */
    .hpsp-form-table .hpsp-field-label {
        display: block;
        padding: 15px 0 8px 0;
        font-size: 13px;
        font-weight: 600;
        color: #1d2327;
        vertical-align: top;
    }

    .hpsp-form-table .hpsp-field-input {
        display: block;
        padding: 0 0 15px 0;
    }

    /* Toggle row - no left label, full width */
    .hpsp-form-table .hpsp-toggle-row .hpsp-field-input {
        padding: 10px 0;
    }

    /* Traditional form-table styles preserved */
    .form-table th {
        font-size: 13px;
        font-weight: 600;
    }

    .form-table input {
        /* max-width: 20em; */
    }

}

/* Responsive tooltip positioning for small screens */
@media (max-width: 600px) {
    .hpsp-help-text {
        width: 180px;
        margin-left: -90px;
        font-size: 12px;
    }
}




/* ======================= */
/* ============================================
   Plugin Info & Support Sections Styling
   ============================================ */


.hpsp-settings-info {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

/* Common section styles */
.hpsp-plugin-info-section,
.hpsp-support-section {
    flex: 1;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

/* Headers */
.hpsp-info-header,
.hpsp-support-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-bottom: 1px solid #dcdcde;
    background: #f6f7f7;
    border-radius: 4px 4px 0 0;
}

.hpsp-info-header .dashicons,
.hpsp-support-header .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #2271b1;
}

.hpsp-info-header h3,
.hpsp-support-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

/* Content areas */
.hpsp-info-content,
.hpsp-support-content {
    padding: 20px;
}

/* Plugin Info Section */
.hpsp-info-row {
    margin-bottom: 12px;
    color: #1d2327;
}

.hpsp-integrations-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hpsp-integration-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 4px;
    background: #f6f7f7;
    border-left: 3px solid #2271b1;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.hpsp-integration-item:hover {
    background: #e8eaeb;
    border-left-color: #135e96;
}

.hpsp-integration-item .dashicons {
    color: #00a32a;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.hpsp-no-integrations {
    padding: 12px;
    color: #646970;
    font-style: italic;
    text-align: center;
}

/* Support Section */
.hpsp-support-intro {
    margin: 0 0 20px 0;
    color: #50575e;
    line-height: 1.6;
}

.hpsp-support-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hpsp-support-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #f6f7f7;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.hpsp-support-item:hover {
    background: #e8eaeb;
}

.hpsp-support-item > .dashicons {
    flex-shrink: 0;
    font-size: 20px;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    color: #2271b1;
}

.hpsp-support-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.hpsp-support-details strong {
    color: #1d2327;
    font-size: 13px;
}



.hpsp-support-details a {
    color: #2271b1;
    transition: color 0.2s ease;
}

.hpsp-support-details a:hover {
    color: #135e96;
}

.hpsp-support-details a .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-left: 4px;
}

/* Email tooltip */
.hpsp-email-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
}

.hpsp-tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    padding: 12px;
    width: 280px;
    background: #1d2327;
    color: #fff;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hpsp-tooltip-arrow {
    position: absolute;
    top: 100%;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #1d2327;
}

.hpsp-email-tooltip:hover .hpsp-tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Highlight support form item */
.hpsp-support-form {
    background: #f0f6fc;
    border: 1px solid #c3e4f7;
}

.hpsp-support-form:hover {
    background: #e5f2fa;
}

/* Responsive */
@media screen and (max-width: 1280px) {
    .hpsp-settings-info {
        flex-direction: column;
    }
    
    .hpsp-plugin-info-section,
    .hpsp-support-section {
        max-width: 100%;
    }
}

@media screen and (max-width: 782px) {
    .hpsp-info-header,
    .hpsp-support-header {
        padding: 15px;
    }
    
    .hpsp-info-content,
    .hpsp-support-content {
        padding: 15px;
    }
    
    .hpsp-support-item {
        flex-direction: column;
        gap: 8px;
    }
    
    .hpsp-tooltip-text {
        width: 220px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .hpsp-tooltip-arrow {
        left: 50%;
        transform: translateX(-50%);
    }
}


/* ============================= */
/* Version Info Styles */
.hpsp-version-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.hpsp-version-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f0f6fc;
    border-left: 3px solid #2271b1;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.hpsp-version-item:hover {
    background: #e5f2fa;
    border-left-color: #135e96;
}

.hpsp-version-item > .dashicons {
    flex-shrink: 0;
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #2271b1;
}

.hpsp-version-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hpsp-version-details strong {
    font-size: 12px;
    color: #1d2327;
    font-weight: 600;
}

.hpsp-version-details span {
    font-size: 13px;
    color: #50575e;
}

.hpsp-version-number {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 600;
    color: #2271b1 !important;
}

/* Info Divider */
.hpsp-info-divider {
    height: 1px;
    background: #dcdcde;
    margin: 20px 0;
}

/* Update existing .hpsp-info-row */
.hpsp-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #1d2327;
    font-size: 14px;
}

/* Responsive adjustments for version info */
@media screen and (max-width: 1400px) {
    .hpsp-version-info {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 782px) {
    .hpsp-version-item {
        padding: 8px 10px;
    }
    
    .hpsp-version-details strong {
        font-size: 11px;
    }
    
    .hpsp-version-details span {
        font-size: 12px;
    }
}






/* ====== Salts Notice ========= */

.hpsp-salt-notice {
			position: relative;
			border-left: 4px solid #f0b849;
			background: #fff9e6;
			padding: 15px 20px !important;
		}
		
.hpsp-salt-notice .notice-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.hpsp-salt-notice .notice-title .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #f0b849;
}

.hpsp-salt-notice p {
    margin: 10px 0;
    line-height: 1.6;
}

.hpsp-salt-notice ul {
    margin: 10px 0 10px 20px;
}

.hpsp-salt-notice ul li {
    margin: 5px 0;
}

.hpsp-salt-notice code {
    background: #f0f0f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #d63638;
}

.hpsp-notice-section {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
}

.hpsp-notice-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.hpsp-notice-section-title .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #2271b1;
}

.hpsp-notice-section .description {
    margin: 8px 0 0 0;
    color: #646970;
    font-size: 13px;
}

.hpsp-code-container {
    position: relative;
    margin: 10px 0;
    min-height: 100px;
}

.hpsp-copy-button {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.hpsp-copy-button .dashicons {
    line-height: inherit;
    font-size: 16px;
}

#hpsp-salts-code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    height: 140px;
    resize: vertical;
    line-height: 1.5;
    color: #1d2327;
}

#hpsp-salts-code:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}


.hpsp-notice-divider {
    height: 1px;
    background: #dcdcde;
    margin: 15px 0;
}

.hpsp-auto-generate-form {
    margin: 10px 0;
}

.hpsp-auto-generate-form button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hpsp-auto-generate-form button .dashicons {
    line-height: inherit;
}


.hpsp-manual-steps {
    margin: 10px 0;
    padding-left: 20px;
}

.hpsp-manual-steps li {
    margin: 8px 0;
    line-height: 1.6;
}

@media screen and (max-width: 782px) {
    .hpsp-salt-notice {
        padding: 12px 15px !important;
    }
    
    .hpsp-notice-section {
        padding: 12px;
    }
    
    #hpsp-salts-code {
        font-size: 11px;
        height: 120px;
    }
    
    .hpsp-help-text {
        width: 220px;
    }
}