/**
 * VMPFence Firewall Options Styles
 * Based on scan-options.css styling
 *
 * @package VMPFence
 * @since 2.0.0
 * @since 2.2.2 -- Improved UI/UX design and color
 */

/* Top Navigation Bar (Sticky Header) */
.vmpfence-sticky-header {
    position: sticky;
    top: 32px; /* WordPress admin bar height */
    z-index: 999;
    background: white;
    border-bottom: 1px solid #ddd;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.vmpfence-options-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0;
}

.vmpfence-options-nav .vmpfence-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #007AFF;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.vmpfence-options-nav .vmpfence-back-link:hover {
    color: #191970;
}

.vmpfence-options-actions {
    display: flex;
    gap: 10px;
}

.vmpfence-btn-restore,
.vmpfence-btn-cancel,
.vmpfence-btn-save {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vmpfence-btn-restore {
    background: #f0f0f0;
    color: #555;
}

.vmpfence-btn-restore:hover {
    background: #e0e0e0;
}

.vmpfence-btn-cancel {
    background: white;
    color: #666;
    border: 1px solid #ddd;
}

.vmpfence-btn-cancel:hover {
    background: #f9f9f9;
}

.vmpfence-btn-save {
    background: #191970;
    color: white;
}

.vmpfence-btn-save:hover {
    background: #0f0f48;
}

/* Button Group Toggle Styles */
.vmpfence-btn-group {
    display: inline-flex;
    gap: 0;
    background: #f5f5f5;
    border-radius: 4px;
    padding: 2px;
}

.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-toggle-btn:hover {
    background: rgba(36, 36, 141, 0.1);
    color: #191970;
}

.vmpfence-toggle-btn-active {
    background: #191970 !important;
    color: white !important;
    font-weight: 600;
}

.vmpfence-toggle-btn-active:hover {
    background: #24248d !important;
}

/* Main Content Area */
.vmpfence-options-content {
    max-width: 1300px;
    margin: 0;
    padding: 30px 0;
}

/* Title Section */
.vmpfence-options-title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* margin-bottom: 30px; */
    background: #f5f7fa;
    padding: 10px 10px 10px 0;
}

.vmpfence-options-title h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    color: #23282d;
    display: flex;
    align-items: center;
}

.vmpfence-learn-more-link {
    color: #191970;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.vmpfence-learn-more-link:hover {
    text-decoration: underline;
}

/* Progress Cards Row */
.vmpfence-options-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0;
    margin-bottom: 10px;
}

.vmpfence-options-card {
    background: white;
    border: 1px solid #ddd;
    /* border-radius: 8px; */
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 20px;
    transition: box-shadow 0.2s;
}

.vmpfence-options-progress {
    flex-shrink: 0;
}

.vmpfence-circle-chart {
    display: block;
}

.vmpfence-circle-text {
    fill: #23282d;
}

.vmpfence-options-card-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #23282d;
}

.vmpfence-options-card-info p {
    font-size: 13px;
    margin: 0;
    color: #666;
}

/* Basic Firewall Options Section */
.vmpfence-basic-firewall-section {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0;
    margin-bottom: 0;
}

.vmpfence-section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    padding: 20px 25px;
    border-bottom: 1px solid #ddd;
    background: #f9f9f9;
    color: #23282d;
}

.vmpfence-firewall-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.vmpfence-firewall-box {
    padding: 25px;
    border-right: 1px solid #e5e5e5;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    /* justify-content: center; */
}

.vmpfence-firewall-box:last-child {
    border-right: none;
}

.vmpfence-firewall-box h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 40px 0;
    color: #23282d;
}

.vmpfence-firewall-box p {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin: 0 0 16px 0;
}

.vmpfence-firewall-box p:last-of-type {
    margin-bottom: 16px;
}

.vmpfence-firewall-box a {
    color: #191970;
    text-decoration: none;
}

.vmpfence-firewall-box a:hover {
    text-decoration: underline;
}

.vmpfence-firewall-box .vmpfence-select {
    width: 100%;
    font-size: 15px;
}

