/* ==========================================================================
 * VMP Security All Options Page Styles
 * @package VMPFence
 * @since 2.2.2
 * @since 2.2.4 - Added styles for license change modal, Firewall Options
 * @since 2.2.5 - Added Firewall Options, Blocking Options, Scan Options, Live Traffic Options and Audit Log options styles
   ========================================================================== */


/* Options Toolbar */
.vmpfence-options-toolbar {
    position: sticky;
    top: 32px;
    z-index: 100;
    background: #fff;
    border: 1px solid #ccd0d4;
    padding: 15px 20px;
    margin: 20px 20px 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    max-width: 95%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.vmpfence-search-container {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.vmpfence-search-input {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 3px;
    min-height: 40px !important;
}

.vmpfence-search-input:focus {
    border-color: #191970 !important;
    outline: none;
    box-shadow: 0 0 0 1px #191970 !important;
}

.vmpfence-search-message {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    padding: 8px 12px;
    color: #666;
    font-size: 12px;
    font-style: italic;
    margin-top: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.vmpfence-toolbar-buttons {
    display: flex;
    gap: 8px;
}

.vmpfence-toolbar-buttons .button {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    height: auto;
    text-transform: uppercase;
    white-space: nowrap;
    min-width: 120px;
}

.vmpfence-btn-restore,
.vmpfence-btn-cancel {
    background: #fff;
    border: 1px solid #ddd;
    color: #555;
}

.vmpfence-btn-restore:hover,
.vmpfence-btn-cancel:hover {
    background: #f7f7f7;
    border-color: #999;
}

.vmpfence-btn-save {
    background: #191970 !important;
    border-color: #191970 !important;
    color: #fff;
}

.vmpfence-btn-save:hover {
    background: #1c1c8b !important;
    border-color: #1c1c8b !important;
}

.vmpfence-all-options-page {
    max-width: 1300px;
    background: #f5f7fa;
    padding: 10px;
}

.vmpfence-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.vmpfence-all-options-page h1 {
    color: #23282d;
    font-size: 23px;
    font-weight: 400;
    margin: 0;
    padding: 9px 0 4px;
    line-height: 1.3;
}

.vmpfence-expand-all {
    background: #fff;
    border: 1px solid #191970 !important;
    color: #191970 !important;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 3px;
    text-transform: uppercase;
    transition: all 0.2s;
}

.vmpfence-expand-all:hover {
    background: #1c1c8b !important;
    color: #fff !important;
}

.vmpfence-description {
    color: #666;
    font-size: 13px;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.all-options-section {
    margin-bottom: 30px;
}

.all-options-section-header {
    color: #23282d;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding: 0;
    padding-bottom: 10px;
}

.vmpfence-accordion-item {
    border: 1px solid #ddd;
    margin-bottom: 10px;
    background: #fff;
    padding: 5px;
}

.vmpfence-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    background: #fff;
    transition: background 0.2s;
    user-select: none;
}

.vmpfence-accordion-header:hover {
    background: #f0f0f0;
}

.vmpfence-accordion-header span:first-child {
    color: #1d2327;
    font-size: 16px;
    font-weight: 600;
}

.vmpfence-accordion-arrow {
    color: #666;
    font-size: 20px;
    font-weight: 400;
    transition: transform 0.3s;
}

.vmpfence-accordion-item.active .vmpfence-accordion-arrow {
    transform: rotate(90deg);
}

.vmpfence-accordion-content {
    display: none;
    padding: 20px 16px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

.vmpfence-accordion-note {
    color: #666;
    font-size: 13px;
    margin: 0 0 12px 0;
}

.vmpfence-accordion-content .button {
    background: #191970;
    border-color: #191970;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    height: auto;
    line-height: 1.4;
}

.vmpfence-accordion-content .button:hover {
    background: #1c1c8b;
    border-color: #1c1c8b;
    color: #fff;
}

/* VMP Security License Section */
.vmpfence-license-container {
    background: #fff;
    padding: 20px 0;
}

.vmpfence-license-container h3 {
    margin: 0 0 20px 0;
    font-size: 15px;
    font-weight: 600;
    color: #23282d;
}

.vmpfence-license-key-group {
    margin-bottom: 20px;
}

.vmpfence-license-key-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    color: #23282d;
    font-size: 14px;
}

.vmpfence-license-key-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #666;
    font-size: 11px;
    color: #666;
    cursor: help;
}

#vmpfence-license-key-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    color: #333;
    font-family: monospace;
    cursor: text;
}

.vmpfence-license-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vmpfence-license-status-text {
    color: #23282d;
    font-size: 14px;
}

.vmpfence-license-status-value {
    font-weight: 500;
    font-size: 14px;
}

.vmpfence-license-status-value.premium {
    color: #28a745;
}

.vmpfence-license-status-value.free {
    color: #666;
}

.vmpfence-license-actions {
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
    align-items: center;
}

.vmpfence-license-actions form {
    margin: 0;
}

.vmpfence-license-actions .button-primary {
    display: inline;
}

.vmpfence-deactivate-btn {
    background: none;
    border: none;
    color: #0073aa;
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}

.vmpfence-license-link {
    color: #0073aa;
    text-decoration: none;
    font-size: 13px;
}

.vmpfence-upgrade-btn,
.vmpfence-change-license-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    height: auto;
    line-height: 1.4;
    min-width: 180px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.vmpfence-upgrade-btn {
    background: #191970;
    border-color: #191970;
    color: #fff;
}

.vmpfence-upgrade-btn:hover,
.vmpfence-upgrade-btn:focus {
    background: #0f0f4a;
    border-color: #0f0f4a;
    color: #fff;
}

.vmpfence-change-license-btn {
    background: #f0f0f1;
    border-color: #8c8f94;
    color: #2c3338;
}

.vmpfence-change-license-btn:hover,
.vmpfence-change-license-btn:focus {
    background: #e6e6e6;
    border-color: #8c8f94;
    color: #2c3338;
}

/* View Customization Section */
.vmpfence-view-customization {
    padding: 0;
}

.vmpfence-checkbox-item {
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 10px;
}

.vmpfence-checkbox-item:last-child {
    border-bottom: none;
}

.vmpfence-checkbox-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.vmpfence-checkbox-item input[type="checkbox"] {
    margin: 0 10px 0 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.vmpfence-checkbox-item span {
    color: #23282d;
    font-size: 14px;
    cursor: pointer;
}

/* Wordfence-style option rows (General VMP Security Options) */
.vmpfence-options-table {
    border: 1px solid #e6e6e6;
    background: #fff;
}

.vmpfence-option-row {
    display: grid;
    grid-template-columns: 44px 1fr 360px;
    gap: 20px;
    padding: 18px 20px;
    border-top: 1px solid #efefef;
    align-items: start;
}

.vmpfence-option-row:first-child {
    border-top: none;
}

.vmpfence-option-row--tall {
    align-items: start;
    grid-template-columns: 44px 1fr;
}

.vmpfence-option-row--tall .vmpfence-option-input {
    display: none;
}

.vmpfence-option-row--tall .vmpfence-radio-group {
    max-width: none;
    margin-top: 10px;
}

.vmpfence-option-check {
    display: flex;
    justify-content: center;
    padding-top: 2px;
}

.vmpfence-option-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.vmpfence-option-label {
    min-width: 0;
}

.vmpfence-option-title {
    font-size: 14px;
    color: #1d2327;
    font-weight: 600;
    line-height: 1.35;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.vmpfence-option-desc {
    margin-top: 8px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.vmpfence-option-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #9aa0a6;
    color: #6b7280;
    font-size: 11px;
    cursor: help;
    flex: 0 0 auto;
}

.vmpfence-option-input {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.vmpfence-text-input {
    width: 100%;
    max-width: 360px;
    padding: 8px 10px !important;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    font-size: 14px !important;
    background: #fff;
}

.vmpfence-text-input:focus {
    border-color: #191970;
    box-shadow: 0 0 0 1px #191970;
    outline: none;
}

.vmpfence-text-input--small {
    max-width: 120px;
}

.vmpfence-radio-group {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vmpfence-radio-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    font-size: 14px;
    color: #1d2327;
    line-height: 1.5;
    cursor: pointer;
}

.vmpfence-radio-item input[type="radio"] {
    margin-top: 2px;
}

.vmpfence-option-note {
    margin-top: 14px;
    font-size: 13px;
    color: #1d2327;
}

.vmpfence-inline-link {
    display: inline-block;
    margin-top: 6px;
    color: #2271b1;
    text-decoration: none;
}

.vmpfence-inline-link:hover {
    text-decoration: underline;
}

/* Trusted proxies (hidden panel under IP detection) */
.vmpfence-trusted-proxies-panel {
    display: none;
    margin-top: 20px;
}

.vmpfence-trusted-proxy-row {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
    margin-top: 20px;
}

.vmpfence-trusted-proxy-row:first-child {
    margin-top: 0;
}

.vmpfence-trusted-proxy-title {
    font-size: 13px;
    color: #1d2327;
    font-weight: 400;
    line-height: 1.35;
}

.vmpfence-trusted-proxy-desc {
    margin-top: 4px;
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

.vmpfence-textarea,
.vmpfence-select {
    width: 100%;
    max-width: 340px;
    font-size: 13px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
}

.vmpfence-textarea {
    padding: 8px 10px;
    resize: vertical;
    min-height: 84px;
}

.vmpfence-select {
    padding: 6px 10px;
    height: 36px;
}

.vmpfence-textarea:focus,
.vmpfence-select:focus {
    border-color: #191970;
    box-shadow: 0 0 0 1px #191970;
    outline: none;
}

@media (max-width: 1100px) {
    .vmpfence-option-row {
        grid-template-columns: 44px 1fr;
    }
    .vmpfence-option-input {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-left: 44px;
    }
    .vmpfence-text-input {
        max-width: 520px;
    }
}

/* ==========================================================================
 * License Change Modal Styles
   ========================================================================== */

#vmpfence-license-change-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.vmpfence-license-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    z-index: 99999;
}

.vmpfence-license-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 550px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 100000;
}

.vmpfence-license-modal-content h2 {
    margin: 0 0 10px 0;
    font-size: 22px;
    color: #191970;
}

.vmpfence-license-modal-content > p {
    margin: 0 0 25px 0;
    color: #666;
    font-size: 14px;
}

.vmpfence-license-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.vmpfence-license-modal-close:hover {
    color: #333;
}

.vmpfence-form-group {
    margin-bottom: 20px;
}

.vmpfence-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.vmpfence-form-group label .required {
    color: #d63638;
}

.vmpfence-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.vmpfence-input:focus {
    outline: none;
    border-color: #191970;
    box-shadow: 0 0 0 1px #191970;
}

.vmpfence-field-description {
    margin: 5px 0 0 0;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.vmpfence-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal !important;
}

.vmpfence-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.vmpfence-checkbox-label span {
    font-size: 14px;
    color: #333;
}

.vmpfence-error-message {
    padding: 12px;
    background: #fef0f0;
    border: 1px solid #d63638;
    border-radius: 4px;
    color: #d63638;
    font-size: 13px;
    margin-bottom: 20px;
}

.vmpfence-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

.vmpfence-modal-buttons button {
    padding: 8px 16px;
    font-size: 14px;
}

.vmpfence-modal-buttons button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 600px) {
    .vmpfence-license-modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .vmpfence-license-modal-content h2 {
        font-size: 18px;
    }
    
    .vmpfence-modal-buttons {
        flex-direction: column;
    }
    
    .vmpfence-modal-buttons button {
        width: 100%;
    }
}

/* ============================================
   Basic Firewall Options - Card Grid Layout
   ============================================ */
.vmpfence-accordion-content .vmpfence-firewall-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.vmpfence-accordion-content .vmpfence-firewall-box {
    padding: 25px;
    border-right: 1px solid #e5e5e5;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.vmpfence-accordion-content .vmpfence-firewall-box:last-child {
    border-right: none;
}

.vmpfence-accordion-content .vmpfence-firewall-box h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 40px 0;
    color: #23282d;
}

.vmpfence-accordion-content .vmpfence-firewall-box p {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin: 0 0 16px 0;
}

.vmpfence-accordion-content .vmpfence-firewall-box .vmpfence-select {
    width: 100%;
    font-size: 15px;
}

.vmpfence-accordion-content .vmpfence-firewall-box button {
    width: 80%;
}

/* Toggle Button Group */
.vmpfence-accordion-content .vmpfence-btn-group {
    display: inline-flex;
    gap: 0;
    background: #f5f5f5;
    border-radius: 4px;
    padding: 2px;
}

.vmpfence-accordion-content .vmpfence-toggle-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 3px;
    min-width: 70px;
    text-align: center;
}

