/**
 * WAF Optimization Modals CSS
 * 
 * Wordfence-style modal styling for WAF optimization
 * 
 * @package VMPFence
 * @since 2.2.4
 */

/* Modal Overlay */
.vmpfence-waf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.vmpfence-waf-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

/* Modal Container */
.vmpfence-waf-modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 760px;
    max-height: 480px;
    /* overflow-y: auto; */
    z-index: 10000;
    border-radius: 4px;
}

.vmpfence-waf-modal-content {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* Modal Header */
.vmpfence-waf-modal-header {
    position: relative;
    padding: 10px 25px;
    border-bottom: 1px solid #ddd;
    background: #fff;
}

.vmpfence-waf-modal-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #23282d;
}

.vmpfence-waf-modal-close {
    position: absolute;
    top: 0;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

.vmpfence-waf-modal-close:hover {
    color: #000;
}

/* Modal Body */
.vmpfence-waf-modal-body {
    padding: 15px 25px;
    max-height: 60vh;
    overflow-y: auto;
}
/* Help Notice */
.vmpfence-waf-help-notice {
    background: #f7f7f7;
    border-bottom: 1px solid #ddd;
    padding: 12px 25px;
    text-align: right;
}

.vmpfence-waf-help-notice p {
    margin: 0;
    font-size: 13px;
    color: #555;
}

.vmpfence-waf-help-notice a {
    color: #191970;
    text-decoration: none;
}

.vmpfence-waf-help-notice a:hover {
    text-decoration: underline;
}
/* Info Boxes */
/* .vmpfence-waf-info-notice {
     padding: 15px 20px;
} */

.vmpfence-waf-info-notice p {
    margin: 0;
    line-height: 1.6;
    font-size: 14px;
    color: #333;
}

.vmpfence-waf-info-notice code {
    background-color: #f0f0f0;
    padding: 2px 6px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #000;
}

/* Server Info Display */
.vmpfence-waf-server-info {
    margin-top: 10px;
}

/* Server Configuration Box */
.vmpfence-waf-server-config-box {
    background: #fff;
    border-radius: 4px;
    margin-bottom: 20px;
}

.vmpfence-waf-server-config-box p {
    margin: 0 0 10px 0;
    line-height: 1.6;
    font-size: 14px;
    color: #333;
}

.vmpfene-waf-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.vmpfene-waf-select:hover {
    border-color: #191970;
    color: #191970;
}

.vmpfene-waf-select:focus {
    border-color: #191970;
    color: #191970;
    box-shadow: 0 0 3px rgba(25, 25, 112, 0.3);
    outline: none;
}

.vmpfence-waf-server-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.vmpfence-waf-server-row:last-child {
    border-bottom: none;
}

.vmpfence-waf-label {
    font-weight: 600;
    color: #555;
}

.vmpfence-waf-value {
    color: #333;
}

.vmpfence-waf-success-text {
    color: #46b450;
    font-weight: 600;
}

.vmpfence-waf-error-text {
    color: #dc3232;
    font-weight: 600;
}

/* Warning Box */
.vmpfence-waf-warning-box {
    background: #fff8e5;
    border: 1px solid #ffb900;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.vmpfence-waf-warning-box strong {
    display: block;
    margin-bottom: 8px;
    color: #f0b429;
    font-size: 15px;
}

.vmpfence-waf-warning-box p {
    margin: 0;
    line-height: 1.6;
    color: #333;
}

/* Error Box */
.vmpfence-waf-error-box {
    background: #ffebee;
    border: 1px solid #dc3232;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.vmpfence-waf-error-box strong {
    display: block;
    margin-bottom: 8px;
    color: #dc3232;
    font-size: 15px;
}

.vmpfence-waf-error-box p {
    margin: 0;
    line-height: 1.6;
    color: #333;
}

/* Instruction Box */
.vmpfence-waf-instruction-box {
    background: #fff;
    margin-bottom: 20px;
}

.vmpfence-waf-instruction-box p {
    margin: 8px 0;
    line-height: 1.6;
}

/* File Path Display */
/* .vmpfence-waf-file-path-box {
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
} */

.vmpfence-waf-file-path-box code {
    display: block;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 10px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    margin : 10px 0;
    word-break: break-all;
    color: #000;
}

/* Processing Box */
.vmpfence-waf-processing-box {
    text-align: center;
    padding: 40px 20px;
}

.vmpfence-waf-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #191970;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: vmpfence-spin 1s linear infinite;
    margin: 0;
    flex-shrink: 0;
}