.vmpfence-firewall-box button {
    width: 80%;
}

/* Button Styles */
.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-btn-outline:hover {
    background: #191970;
    color: #fff;
}

.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-btn-primary:hover {
    background: #2525a3;
    border-color: #2525a3;
}

/* Advanced Firewall Options - Reuse collapsible section styles */
.vmpfence-advanced-option {
    padding: 20px 25px;
    border-bottom: 1px solid #e5e5e5;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    align-items: start;
}

.vmpfence-advanced-option:last-child {
    border-bottom: none;
}

.vmpfence-checkbox-wrapper {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-left: 0;
}

.vmpfence-checkbox-wrapper input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.vmpfence-checkbox-wrapper label {
    font-size: 14px;
    line-height: 1.6;
    color: #161616;
    cursor: pointer;
    flex: 1;
}

.vmpfence-checkbox-wrapper label strong {
    font-weight: 600;
    color: #23282d;
}

.vmpfence-label-main {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #23282d;
    line-height: 1.6;
    padding-top: 0;
    margin-bottom: 12px;
}

.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;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    cursor: help;
    margin-left: 5px;
    vertical-align: middle;
    line-height: 1;
}

.vmpfence-help-icon:hover {
    background: #999;
}

.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-textarea-full:focus {
    outline: none;
    border-color: #191970;
    box-shadow: 0 0 0 1px #191970;
}

/* Field Error Styling */
.vmpfence-field-error {
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 1px #dc3232 !important;
}

.vmpfence-field-error:focus {
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 1px #dc3232 !important;
}

.vmpfence-field-error-message {
    animation: vmpfence-error-fadein 0.3s ease-in;
}

@keyframes vmpfence-error-fadein {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vmpfence-help-description {
    font-size: 13px;
    line-height: 1.6;
    color: #161616;
    margin: 6px 0 0 0;
    grid-column: 2;
}

.vmpfence-help-description a {
    color: #191970;
    text-decoration: none;
    font-weight: 500;
}

.vmpfence-help-description a:hover {
    text-decoration: underline;
}

/* Services Grid */
.vmpfence-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 0;
    grid-column: 2;
}

.vmpfence-service-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #161616;
    cursor: pointer;
}

.vmpfence-service-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #191970;
}

.vmpfence-service-checkbox span {
    user-select: none;
}

/* Rules Section */
.vmpfence-rules-section {
    padding: 20px 25px;
    background: white;
    grid-column: 2;
}

.vmpfence-rules-title {
    font-size: 14px;
    font-weight: 600;
    color: #23282d;
    margin: 0 0 12px 0;
}

.vmpfence-rules-table {
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.vmpfence-rules-table thead {
    background: #f0f0f0;
}

.vmpfence-rules-table th {
    padding: 12px 15px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #ddd;
}

.vmpfence-rules-table td {
    padding: 12px 15px;
    font-size: 14px;
    color: #161616;
    border-bottom: 1px solid #e5e5e5;
}

.vmpfence-rules-table tbody tr:last-child td {
    border-bottom: none;
}

.vmpfence-rules-table tbody tr:hover {
    background: #fafafa;
}

/* Small Toggle Switch for Rules Table */
.vmpfence-toggle-small {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.vmpfence-toggle-small input {
    opacity: 0;
    width: 0;
    height: 0;
}

.vmpfence-toggle-slider-small {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 20px;
}

.vmpfence-toggle-slider-small:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.vmpfence-toggle-small input:checked + .vmpfence-toggle-slider-small {
    background-color: #191970;
}

.vmpfence-toggle-small input:checked + .vmpfence-toggle-slider-small:before {
    transform: translateX(20px);
}

/* Category Badge */
.vmpfence-category-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: lowercase;
    background: #e5e5e5;
    color: #555;
}

/* Rules Footer */
.vmpfence-btn-show-all {
    width: 100%;
    padding: 10px;
    background: #f5f5f5;
    color: #191970;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    transition: all 0.2s;
}

.vmpfence-btn-show-all:hover {
    background: #e8e8e8;
}

.vmpfence-rules-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    grid-column: 2;
}