.vmpfence-accordion-content .vmpfence-toggle-btn:hover {
    background: rgba(36, 36, 141, 0.1);
    color: #191970;
}

.vmpfence-accordion-content .vmpfence-toggle-btn-active {
    background: #191970 !important;
    color: white !important;
    font-weight: 600;
}

.vmpfence-accordion-content .vmpfence-toggle-btn-active:hover {
    background: #24248d !important;
}

/* Firewall Button Styles */
.vmpfence-accordion-content .vmpfence-btn-primary {
    padding: 8px 16px;
    background: #191970;
    color: white;
    border: 2px solid #191970;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: block;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.vmpfence-accordion-content .vmpfence-btn-primary:hover {
    background: #2525a3;
    border-color: #2525a3;
}

.vmpfence-accordion-content .vmpfence-btn-outline {
    padding: 8px 16px;
    background: white;
    color: #191970;
    border: 2px solid #191970;
    border-radius: 3px;
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
    display: block;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.vmpfence-accordion-content .vmpfence-btn-outline:hover {
    background: #191970;
    color: #fff;
}

@media (max-width: 1024px) {
    .vmpfence-accordion-content .vmpfence-firewall-grid {
        grid-template-columns: 1fr;
    }
    .vmpfence-accordion-content .vmpfence-firewall-box {
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
        min-height: auto;
    }
    .vmpfence-accordion-content .vmpfence-firewall-box:last-child {
        border-bottom: none;
    }
}

/* ============================================
   Advanced Firewall Options
   ============================================ */
.vmpfence-accordion-content .vmpfence-advanced-option {
    padding: 20px 25px;
    border-bottom: 1px solid #e5e5e5;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 10px 30px;
    align-items: start;
}

.vmpfence-accordion-content .vmpfence-advanced-option:last-child {
    border-bottom: none;
}

.vmpfence-accordion-content .vmpfence-label-main {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #23282d;
    line-height: 1.6;
    margin-bottom: 12px;
}

.vmpfence-accordion-content .vmpfence-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #c3c4c7;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    cursor: help;
    margin-left: 5px;
    vertical-align: middle;
    line-height: 1;
}