@keyframes vmpfence-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.vmpfence-waf-processing-box p {
    font-size: 16px;
    color: #333;
    margin: 10px 0;
}

.vmpfence-waf-processing-note {
    font-size: 13px;
    color: #666;
}

/* Success Box */
.vmpfence-waf-success-box {
    text-align: center;
    padding: 30px 20px;
}

.vmpfence-waf-success-icon {
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    background: #46b450;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    margin-bottom: 20px;
}

.vmpfence-waf-success-box h3 {
    margin: 0 0 15px 0;
    font-size: 22px;
    font-weight: 600;
    color: #23282d;
}

.vmpfence-waf-success-box > p {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 25px;
}

.vmpfence-waf-success-details {
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    text-align: left;
    margin-top: 20px;
}

.vmpfence-waf-success-details p {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.vmpfence-waf-success-details ul {
    margin: 10px 0;
    padding-left: 25px;
}

.vmpfence-waf-success-details li {
    margin: 5px 0;
    line-height: 1.6;
    font-size: 14px;
}

.vmpfence-waf-note {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    font-size: 13px;
    color: #666;
}

/* Waiting Box for Processing Screen */
.vmpfence-waf-waiting-box {
    padding: 0;
}

.vmpfence-waf-waiting-box p {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.vmpfence-waf-waiting-box code {
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
}

.vmpfence-waf-spinner-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 0;
}

.vmpfence-waf-waiting-text {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    margin: 0;
    padding: 0;
    flex: 1;
    display: flex;
    align-items: center;
}

/* Simple Success Box */
.vmpfence-waf-simple-success-box {
    padding: 5px 0;
}

.vmpfence-waf-simple-success-box p {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

/* Modal Footer */
.vmpfence-waf-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #ddd;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.vmpfence-waf-modal-footer p {
    margin: 0;
    margin-right: auto;
    font-size: 13px;
    color: #555;
    text-align: left;
}

/* Buttons */
.vmpfence-waf-btn {
    display: inline-block;
    padding: 10px 20px;
    /* margin-left: 10px; */
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.vmpfence-waf-btn:first-child {
    margin-left: 0;
}

.vmpfence-waf-btn-primary {
    background: #191970;
    color: #fff;
}

.vmpfence-waf-btn-primary:hover {
    background: #17175a;
}

.vmpfence-waf-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.vmpfence-waf-btn-danger {
    background: #191970;
    color: #fff;
}

.vmpfence-waf-btn-danger:hover {
    background: #17175a;
}

.vmpfence-waf-btn-danger:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.vmpfence-waf-btn-default {
    background: #fff;
    color: #191970;
    border: 1px solid #191970;
}

.vmpfence-waf-btn-default:hover {
    background: #e9e9e9;
}

/* Banner Styles */
.vmpfence-waf-optimization-banner {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-left: 4px solid #191970;
    border-radius: 4px;
    padding: 15px 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.vmpfence-waf-banner-content {
    flex: 1;
    padding-right: 20px;
}

.vmpfence-waf-banner-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #3c434a;
}

.vmpfence-waf-banner-actions {
    display: flex;
    gap: 10px;
}

.vmpfence-waf-banner-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.vmpfence-waf-banner-btn-primary {
    background: #fff;
    color: #191970;
    border: 1px solid #191970;
}

.vmpfence-waf-banner-btn-primary:hover {
    background: #e9e9e9;
}

.vmpfence-waf-banner-btn-secondary {
    background: #fff;
    color: #191970;
    border: 1px solid #191970;
}

.vmpfence-waf-banner-btn-secondary:hover {
    background: #e9e9e9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .vmpfence-waf-modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .vmpfence-waf-modal-header,
    .vmpfence-waf-modal-body,
    .vmpfence-waf-modal-footer {
        padding: 15px;
    }
    
    .vmpfence-waf-server-row {
        flex-direction: column;
    }
    
    .vmpfence-waf-banner-content {
        padding-right: 10px;
    }
    
    .vmpfence-waf-banner-actions {
        flex-direction: column;
    }
}