.vmpfence-btn-refresh {
    padding: 8px 16px;
    background: white;
    color: #191970;
    border: 2px solid #191970;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.vmpfence-btn-refresh:hover {
    background: #191970;
    color: white;
}

.vmpfence-update-info {
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Collapsible Sections */
.vmpfence-options-sections {
    display: flex;
    flex-direction: column;
    gap: 8;
}

.vmpfence-options-section {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    margin-bottom: 0;
}

.vmpfence-options-section-header {
    padding: 20px 25px;
    background: white;
    border: 1px solid #ddd;
    /* border-radius: 8px; */
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    user-select: none;
    margin-bottom: 0;
}

.vmpfence-options-section-header:hover {
    background: #f9f9f9;
}

.vmpfence-options-section-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #23282d;
}

.vmpfence-chevron {
    flex-shrink: 0;
    transition: transform 0.3s;
    color: #666;
}

.vmpfence-options-section-content {
    padding: 0;
    display: none;
    margin: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-top: -1px;
}

/* When section is expanded, adjust header styling */
.vmpfence-options-section.expanded .vmpfence-options-section-header {
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

/* Option Groups */
.vmpfence-option-group {
    padding: 20px 25px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    gap: 10px;
    align-items: center;
}

.vmpfence-option-group:last-child {
    border-bottom: none;
}

.vmpfence-option-left {
    flex: 1;
    min-width: 0;
}

.vmpfence-option-left h3 {
    font-size: 14px;
    font-weight: 400;
    margin: 0 0 5px 0;
    color: #464646;
    line-height: 1.5;
}

.vmpfence-option-left p {
    font-size: 13px;
    line-height: 1.6;
    color: #464646;
    margin: 0;
}

.vmpfence-option-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    min-width: 300px;
}

.vmpfence-option-with-toggle .vmpfence-option-right {
    min-width: auto;
}

/* ON/OFF Toggle Button Group */
.vmpfence-btn-group {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 3px;
    overflow: hidden;
}

.vmpfence-toggle-btn {
    padding: 8px 20px;
    background: white;
    color: #666;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vmpfence-toggle-btn:first-child {
    border-right: 1px solid #ddd;
}

.vmpfence-toggle-btn:hover {
    background: #f5f5f5;
}

.vmpfence-toggle-btn-active {
    background: #00a0d2;
    color: white;
}

.vmpfence-toggle-btn-active:hover {
    background: #24248d;
}

/* Subsection Header */
.vmpfence-subsection-header {
    padding: 20px 25px 10px 25px;
    background: #f9f9f9;
    border-bottom: 1px solid #e5e5e5;
}

.vmpfence-subsection-header h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: #000000;
}

/* Checkbox Variations */
.vmpfence-option-checkbox-only {
    padding: 15px 25px;
}

.vmpfence-option-checkbox-row {
    align-items: center;
}

.vmpfence-option-checkbox-with-text {
    flex-direction: column;
    align-items: flex-start;
}

.vmpfence-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #464646;
    cursor: pointer;
    margin: 0;
}

.vmpfence-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #00a0d2;
}

.vmpfence-checkbox-label span {
    line-height: 1.6;
}

.vmpfence-checkbox-inline {
    display: flex;
    align-items: center;
}

.vmpfence-checkbox-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #00a0d2;
}

/* Text Input */
.vmpfence-input-text {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    background: white;
}

.vmpfence-input-text:focus {
    outline: none;
    border-color: #00a0d2;
    box-shadow: 0 0 0 1px #00a0d2;
}

.vmpfence-hint {
    font-size: 12px;
    color: #c46700;
    margin: 5px 0 0 0;
    font-style: normal;
}

/* Option Notes */
.vmpfence-option-note {
    font-size: 13px;
    color: #464646;
    margin: 8px 0 0 0;
    line-height: 1.6;
}

.vmpfence-option-with-textarea {
    flex-direction: column;
    align-items: stretch;
}

.vmpfence-option-with-textarea .vmpfence-option-left {
    margin-bottom: 10px;
}