.vmpfence-accordion-content .vmpfence-help-icon:hover {
    background: #999;
}

.vmpfence-accordion-content .vmpfence-textarea-full {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: monospace;
    resize: vertical;
    background: white;
    grid-column: 2;
}

.vmpfence-accordion-content .vmpfence-textarea-full:focus {
    outline: none;
    border-color: #191970;
    box-shadow: 0 0 0 1px #191970;
}

.vmpfence-accordion-content .vmpfence-help-description {
    font-size: 13px;
    line-height: 1.6;
    color: #161616;
    margin: 6px 0 0 0;
    grid-column: 2;
}

.vmpfence-accordion-content .vmpfence-help-description a {
    color: #191970;
    text-decoration: none;
    font-weight: 500;
}

.vmpfence-accordion-content .vmpfence-help-description a:hover {
    text-decoration: underline;
}

/* Services Grid */
.vmpfence-accordion-content .vmpfence-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 0;
    grid-column: 2;
}

.vmpfence-accordion-content .vmpfence-service-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #161616;
    cursor: pointer;
}

.vmpfence-accordion-content .vmpfence-service-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #191970;
}

.vmpfence-accordion-content .vmpfence-service-checkbox span {
    user-select: none;
}

/* WAF Category Toggle Switch */
.vmpfence-ao-category-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.vmpfence-ao-category-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.vmpfence-ao-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s ease;
    border-radius: 24px;
}

