/* Enhanced PDF Locking Styles - Backend Integration */

.enhanced-pdf-locking-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.enhanced-pdf-locking-dialog {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dialog-header {
    text-align: center;
    margin-bottom: 24px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 16px;
}

.dialog-header h3 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
}

.dialog-header p {
    margin: 0;
    color: #7f8c8d;
    font-size: 16px;
}

.security-options {
    margin-bottom: 24px;
}

.security-option {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
}

.security-option:hover {
    border-color: #3498db;
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.security-option.recommended {
    border-color: #27ae60;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%);
    position: relative;
}

.security-option.recommended::before {
    content: "⭐";
    position: absolute;
    top: -8px;
    right: -8px;
    background: #27ae60;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.security-option.selected {
    border-color: #3498db;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
}

.option-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.option-header input[type="radio"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.option-header label {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.recommended-badge {
    background: #27ae60;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.option-details {
    margin-left: 28px;
    color: #5a6c7d;
}

.option-details p {
    margin: 8px 0 0 0;
    font-size: 14px;
    line-height: 1.4;
}

.permission-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.allowed, .blocked {
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.allowed {
    background: #d4edda;
    color: #155724;
}

.blocked {
    background: #f8d7da;
    color: #721c24;
}

.dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.btn-secondary, .btn-primary {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.security-info {
    background: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    padding: 12px;
    margin-top: 16px;
    text-align: center;
}

.security-info small {
    color: #0c5460;
    font-size: 13px;
    line-height: 1.4;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .enhanced-pdf-locking-dialog {
        margin: 16px;
        padding: 20px;
        max-width: none;
        width: calc(100% - 32px);
    }
    
    .dialog-header h3 {
        font-size: 20px;
    }
    
    .security-option {
        padding: 12px;
    }
    
    .dialog-actions {
        flex-direction: column;
    }
    
    .btn-secondary, .btn-primary {
        width: 100%;
    }
}

/* Loading animation */
.btn-loading {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