.vmpfence-option-with-textarea .vmpfence-option-right {
    min-width: 0;
    width: 100%;
}

/* Form Fields */
.vmpfence-field-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.vmpfence-field-row:last-child {
    margin-bottom: 0;
}

.vmpfence-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    min-width: 200px;
    max-width: 400px;
    background: white;
    cursor: pointer;
    color: #464646;
}

.vmpfence-select:focus {
    outline: none;
    border-color: #00a0d2;
    box-shadow: 0 0 0 1px #00a0d2;
}

.vmpfence-textarea {
    width: 100%;
    max-width: 500px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    font-family: monospace;
    resize: vertical;
    min-height: 80px;
}

.vmpfence-textarea:focus {
    outline: none;
    border-color: #191970;
    box-shadow: 0 0 0 1px #191970;
}

.vmpfence-input-number {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    width: 80px;
}

.vmpfence-input-number:focus {
    outline: none;
    border-color: #191970;
    box-shadow: 0 0 0 1px #191970;
}

.vmpfence-unit {
    font-size: 13px;
    color: #555;
}

/* Toggle Switch */
.vmpfence-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.vmpfence-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.vmpfence-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.vmpfence-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.vmpfence-toggle input:checked + .vmpfence-toggle-slider {
    background-color: #191970;
}

.vmpfence-toggle input:checked + .vmpfence-toggle-slider:before {
    transform: translateX(26px);
}

.vmpfence-toggle-label {
    font-size: 14px;
    color: #555;
    margin-left: 5px;
}

/* Buttons */
.vmpfence-btn-secondary {
    padding: 8px 16px;
    background: white;
    color: #191970;
    border: 1px solid #191970;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vmpfence-btn-secondary:hover {
    background: #191970;
    color: white;
}