.vmpfence-ao-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.vmpfence-ao-category-toggle input:checked + .vmpfence-ao-toggle-slider {
    background-color: #191970;
}

.vmpfence-ao-category-toggle input:checked + .vmpfence-ao-toggle-slider:before {
    transform: translateX(24px);
}

.vmpfence-ao-category-toggle input:not(:checked) + .vmpfence-ao-toggle-slider:hover {
    background-color: #b3b3b3;
}

.vmpfence-ao-category-toggle input:checked + .vmpfence-ao-toggle-slider:hover {
    background-color: #14145a;
}

/* === Brute Force Protection === */
.vmpfence-bf-option {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.vmpfence-bf-option:last-child {
    border-bottom: none;
}

.vmpfence-bf-option-left {
    flex: 1;
    padding-right: 20px;
}

.vmpfence-bf-option-right {
    flex: 0 0 auto;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.vmpfence-bf-option-toggle {
    padding: 20px 0;
}

.vmpfence-bf-option-checkbox {
    display: block;
}

.vmpfence-bf-option-textarea {
    display: block;
}

.vmpfence-bf-option-textarea .vmpfence-bf-option-left {
    padding-right: 0;
    margin-bottom: 10px;
}

.vmpfence-bf-subsection-header {
    border-top: 2px solid #191970;
    margin-top: 20px;
    padding-top: 15px;
}

.vmpfence-bf-subsection-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: #191970;
    margin: 0;
}

/* Override select/input styles inside bf-option to match firewall-options page */
.vmpfence-bf-option .vmpfence-select {
    width: auto;
    min-width: 200px;
    max-width: 400px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    color: #464646;
    background-color: white;
    padding: 6px 10px;
    height: auto;
}

#vmpfence_rl_throttle_behavior {
    min-width: 250px;
}

.vmpfence-bf-option .vmpfence-select:hover {
    border-color: #191970 !important;
}

.vmpfence-bf-option .vmpfence-select:focus {
    outline: none;
    border-color: #191970;
    box-shadow: 0 0 0 1px #191970;
}

.vmpfence-bf-option .vmpfence-input {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
}

.vmpfence-bf-option .vmpfence-input:focus {
    outline: none;
    border-color: #191970;
    box-shadow: 0 0 0 1px #191970;
}

/* Rate Limiting rule selects row */
.vmpfence-rl-rule-selects {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vmpfence-rl-rule-selects span {
    color: #666;
    font-size: 13px;
    white-space: nowrap;
}

.vmpfence-rl-rule-selects .vmpfence-select {
    min-width: 120px;
}

@media (max-width: 768px) {
    .vmpfence-bf-option {
        flex-direction: column;
    }
    .vmpfence-bf-option-left {
        padding-right: 0;
        margin-bottom: 10px;
    }
    .vmpfence-bf-option-right {
        flex: none;
        width: 100%;
        justify-content: flex-start;
    }
}

/* Rules footer & sync status */
.vmpfence-rules-footer {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vmpfence-rules-footer .vmpfence-update-info {
    font-size: 13px;
    color: #666;
}

/* === Allowlisted URLs Section === */
.vmpfence-ao-allowlist-form {
    padding: 20px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.vmpfence-ao-allowlist-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.vmpfence-ao-allowlist-input {
    border: 1px solid #ddd;
    padding: 8px 10px;
    font-size: 13px;
    height: 36px;
    border-radius: 3px;
    box-sizing: border-box;
}

.vmpfence-ao-allowlist-input:focus {
    border-color: #191970;
    box-shadow: 0 0 0 1px #191970;
    outline: none;
}

.vmpfence-ao-allowlist-select {
    border: 1px solid #ddd;
    padding: 8px 10px;
    font-size: 13px;
    height: 36px;
    border-radius: 3px;
    background-color: white;
    cursor: pointer;
}

.vmpfence-ao-allowlist-select:focus {
    border-color: #191970;
    box-shadow: 0 0 0 1px #191970;
    outline: none;
}

.vmpfence-ao-btn-add {
    background: #24248d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    height: 36px;
    transition: background-color 0.2s;
}

.vmpfence-ao-btn-add:hover {
    background: #191970;
}

.vmpfence-ao-allowlist-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
}

.vmpfence-ao-allowlist-actions {
    display: flex;
    gap: 5px;
}

.vmpfence-ao-btn-action {
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    transition: opacity 0.2s;
}

.vmpfence-ao-btn-action:hover {
    opacity: 0.85;
}

.vmpfence-ao-btn-delete {
    background: #dc3232;
    color: white;
}

.vmpfence-ao-btn-enable {
    background: #46b450;
    color: white;
}

.vmpfence-ao-btn-disable {
    background: #ddd;
    color: #666;
}

.vmpfence-ao-allowlist-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vmpfence-ao-filter-select,
.vmpfence-ao-filter-input {
    border: 1px solid #ddd;
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 3px;
}

.vmpfence-ao-filter-input {
    width: 150px;
}

.vmpfence-ao-btn-filter {
    background: #24248d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.2s;
}

.vmpfence-ao-btn-filter:hover {
    background: #191970;
}

.vmpfence-ao-allowlist-table-wrapper {
    background: white;
    border: 1px solid #ddd;
    border-radius: 3px;
    overflow: hidden;
}

.vmpfence-ao-allowlist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.vmpfence-ao-allowlist-table thead {
    background: #f0f0f0;
}

.vmpfence-ao-allowlist-table th {
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-size: 11px;
    text-transform: uppercase;
}

.vmpfence-ao-allowlist-table th:last-child {
    border-right: none;
}

.vmpfence-ao-allowlist-table td {
    padding: 8px;
    border-bottom: 1px solid #e5e5e5;
    border-right: 1px solid #e5e5e5;
    font-size: 12px;
    color: #333;
    vertical-align: middle;
}

.vmpfence-ao-allowlist-table td:last-child {
    border-right: none;
}

.vmpfence-ao-allowlist-table tbody tr:hover {
    background: #f8f8f8;
}

.vmpfence-ao-allowlist-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.vmpfence-ao-allowlist-table tbody tr:nth-child(even):hover {
    background: #f0f0f0;
}

.vmpfence-ao-allowlist-table input[type="checkbox"] {
    margin: 0;
    transform: scale(0.9);
    cursor: pointer;
}

.vmpfence-ao-monitor-section {
    margin-top: 20px;
    padding: 20px 0;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 20px;
}

@media screen and (max-width: 900px) {
    .vmpfence-ao-allowlist-table-wrapper {
        overflow-x: auto;
    }
    .vmpfence-ao-allowlist-table {
        min-width: 800px;
    }
    .vmpfence-ao-allowlist-toolbar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .vmpfence-ao-allowlist-row {
        flex-wrap: wrap;
    }
}

/* === Country Blocking Settings Table === */
.vmpfence-ao-settings-table {
    width: 100%;
    border-collapse: collapse;
}

.vmpfence-ao-settings-table tr {
    border-bottom: 1px solid #f0f0f1;
}

.vmpfence-ao-settings-table tr:last-child {
    border-bottom: none;
}

.vmpfence-ao-table-label {
    width: 250px;
    padding: 20px 16px;
    vertical-align: top;
    font-size: 14px;
    color: #1d2327;
    font-weight: 400;
}

.vmpfence-ao-table-field {
    padding: 20px 16px;
    vertical-align: top;
}

.vmpfence-ao-table-field .vmpfence-select {
    min-width: 200px;
    max-width: 500px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
    color: #1d2327;
    background-color: white;
    cursor: pointer;
}

.vmpfence-ao-table-field .vmpfence-select:focus {
    outline: none;
    border-color: #191970;
    box-shadow: 0 0 0 2px rgba(25,25,112,0.1);
}

.vmpfence-ao-text-input {
    width: 100%;
    max-width: 500px;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: white;
    transition: border-color 0.2s ease;
}

.vmpfence-ao-text-input:focus {
    outline: none;
    border-color: #191970;
    box-shadow: 0 0 0 2px rgba(25,25,112,0.1);
}

.vmpfence-ao-field-desc {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #646970;
    line-height: 1.5;
}

.vmpfence-ao-checkbox-inline {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #2c3338;
    cursor: pointer;
}

.vmpfence-ao-checkbox-inline input[type="checkbox"] {
    margin: 3px 0 0 0;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.vmpfence-ao-bypass-text {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #2c3338;
    line-height: 1.8;
}

.vmpfence-ao-inline-input {
    display: inline-block;
    width: 150px;
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    margin: 0 4px;
    vertical-align: baseline;
    background: white;
}

.vmpfence-ao-inline-input:focus {
    outline: none;
    border-color: #191970;
    box-shadow: 0 0 0 2px rgba(25,25,112,0.1);
}

/* ── Scan Type Cards Grid ── */
.vmpfence-ao-scan-types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.vmpfence-ao-scan-type-card {
    border: 2px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    background: white;
    transition: all 0.2s ease;
    cursor: pointer;
}

.vmpfence-ao-scan-type-card:hover {
    border-color: #191970;
}

.vmpfence-ao-scan-type-selected {
    border-color: #191970 !important;
    background: #f0f8ff !important;
}

.vmpfence-ao-scan-type-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.vmpfence-ao-scan-type-header input[type="checkbox"] {
    margin-top: 3px;
    accent-color: #191970;
    width: 16px;
    height: 16px;
}

.vmpfence-ao-scan-type-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    cursor: pointer;
}

.vmpfence-ao-scan-type-desc {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* Custom Scan card - dimmed unless selected */
.vmpfence-ao-scan-type-card:last-child {
    opacity: 0.8;
    cursor: default !important;
}

.vmpfence-ao-scan-type-card:last-child:hover {
    border-color: #ddd !important;
}

.vmpfence-ao-scan-type-card:last-child.vmpfence-ao-scan-type-selected {
    opacity: 1;
    border-color: #191970 !important;
    background: #3131cf;
}

@media (max-width: 1200px) {
    .vmpfence-ao-scan-types-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .vmpfence-ao-scan-types-grid {
        grid-template-columns: 1fr;
    }
}

/* ── General Options (Scan) ── */
.vmpfence-ao-general-options-list {
    display: flex;
    flex-direction: column;
}

.vmpfence-ao-gen-opt-item {
    padding: 15px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.vmpfence-ao-gen-opt-item:last-child {
    border-bottom: none;
}

.vmpfence-ao-gen-opt-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.vmpfence-ao-gen-opt-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    accent-color: #191970;
    flex-shrink: 0;
    cursor: pointer;
}

.vmpfence-ao-gen-opt-label span {
    flex: 1;
}

/* ── Performance Options (Scan) ── */
.vmpfence-ao-perf-opt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.vmpfence-ao-perf-opt-text {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    padding-left: 30px;
}

.vmpfence-ao-perf-number {
    width: 30% !important;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    flex-shrink: 0;
}

.vmpfence-ao-perf-opt-desc {
    margin: 6px 0 0 30px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    font-style: italic;
}

/* Advanced Scan Options */
.vmpfence-ao-adv-opt-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.vmpfence-ao-adv-opt-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
    padding-left: 30px;
    padding-top: 8px;
    flex-shrink: 0;
    max-width: 50%;
}

.vmpfence-ao-adv-textarea {
    flex: 1;
    max-width: 500px;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: monospace;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.vmpfence-ao-adv-textarea:focus {
    outline: none;
    border-color: #191970;
    box-shadow: 0 0 0 1px #191970;
}

.vmpfence-ao-adv-opt-desc {
    font-size: 13px;
    color: #666;
    font-style: italic;
    line-height: 1.4;
    margin: 0;
}

.vmpfence-ao-adv-select {
    padding: 6px 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 40% !important;
    transition: border-color 0.2s ease;
}

.vmpfence-ao-adv-select:focus {
    outline: none;
    border-color: #191970;
    box-shadow: 0 0 0 1px #191970;
}

/* ── Live Traffic Options ── */
.vmpfence-ao-lt-row {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.vmpfence-ao-lt-row:last-child {
    border-bottom: none;
}

.vmpfence-ao-lt-label {
    flex: 0 0 400px;
    font-weight: 500;
    color: #333;
    padding-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vmpfence-ao-lt-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #191970;
}

.vmpfence-ao-lt-control {
    flex: 1;
    padding-left: 200px;
}

.vmpfence-ao-lt-btn-group {
    display: flex;
    gap: 0;
    border: 1px solid #191970;
    border-radius: 12px;
    overflow: hidden;
}

.vmpfence-ao-lt-mode-btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: #ffffff;
    color: #191970;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-right: 1px solid rgba(25, 25, 112, 0.2);
}

.vmpfence-ao-lt-mode-btn:last-child {
    border-right: none;
}

.vmpfence-ao-lt-mode-btn.active {
    background: #191970;
    color: #ffffff;
}

.vmpfence-ao-lt-mode-btn:hover:not(.active) {
    background: #f8f9fa;
    color: #191970;
}

.vmpfence-ao-lt-textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 0 !important;
    font-size: 14px;
    font-family: 'Inter', monospace;
    color: #2c3338;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.vmpfence-ao-lt-textarea:focus {
    outline: none;
    border-color: #191970;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.vmpfence-ao-lt-input {
    width: 100%;
    height: 48px;
    padding: 12px;
    border: 1px solid rgba(0,0,0,0.1) !important;
    border-radius: 0 !important;
    font-size: 14px;
    color: #2c3338;
    transition: border-color 0.2s ease;
}

.vmpfence-ao-lt-input:focus {
    outline: none;
    border-color: #191970;
    box-shadow: 0 0 0 3px rgba(25, 25, 112, 0.1);
}

.vmpfence-ao-lt-input-small {
    width: 100%;
    height: 48px;
    padding: 12px;
    border: 1px solid rgba(0,0,0,0.1) !important;
    border-radius: 0 !important;
    font-size: 14px;
    color: #2c3338;
}

.vmpfence-ao-lt-input-small:focus {
    outline: none;
    border-color: #191970;
}

/* ===== Premium Feature Banner ===== */
.vmpfence-ao-premium-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 4px;
    font-size: 13px;
    color: #92400e;
}

.vmpfence-ao-premium-banner a {
    color: #191970;
    font-weight: 600;
    text-decoration: underline;
}

.vmpfence-ao-premium-banner a:hover {
    color: #0d0d4d;
}

/* ===== Link Row (Import/Export, Login Security) ===== */
.vmpfence-ao-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vmpfence-ao-link-row .vmpfence-accordion-note {
    margin: 0;
}

/* ===== Audit Log Options ===== */
.vmpfence-ao-al-row {
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vmpfence-ao-al-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.vmpfence-ao-al-toggle-group {
    display: inline-flex;
    gap: 0;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    overflow: hidden;
}

.vmpfence-ao-al-toggle-btn {
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: #2c3338;
    background: #fff;
    border: none;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.vmpfence-ao-al-toggle-btn:last-child {
    border-right: none;
}

.vmpfence-ao-al-toggle-btn:hover {
    background: #f8f9fa;
    color: #191970;
}

.vmpfence-ao-al-toggle-btn.active {
    background: #191970;
    color: #fff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.vmpfence-ao-al-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #2c3338;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .vmpfence-accordion-content .vmpfence-advanced-option {
        grid-template-columns: 1fr;
    }
    .vmpfence-accordion-content .vmpfence-textarea-full,
    .vmpfence-accordion-content .vmpfence-help-description,
    .vmpfence-accordion-content .vmpfence-services-grid {
        grid-column: 1;
    }
    .vmpfence-accordion-content .vmpfence-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