.vmpfence-btn-premium {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vmpfence-btn-premium:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

/* Help Text */
.vmpfence-help-text {
    background: #f9f9f9;
    padding: 12px;
    border-left: 3px solid #191970;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

.vmpfence-help-text code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    color: #d63638;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .vmpfence-firewall-grid {
        grid-template-columns: 1fr;
    }
    
    .vmpfence-firewall-box {
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
        min-height: auto;
    }
    
    .vmpfence-firewall-box:last-child {
        border-bottom: none;
    }
    
    .vmpfence-advanced-option,
    .vmpfence-option-group {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .vmpfence-label-main {
        padding-top: 0;
    }
    
    .vmpfence-textarea-full,
    .vmpfence-help-description,
    .vmpfence-services-grid,
    .vmpfence-rules-section,
    .vmpfence-rules-footer,
    .vmpfence-option-content {
        grid-column: 1;
    }
}

@media screen and (max-width: 900px) {
    .vmpfence-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vmpfence-rules-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media screen and (max-width: 782px) {
    .vmpfence-options-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .vmpfence-options-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .vmpfence-options-actions button {
        width: 100%;
    }
    
    .vmpfence-options-title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .vmpfence-options-cards-row {
        grid-template-columns: 1fr;
    }
    
    .vmpfence-sticky-header {
        top: 46px; /* Mobile WordPress admin bar */
    }
    
    .vmpfence-firewall-grid {
        grid-template-columns: 1fr;
    }
    
    .vmpfence-services-grid {
        grid-template-columns: 1fr;
    }
    
    .vmpfence-rules-table {
        font-size: 12px;
    }
    
    .vmpfence-rules-table th,
    .vmpfence-rules-table td {
        padding: 10px;
    }
}

/* Allowlisted URLs Styles */
.vmpfence-allowlist-form {
    background: white;
    border: none;
    padding: 20px 25px;
    margin-bottom: 20px;
    border-radius: 0;
}

.vmpfence-allowlist-table-wrapper {
    background: white;
    border: 1px solid #ddd;
    border-radius: 3px;
    overflow: hidden;
    padding: 20px 25px;
}

.vmpfence-allowlist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.vmpfence-allowlist-table thead {
    background: #f0f0f0;
}

.vmpfence-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-allowlist-table th:last-child {
    border-right: none;
}

.vmpfence-allowlist-table td {
    padding: 8px;
    border-bottom: 1px solid #e5e5e5;
    border-right: 1px solid #e5e5e5;
    font-size: 12px;
    color: #333;
    vertical-align: middle;
}

.vmpfence-allowlist-table td:last-child {
    border-right: none;
}

.vmpfence-allowlist-table tbody tr:hover {
    background: #f8f8f8;
}

.vmpfence-allowlist-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.vmpfence-allowlist-table tbody tr:nth-child(even):hover {
    background: #f0f0f0;
}

.vmpfence-allowlist-table input[type="checkbox"] {
    margin: 0;
    transform: scale(0.9);
}

.vmpfence-select-all,
.vmpfence-row-select,
.vmpfence-enabled-toggle {
    cursor: pointer;
}

.vmpfence-table-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.vmpfence-btn-action {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    transition: background-color 0.2s;
}

.vmpfence-btn-action:hover {
    opacity: 0.9;
}

.vmpfence-table-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vmpfence-filter-select,
.vmpfence-filter-input {
    font-size: 12px;
}

.vmpfence-btn-filter {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.vmpfence-table-footer {
    padding: 10px;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
    font-size: 11px;
    color: #666;
}

/* Responsive adjustments for allowlist table */
@media screen and (max-width: 1200px) {
    .vmpfence-allowlist-table th,
    .vmpfence-allowlist-table td {
        padding: 6px 4px;
        font-size: 11px;
    }
    
    .vmpfence-form-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .vmpfence-form-group {
        margin-left: 0 !important;
        margin-bottom: 10px;
    }
}

@media screen and (max-width: 900px) {
    .vmpfence-allowlist-table-wrapper {
        overflow-x: auto;
    }
    
    .vmpfence-allowlist-table {
        min-width: 800px;
    }
}

/* Admin Bar Adjustments */
@media screen and (max-width: 600px) {
    .vmpfence-sticky-header {
        top: 0; /* No admin bar on very small screens */
    }
}

/* ============================================
   Select2 Custom Styling for Param Type
   ============================================ */

/* Select2 Container */
.select2-container--default .select2-selection--single {
    border: 1px solid #ddd !important;
    border-radius: 3px !important;
    height: 36px !important;
    background-color: white !important;
}

/* Selected value display */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 34px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    font-size: 13px !important;
    color: #333 !important;
}

/* Dropdown arrow */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 34px !important;
    right: 5px !important;
}

/* Dropdown options container */
.select2-dropdown {
    border: 1px solid #ddd !important;
    border-radius: 3px !important;
    font-size: 13px !important;
}

/* Results container - remove max-height and scrollbar */
.select2-results {
    max-height: none !important;
    overflow-y: visible !important;
}

.select2-results__options {
    max-height: none !important;
    overflow-y: visible !important;
}

/* Individual option styling */
.select2-results__option {
    padding: 8px 10px !important;
    font-size: 13px !important;
}

/* Highlighted option on hover */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #191970 !important;
    color: white !important;
}

/* Selected option in dropdown */
.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #f0f0f0 !important;
    color: #333 !important;
}

/* Focus state */
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #191970 !important;
    outline: none !important;
}

/* Remove default outline */
.select2-container--default .select2-selection--single:focus {
    outline: none !important;
}

/* Toggle Button Group */
.vmpfence-toggle-group {
    display: inline-flex;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.vmpfence-toggle-btn {
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    background: #f7f7f7;
    color: #555;
    cursor: not-allowed;
    transition: all 0.2s;
    border-right: 1px solid #ddd;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vmpfence-toggle-btn:last-child {
    border-right: none;
}

.vmpfence-toggle-btn.active {
    background: #007AFF;
    color: white;
    font-weight: 700;
}

.vmpfence-toggle-btn:not(.active):hover {
    background: #e8e8e8;
}

/* Enabled for future use */
.vmpfence-toggle-btn:not([disabled]) {
    cursor: pointer;
}
